예제 #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();
        }
예제 #2
0
파일: IntelHex.cs 프로젝트: kav-it/SharpLib
        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();
        }