AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/nvm/nvm.c
void nvm_eeprom_split_write_page(uint8_t page_addr)
{
    // Wait until NVM is ready
    nvm_wait_until_ready();

    // Calculate page address
    uint16_t address = (uint16_t) (page_addr * EEPROM_PAGE_SIZE);

    Assert(address <= EEPROM_SIZE);

    // Set address
    NVM.ADDR2 = 0x00;
    NVM.ADDR1 = (address >> 8) & 0xFF;
    NVM.ADDR0 = address & 0xFF;

    // Issue EEPROM Split Write command
    nvm_issue_command(NVM_CMD_WRITE_EEPROM_PAGE_gc);
}
/**
 * \brief Write (without erasing) EEPROM page.
 *
 * This function writes the contents of an already loaded EEPROM page
 * buffer into EEPROM memory.
 *
 * As this is a split write, the page in EEPROM will _not_ be erased
 * before writing.
 *
 * \param  page_addr  EEPROM Page address, between 0 and EEPROM_SIZE/EEPROM_PAGE_SIZE
 */
\brief Write (without erasing) EEPROM page.
This function writes the contents of an already loaded EEPROM page
buffer into EEPROM memory.

As this is a split write, the page in EEPROM will _not_ be erased
before writing.


\ brief Write ( without erasing ) EEPROM page . This function writes the contents of an already loaded EEPROM page buffer into EEPROM memory . As this is a split write the page in EEPROM will _not_ be erased before writing .
void nvm_eeprom_split_write_page(uint8_t page_addr)
{
    nvm_wait_until_ready();
    uint16_t address = (uint16_t) (page_addr * EEPROM_PAGE_SIZE);
    Assert(address <= EEPROM_SIZE);
    NVM.ADDR2 = 0x00;
    NVM.ADDR1 = (address >> 8) & 0xFF;
    NVM.ADDR0 = address & 0xFF;
    nvm_issue_command(NVM_CMD_WRITE_EEPROM_PAGE_gc);
}
void nvm_eeprom_split_write_page ( uint8_t page_addr ) { nvm_wait_until_ready ( ) ; uint16_t address = ( uint16_t ) ( page_addr * EEPROM_PAGE_SIZE ) ; Assert ( address <= EEPROM_SIZE ) ; NVM . ADDR2 = 0x00 ; NVM . ADDR1 = ( address >> 8 ) & 0xFF ; NVM . ADDR0 = address & 0xFF ; nvm_issue_command ( NVM_CMD_WRITE_EEPROM_PAGE_gc ) ; }
\brief Write (without erasing) EEPROM page.
\ brief Write ( without erasing ) EEPROM page .
// Wait until NVM is ready // Calculate page address // Set address // Issue EEPROM Split Write command