mirror of
https://github.com/Optiboot/optiboot.git
synced 2025-08-17 21:41:03 +03:00
Quit and timeout (will produce an avrdude error) if we try to read EEPROM using a version without EEPROM support.
This commit is contained in:
@@ -1519,12 +1519,20 @@ static inline void read_mem(uint8_t memtype, addr16_t address, pagelen_t length)
|
|||||||
|
|
||||||
switch (memtype) {
|
switch (memtype) {
|
||||||
|
|
||||||
#if SUPPORT_EEPROM || BIGBOOT
|
|
||||||
case 'E': // EEPROM
|
case 'E': // EEPROM
|
||||||
|
#if SUPPORT_EEPROM || BIGBOOT
|
||||||
do {
|
do {
|
||||||
putch(eeprom_read_byte((address.bptr++)));
|
putch(eeprom_read_byte((address.bptr++)));
|
||||||
} while (--length);
|
} while (--length);
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* On systems where EEPROM write is not supported, just busy-loop
|
||||||
|
* until the WDT expires, which will eventually cause an error on
|
||||||
|
* host system (which is what it should do.)
|
||||||
|
*/
|
||||||
|
while (1)
|
||||||
|
; // Error: wait for WDT
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
do {
|
do {
|
||||||
|
Reference in New Issue
Block a user