eeprom.h File Reference
More...
#include "stm32f10x.h"
Go to the source code of this file.
Defines | |
#define | EEPROM_START_ADDRESS ((uint32_t)0x08010000) |
#define | ERASED ((uint16_t)0xFFFF) |
#define | NO_VALID_PAGE ((uint16_t)0x00AB) |
#define | NumbOfVar ((uint8_t)0x03) |
#define | PAGE0 ((uint16_t)0x0000) |
#define | PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x000)) |
#define | PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1))) |
#define | PAGE1 ((uint16_t)0x0001) |
#define | PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE)) |
#define | PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1))) |
#define | PAGE_FULL ((uint8_t)0x80) |
#define | READ_FROM_VALID_PAGE ((uint8_t)0x00) |
#define | RECEIVE_DATA ((uint16_t)0xEEEE) |
#define | VALID_PAGE ((uint16_t)0x0000) |
#define | WRITE_IN_VALID_PAGE ((uint8_t)0x01) |
Functions | |
uint16_t | EE_Init (void) |
Restore the pages to a known good state in case of page's status corruption after a power loss. | |
uint16_t | EE_ReadVariable (uint16_t VirtAddress, uint16_t *Data) |
Returns the last stored variable data, if found, which correspond to the passed virtual address. | |
uint16_t | EE_WriteVariable (uint16_t VirtAddress, uint16_t Data) |
Writes/upadtes variable data in EEPROM. |
Detailed Description
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
© COPYRIGHT 2009 STMicroelectronics
Definition in file eeprom.h.
Define Documentation
#define EEPROM_START_ADDRESS ((uint32_t)0x08010000) |
Definition at line 38 of file eeprom.h.
Referenced by EE_ReadVariable(), and EE_VerifyPageFullWriteVariable().
#define NO_VALID_PAGE ((uint16_t)0x00AB) |
Definition at line 53 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_PageTransfer(), EE_ReadVariable(), and EE_VerifyPageFullWriteVariable().
#define NumbOfVar ((uint8_t)0x03) |
#define PAGE0 ((uint16_t)0x0000) |
Definition at line 49 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_PageTransfer(), EE_ReadVariable(), and EE_VerifyPageFullWriteVariable().
#define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x000)) |
Definition at line 42 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_Format(), EE_Init(), and EE_PageTransfer().
#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1))) |
#define PAGE1 ((uint16_t)0x0001) |
#define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE)) |
Definition at line 45 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_Format(), EE_Init(), and EE_PageTransfer().
#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1))) |
#define PAGE_FULL ((uint8_t)0x80) |
Definition at line 65 of file eeprom.h.
Referenced by EE_VerifyPageFullWriteVariable(), and EE_WriteVariable().
#define READ_FROM_VALID_PAGE ((uint8_t)0x00) |
Definition at line 61 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_PageTransfer(), and EE_ReadVariable().
#define RECEIVE_DATA ((uint16_t)0xEEEE) |
Definition at line 57 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_Init(), and EE_PageTransfer().
#define VALID_PAGE ((uint16_t)0x0000) |
Definition at line 58 of file eeprom.h.
Referenced by EE_FindValidPage(), EE_Format(), EE_Init(), and EE_PageTransfer().
#define WRITE_IN_VALID_PAGE ((uint8_t)0x01) |
Definition at line 62 of file eeprom.h.
Referenced by EE_FindValidPage(), and EE_VerifyPageFullWriteVariable().
|