From 8a98e09c46633b595fa70df10fc45b998410c143 Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Sat, 16 Oct 2010 19:28:05 +0200 Subject: [PATCH] corrections --- Makefile | 10 +++++----- main.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 1ae511f..13490e6 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ $(PRG).elf: $(OBJ) $(CC) $(CFLAGS) -c $< -o $@ clean: - rm -rf *.o *.lst *.map $(PRG).elf *.hex *.bin + rm -rf *.o $(PRG).lst $(PRG).map $(PRG).elf $(PRG).hex $(PRG).bin lst: $(PRG).lst @@ -59,7 +59,7 @@ bin: $(PRG).bin install: text avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U flash:w:$(PRG).hex -fuses: - avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U lfuse:w:0xc2:m - avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U hfuse:w:0xdd:m - avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U efuse:w:0xfa:m +#fuses: +# avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U lfuse:w:0xc2:m +# avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U hfuse:w:0xdd:m +# avrdude -c dragon_isp -P usb -p $(AVRDUDE_MCU) -U efuse:w:0xfa:m diff --git a/main.c b/main.c index 63f4acf..36fe5c1 100644 --- a/main.c +++ b/main.c @@ -115,7 +115,7 @@ * SLA+W, 0x01, 0x80, STO * * - read chip info: 3byte signature, 1byte page size, 2byte flash size, 2byte eeprom size - * SLA+W, 0x02, 0x00, SLA+R, {4 bytes}, STO + * SLA+W, 0x02, 0x00, 0x00, 0x00, SLA+R, {4 bytes}, STO * * - read one (or more) flash bytes * SLA+W, 0x02, 0x01, addrh, addrl, SLA+R, {* bytes}, STO @@ -139,8 +139,8 @@ const static uint8_t chipinfo[8] = { (APP_END >> 8) & 0xFF, APP_END & 0xFF, #if (EEPROM_SUPPORT) - (E2END >> 8 & 0xFF), - E2END & 0xFF + ((E2END +1) >> 8 & 0xFF), + (E2END +1) & 0xFF #else 0x00, 0x00 #endif @@ -239,7 +239,7 @@ ISR(TWI_vect) default: /* boot app now */ - data = CMD_BOOT_APPLICATION; + cmd = CMD_BOOT_APPLICATION; ack = (0<