CARME-M4 BSP  V1.5
eeprom.h
Go to the documentation of this file.
1 #ifndef __EEPROM_H__
2 #define __EEPROM_H__
3 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif /* __cplusplus */
75 
76 /*----- Header-Files -------------------------------------------------------*/
77 #include <stm32f4xx.h> /* Processor STM32F407IG */
78 #include <carme.h> /* CARME Module */
79 #include <i2c.h> /* CARME I2C definitions */
80 
81 /*----- Macros -------------------------------------------------------------*/
82 #define CARME_ERROR_EEPROM_OVERFLOW CARME_ERROR_EEPROM_BASE + 0
85 #define CARME_ERROR_EEPROM_BUSY CARME_ERROR_EEPROM_BASE + 1
87 #define CARME_EEPROM_WRITE_DELAY 10
88 #define CARME_EEPROM_READ_DELAY 10
90 #define CARME_ERROR_EEPROM_OVERFLOW CARME_ERROR_EEPROM_BASE + 0
91 #define CARME_ERROR_EEPROM_BUSY CARME_ERROR_EEPROM_BASE + 1
92 
93 #define CARME_EEPROM_I2C_ADDRESS 0xA0
95 /*----- Data types ---------------------------------------------------------*/
96 
97 /*----- Function prototypes ------------------------------------------------*/
98 ERROR_CODES CARME_EEPROM_Write(uint8_t *data, uint8_t nbrOfChar,
99  uint8_t startAddress);
100 ERROR_CODES CARME_EEPROM_Read(uint8_t *recdata, uint8_t nbrOfChar,
101  uint8_t startAddress);
102 
103 /*----- Data ---------------------------------------------------------------*/
104 
105 #ifdef __cplusplus
106 }
107 #endif /* __cplusplus */
108 
114 #endif /* __EEPROM_H__ */
uint8_t ERROR_CODES
Error variable.
Definition: carme.h:255
ERROR_CODES CARME_EEPROM_Write(uint8_t *data, uint8_t nbrOfChar, uint8_t startAddress)
Write an Array of 8-bit data to the Eeprom This Function can take several ms to perfrom. 5ms are needed for a Pagewrite (8 Byte).
Definition: eeprom.c:107
ERROR_CODES CARME_EEPROM_Read(uint8_t *recdata, uint8_t nbrOfChar, uint8_t startAddress)
Read an Array of char to the Eeprom.
Definition: eeprom.c:175
I2C board support package for the CARME module.