Zerocat Chipflasher  v0.4.3 (board-edition-1)
Flash free firmware to BIOS chips, kick the Manageability Engine.
MOT_addrlen.c
Go to the documentation of this file.
1 /******************************************************************/
27 /******************************************************************/
38 signed char MOT_addrlen (
39  char SREC_type
40  )
41 {
42  switch(SREC_type) {
43  case '0' ... '1':
44  case '5':
45  case '9':
46  return 2;
47 
48  case '2':
49  case '6':
50  case '8':
51  return 3;
52 
53  case '3':
54  case '7':
55  return 4;
56 
57  default:
58  return -1; //no valid MOTOROLA Srecord type
59  }
60 }
61 
MOT_addrlen
signed char MOT_addrlen(char SREC_type)
Return the address length in bytes that corresponds to a known S-record type.
Definition: MOT_addrlen.c:38