SAM Non Volatile Memory driver.
Copyright (c) 2012-2020 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | _nvm_module |
Macros | |
#define | NVM_MEMORY ((volatile uint16_t *)FLASH_ADDR) |
#define | NVM_USER_MEMORY ((volatile uint16_t *)NVMCTRL_USER) |
Functions | |
enum status_code | nvm_erase_row (const uint32_t row_address) |
Erases a row in the NVM memory space. More... | |
enum status_code | nvm_execute_command (const enum nvm_command command, const uint32_t address, const uint32_t parameter) |
Executes a command on the NVM controller. More... | |
enum status_code | nvm_get_fuses (struct nvm_fusebits *fusebits) |
Get fuses from user row. More... | |
void | nvm_get_parameters (struct nvm_parameters *const parameters) |
Reads the parameters of the NVM controller. More... | |
bool | nvm_is_page_locked (uint16_t page_number) |
Checks whether the page region is locked. More... | |
enum status_code | nvm_read_buffer (const uint32_t source_address, uint8_t *const buffer, uint16_t length) |
Reads a number of bytes from a page in the NVM memory region. More... | |
enum status_code | nvm_set_config (const struct nvm_config *const config) |
Sets the up the NVM hardware module based on the configuration. More... | |
enum status_code | nvm_set_fuses (struct nvm_fusebits *fb) |
Set fuses from user row. More... | |
enum status_code | nvm_update_buffer (const uint32_t destination_address, uint8_t *const buffer, uint16_t offset, uint16_t length) |
Updates an arbitrary section of a page with new data. More... | |
enum status_code | nvm_write_buffer (const uint32_t destination_address, const uint8_t *buffer, uint16_t length) |
Writes a number of bytes to a page in the NVM memory region. More... | |
Variables | |
static struct _nvm_module | _nvm_dev |
#define NVM_MEMORY ((volatile uint16_t *)FLASH_ADDR) |
Pointer to the NVM MEMORY region start address
Referenced by nvm_erase_row(), nvm_execute_command(), nvm_get_fuses(), nvm_read_buffer(), and nvm_write_buffer().
#define NVM_USER_MEMORY ((volatile uint16_t *)NVMCTRL_USER) |
Pointer to the NVM USER MEMORY region start address
Referenced by nvm_get_parameters().
|
static |
Instance of the internal device struct
Referenced by nvm_erase_row(), nvm_execute_command(), nvm_is_page_locked(), nvm_read_buffer(), nvm_set_config(), nvm_update_buffer(), and nvm_write_buffer().