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

    // Flush EEPROM page buffer if necessary
    if ((NVM.STATUS & NVM_EELOAD_bm) != 0) {
        NVM.CMD = NVM_CMD_ERASE_EEPROM_BUFFER_gc;
        nvm_exec();
    }
}
/**
 * \brief Flush temporary EEPROM page buffer.
 *
 * This function flushes the EEPROM page buffers. This function will cancel
 * any ongoing EEPROM page buffer loading operations, if any.
 * This function also works for memory mapped EEPROM access.
 *
 * \note An EEPROM write operations will automatically flush the buffer for you.
 * \note The function does not preserve the value of the NVM.CMD register
 */
\brief Flush temporary EEPROM page buffer.
This function flushes the EEPROM page buffers. This function will cancel
any ongoing EEPROM page buffer loading operations, if any.
This function also works for memory mapped EEPROM access.

\note An EEPROM write operations will automatically flush the buffer for you.
\note The function does not preserve the value of the NVM.CMD register
\ brief Flush temporary EEPROM page buffer . This function flushes the EEPROM page buffers . This function will cancel any ongoing EEPROM page buffer loading operations if any . This function also works for memory mapped EEPROM access . \ note An EEPROM write operations will automatically flush the buffer for you . \ note The function does not preserve the value of the NVM . CMD register
void nvm_eeprom_flush_buffer(void)
{
    nvm_wait_until_ready();
    if ((NVM.STATUS & NVM_EELOAD_bm) != 0) {
        NVM.CMD = NVM_CMD_ERASE_EEPROM_BUFFER_gc;
        nvm_exec();
    }
}
void nvm_eeprom_flush_buffer ( void ) { nvm_wait_until_ready ( ) ; if ( ( NVM . STATUS & NVM_EELOAD_bm ) != 0 ) { NVM . CMD = NVM_CMD_ERASE_EEPROM_BUFFER_gc ; nvm_exec ( ) ; } }
\brief Flush temporary EEPROM page buffer.
\ brief Flush temporary EEPROM page buffer .
// Wait until NVM is ready // Flush EEPROM page buffer if necessary