BUGfix: ensure model-depended serial commands are only applied to correct model
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Mon, 30 Jul 2012 21:43:45 +0000 (21:43 +0000)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Mon, 30 Jul 2012 21:43:45 +0000 (21:43 +0000)
Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
firmware/main.c

index bd4eebf..b3f1470 100644 (file)
@@ -168,6 +168,7 @@ static uchar    replyBuffer[4];
             rval = rq->wIndex.bytes[0] & 3;
             rval = signatureBytes[rval];
 #if HAVE_READ_LOCK_FUSE
+#if defined (__AVR_ATmega8__)
         }else if(rq->wValue.bytes[0] == 0x58 && rq->wValue.bytes[1] == 0x00){  /* read lock bits */
             rval = boot_lock_fuse_bits_get(GET_LOCK_BITS);
         }else if(rq->wValue.bytes[0] == 0x50 && rq->wValue.bytes[1] == 0x00){  /* read lfuse bits */
@@ -175,6 +176,7 @@ static uchar    replyBuffer[4];
         }else if(rq->wValue.bytes[0] == 0x58 && rq->wValue.bytes[1] == 0x08){  /* read hfuse bits */
             rval = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
 #endif
+#endif
 #if HAVE_EEPROM_BYTE_ACCESS
         }else if(rq->wValue.bytes[0] == 0xa0){  /* read EEPROM byte */
             rval = eeprom_read_byte((void *)address.word);