8.2.8 boot_page_fill_safe Macro
Place a word in the bootloader temporary page buffer corresponding to the flash address.
Include
<avr/boot.h>
Prototype
void boot_page_fill_safe(unsigned int address, unsign int value);
Remarks
This macro places the value specified in the bootloader temporary page buffer corresponding to the flash address after ensuring that EEPROM and SPM operations have been completed. The address is a byte address; however, AVR devices writes words to the buffer, so for each 16-bit word to be written, increment the address by 2. The LSB of the data is written to the lower address; the MSB of the data is written to the higher address.
Example
#include <avr/boot.h>
int main(void)
{
boot_page_fill_safe(0x100, 0x55);
}