Microchip® Advanced Software Framework

fuota_nvm.c File Reference

Interface for accessing NVM to perform FUOTA image related storage.

Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "nvm.h"
#include "common_nvm.h"
#include "fuota_nvm.h"

Functions

status_code_t FUOTA_NVM_Init (void)
 Initialize the non volatile memory specified. More...
 
status_code_t FUOTA_NVM_Read (uint32_t address, void *buffer, uint32_t len)
 Read len number of bytes from address address in non volatile memory mem and store it in the buffer buffer. More...
 
status_code_t FUOTA_NVM_Write (uint32_t address, void *buffer, uint32_t len)
 Write len number of bytes at address address in non volatile memory mem from the buffer buffer. More...
 

status_code_t FUOTA_NVM_Init ( void  )

Initialize the non volatile memory specified.

References nvm_init(), and STATUS_OK.

status_code_t FUOTA_NVM_Read ( uint32_t  address,
void *  buffer,
uint32_t  len 
)

Read len number of bytes from address address in non volatile memory mem and store it in the buffer buffer.

Parameters
addressAddress to read
bufferPointer to destination buffer
lenNumber of bytes to read

References STATUS_BUSY, and STATUS_OK.

status_code_t FUOTA_NVM_Write ( uint32_t  address,
void *  buffer,
uint32_t  len 
)

Write len number of bytes at address address in non volatile memory mem from the buffer buffer.

Parameters
addressAddress to write
bufferPointer to source buffer
lenNumber of bytes to write

References STATUS_OK.