- Checksum += RecType;
-
- if (RecType == 0) {
- for (j = 0; j < RecLength; j++) {
- Data = Ascii2Hex(&line[i], 2);
- memory_write8(PGM_MEM_ID,
- (unsigned int)(LoadOffset + j),
- (unsigned char)Data);
+ checksum += rec_type;
+
+ if (rec_type == 0) {
+ for (j = 0; j < rec_len; j++) {
+ data = asciihex2int_len(&line[i], 2);
+ mem_write8(PGM_MEM_ID,
+ (unsigned int) (load_offset + j),
+ (unsigned char) data);