Permalink
Browse files

neue Board Typen in Bootloader und canix eingebaut

telican unterstuetzt die alten und die neuen schon
  • Loading branch information...
RealMerlin committed Jan 31, 2019
1 parent 5929a7b commit ef440e679d3c8d8bbeac877de1c149678bc39dac
Showing with 6 additions and 8 deletions.
  1. +3 −4 canix/hcan_hms.c
  2. +3 −4 hcanbl/main.c
@@ -67,17 +67,16 @@ void canix_SFP_HMS_handler(const canix_frame *frame)
answer.data[2] = 0;
if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x0F)
answer.data[2] += 0x30; // µC-Signatur: __AVR_ATmega328P__
/* abwaertskompatibel: else if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x02)
else if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x02)
answer.data[2] += 0x10; // µC-Signatur: __AVR_ATmega32__
else if (SIGNATURE_1 == 0x96 && SIGNATURE_2 == 0x0A)
answer.data[2] += 0x20; // µC-Signatur: __AVR_ATmega644P__
*/
#if defined (__AVR_ATmega32__)
answer.data[2] += 0x01; // compiliert fuer __AVR_ATmega32__
#elif defined (__AVR_ATmega644P__)
answer.data[2] += 0x02;
answer.data[2] += 0x02; // compiliert fuer __AVR_ATmega644P__
#elif defined (__AVR_ATmega328P__)
answer.data[2] += 0x03;
answer.data[2] += 0x03; // compiliert fuer __AVR_ATmega328P__
#endif
answer.data[3] = eeprom_read_byte((uint8_t *)EEPR_BOARD_TYPE);
answer.size = 4;
@@ -467,17 +467,16 @@ int main(void)
data[2] = 0;
if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x0F)
data[2] += 0x30; // µC-Signatur: __AVR_ATmega328P__
/* abwaertskompatibel: else if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x02)
else if (SIGNATURE_1 == 0x95 && SIGNATURE_2 == 0x02)
data[2] += 0x10; // µC-Signatur: __AVR_ATmega32__
else if (SIGNATURE_1 == 0x96 && SIGNATURE_2 == 0x0A)
data[2] += 0x20; // µC-Signatur: __AVR_ATmega644P__
*/
#if defined (__AVR_ATmega32__)
data[2] += 0x01; // compiliert fuer __AVR_ATmega32__
#elif defined (__AVR_ATmega644P__)
data[2] += 0x02;
data[2] += 0x02; // compiliert fuer __AVR_ATmega644P__
#elif defined (__AVR_ATmega328P__)
data[2] += 0x03;
data[2] += 0x03; // compiliert fuer __AVR_ATmega328P__
#endif
data[3] = eeprom_read_byte((uint8_t *)4); // 4=EEPR_BOARD_TYPE
size = 4;

0 comments on commit ef440e6

Please sign in to comment.