EFM32 Pearl Gecko 12 Software Documentation  efm32pg12-doc-5.1.2
nvm.h File Reference

Detailed Description

Non-Volatile Memory Wear-Leveling driver API.

Version
5.1.2

License

(C) Copyright 2014 Silicon Labs, http://www.silabs.com

This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file nvm.h.

#include <stdint.h>
#include <stdbool.h>
#include "em_device.h"
#include "nvm_hal.h"
#include "nvm_config.h"
#include "ecode.h"

Go to the source code of this file.

Macros

#define ECODE_EMDRV_NVM_ADDR_INVALID   ( ECODE_EMDRV_NVM_BASE | 0x00000001 )
 Invalid address.
 
#define ECODE_EMDRV_NVM_ALIGNMENT_INVALID   ( ECODE_EMDRV_NVM_BASE | 0x00000002 )
 Invalid data alignment.
 
#define ECODE_EMDRV_NVM_DATA_INVALID   ( ECODE_EMDRV_NVM_BASE | 0x00000003 )
 Invalid input data or format.
 
#define ECODE_EMDRV_NVM_ERROR   ( ECODE_EMDRV_NVM_BASE | 0x00000007 )
 General error.
 
#define ECODE_EMDRV_NVM_NO_PAGES_AVAILABLE   ( ECODE_EMDRV_NVM_BASE | 0x00000005 )
 Initialization didn't find any pages available to allocate.
 
#define ECODE_EMDRV_NVM_OK   ( ECODE_OK )
 Success return value. More...
 
#define ECODE_EMDRV_NVM_PAGE_INVALID   ( ECODE_EMDRV_NVM_BASE | 0x00000006 )
 Could not find the page specified.
 
#define ECODE_EMDRV_NVM_WRITE_LOCK   ( ECODE_EMDRV_NVM_BASE | 0x00000004 )
 A write is currently in progress.
 
#define NVM_ERASE_RETAINCOUNT   0xffffffffUL
 
#define NVM_PAGE_TERMINATION   { NULL, 0, (NVM_Object_Ids) 0 }
 
#define NVM_READ_ALL_CMD   0xff
 
#define NVM_WRITE_ALL_CMD   0xff
 
#define NVM_WRITE_NONE_CMD   0xfe
 

Functions

Ecode_t NVM_Erase (uint32_t eraseCount)
 Erase the entire allocated NVM area. More...
 
Ecode_t NVM_Init (NVM_Config_t const *nvmConfig)
 Initialize the NVM manager. More...
 
Ecode_t NVM_Read (uint16_t pageId, uint8_t objectId)
 Read an object or an entire page. More...
 
Ecode_t NVM_Write (uint16_t pageId, uint8_t objectId)
 Write an object or a page. More...