Exemple #1
0
        public IntelHexRecord(UInt16 addr, IntexHexRecordTyp typ, Byte[] data)
        {
            ByteList list = new ByteList();

            int len = (data == null) ? 0 : data.Length;

            list.AddByte8((Byte)len);
            list.AddByte16(addr, Endianess.Big);
            list.AddByte8((Byte)typ);
            list.AddBuffer(data);
            list.AddByte8(0xAA);

            _buffer = list.ToBuffer();

            UpdateCrc();
            UpdateText();
        }
Exemple #2
0
        public IntelHexRecord(UInt16 addr, IntexHexRecordTyp typ, Byte[] data)
        {
            ByteList list = new ByteList();

            int len = (data == null) ? 0 : data.Length;

            list.AddByte8((Byte)len);
            list.AddByte16(addr, Endianess.Big);
            list.AddByte8((Byte)typ);
            list.AddBuffer(data);
            list.AddByte8(0xAA);

            _buffer = list.ToBuffer();

            UpdateCrc();
            UpdateText();
        }