Beispiel #1
0
 public static QsiMessage getV4EndOfFile() {
   // Create a v4 bootloader end of file message
   int l = 10;
   QsiMessage m = new QsiMessage(l);
   m.setV4Length(0);
   m.setV4Address(0);
   m.setV4RecType(1);
   m.setV4Checksum(0, 0, 1, new int[0]);
   return m.v4frame();
 }
Beispiel #2
0
 public static QsiMessage getv4ExtAddr() {
   // Create a v4 bootloader extended address message
   int l = 14;
   int[] data = {0, 0};
   QsiMessage m = new QsiMessage(l);
   m.setV4Length(2);
   m.setV4Address(0);
   m.setV4RecType(4);
   m.setV4Data(data);
   m.setV4Checksum(0, 0, 4, data);
   return m.v4frame();
 }
Beispiel #3
0
 public static QsiMessage getV4WriteFlash(int addr, int[] data, int type) {
   // Create a v4 bootloader message which is same format as a record
   // in the hex file
   int l = (data.length + 5) * 2;
   QsiMessage m = new QsiMessage(l);
   m.setV4Length(data.length);
   m.setV4Address(addr);
   m.setV4RecType(type);
   m.setV4Data(data);
   m.setV4Checksum(data.length, addr, type, data);
   return m.v4frame();
 }