avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] BUGS in boot.h


From: Ludek Stepan
Subject: [avr-libc-dev] BUGS in boot.h
Date: Sun, 28 Aug 2005 22:50:51 +0200

Hello, I think I have found bugs in avr/boot.h header file.

Following macro definitions are incorrect and produce compile-time errors:

1) boot_page_erase (address) doesn't take parameter data

#define boot_page_erase_safe (address, data) \
            __boot_eeprom_spm_safe (boot_page_erase, address, data)

2) boot_page_write (address) doesn't take parameter data,
   "boot_page_wrte" doesn't exist

#define boot_page_write_safe (address, data) \
            __boot_eeprom_spm_safe (boot_page_wrte, address, data)

There may be more errors, I did check only for these 2.

The macros worked just fine after I had fixed them on my localhost...
I did it this way:

#define boot_page_erase_safe(address) \
   boot_spm_busy_wait();             \
   eeprom_busy_wait();               \
   boot_page_erase(address);

#define boot_page_write_safe(address) \
   boot_spm_busy_wait();             \
   eeprom_busy_wait();               \
   boot_page_write(address);

Regards, Ludek Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]