corrections

This commit is contained in:
Olaf Rempel 2010-10-16 19:28:05 +02:00
parent b2c6dc35ce
commit 8a98e09c46
2 changed files with 9 additions and 9 deletions

View File

@ -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

8
main.c
View File

@ -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<<TWEA);
break;
}