Microchip® Advanced Software Framework

example5_xmega.c File Reference

NVM example for AVR XMEGA.

Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.

#include <conf_example.h>
#include <asf.h>

Macros

#define BUFFER_SIZE   16
 
#define FLASH_ERASED   0xff
 
#define TEST_ADDR   0
 

Functions

static bool is_user_sig_equal_to_buffer (flash_addr_t address, uint8_t *buffer, uint8_t len)
 Check if an EEPROM page is equal to a memory buffer. More...
 
int main (void)
 
static void set_buffer (uint8_t *buffer, uint8_t value)
 Set all values of a memory buffer to a given value. More...
 
static status_code_t test_read (void)
 Test nvm_user_sig_read_buffer(). More...
 
static status_code_t test_write_and_erase (void)
 Test nvm_user_sig_write_buffer(). More...
 
static status_code_t test_write_no_erase (void)
 Test nvm_user_sig_write_buffer(). More...
 

Variables

uint8_t buffer [BUFFER_SIZE]
 Memory buffer to use during testing. More...