# HG changeset patch # User Malte Bayer # Date 1354467786 -3600 # Node ID 313aad7435a893ced07fa3d26bad43732d770e10 # Parent b2d91fd5d926de7bae36a1f9cbd3393de5f79a65 fix #688 diff -r b2d91fd5d926 -r 313aad7435a8 blackbox/Makefile --- a/blackbox/Makefile Sun Dec 02 13:24:42 2012 +0100 +++ b/blackbox/Makefile Sun Dec 02 18:03:06 2012 +0100 @@ -18,6 +18,11 @@ PORT=/dev/ttyS0 endif +PROGRAMMER=-P $(PORT) -c stk500v2 +ifdef IF +PROGRAMMER=-c $(IF) +endif + #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c #SRC = main.c driver/rs232.c driver/manchester.c SRC = main.c driver/rs232.c driver/adc.c @@ -79,13 +84,13 @@ rm $(PRG).map program: code - $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i + $(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i backup: - $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i + $(AVRDUDE) $(PROGRAMMER) -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i fuse: - $(AVRDUDE) -P $(PORT) -c stk500v2 -p $(MCU) -V $(FUSES) + $(AVRDUDE) -c $(PROGRAMMER) -p $(MCU) -V $(FUSES) clean: rm -rf *.o *.elf *.elf.src *.s *.i diff -r b2d91fd5d926 -r 313aad7435a8 blackbox/main.c --- a/blackbox/main.c Sun Dec 02 13:24:42 2012 +0100 +++ b/blackbox/main.c Sun Dec 02 18:03:06 2012 +0100 @@ -484,7 +484,7 @@ uint8_t i; for (i=0; i