SAM Non-Volatile Memory driver.
Copyright (c) 2012-2020 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | nvm_config |
NVM controller configuration structure. More... | |
struct | nvm_fusebits |
NVM user row fuse setting structure. More... | |
struct | nvm_parameters |
NVM memory parameter structure. More... | |
Functions | |
Configuration and Initialization | |
static void | nvm_get_config_defaults (struct nvm_config *const config) |
Initializes an NVM controller configuration structure to defaults. 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... | |
static bool | nvm_is_ready (void) |
Checks if the NVM controller is ready to accept a new command. More... | |
NVM Access Management | |
void | nvm_get_parameters (struct nvm_parameters *const parameters) |
Reads the parameters of the NVM controller. 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... | |
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_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_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... | |
enum status_code | nvm_set_fuses (struct nvm_fusebits *fb) |
Set fuses from user row. More... | |
bool | nvm_is_page_locked (uint16_t page_number) |
Checks whether the page region is locked. More... | |
static enum nvm_error | nvm_get_error (void) |
Retrieves the error code of the last issued NVM operation. More... | |