19 lines
496 B
C
19 lines
496 B
C
#ifndef EEPROM_DRIVER_H__
|
|
#define EEPROM_DRIVER_H__
|
|
|
|
#include "common_types.h"
|
|
#include <stdint.h>
|
|
|
|
#define EEPROM_DEV_ADDR 0xA0
|
|
#define EEPROM_PAGE_SIZE 8
|
|
#define EEPROM_TOTAL_SIZE 2048
|
|
|
|
ret_code_t eeprom_init(void);
|
|
ret_code_t eeprom_write(uint16_t addr, const uint8_t *data, uint32_t len);
|
|
ret_code_t eeprom_read(uint16_t addr, uint8_t *data, uint32_t len);
|
|
ret_code_t eeprom_get_last_error(void);
|
|
uint8_t eeprom_is_initialized(void);
|
|
void eeprom_reset_status(void);
|
|
|
|
#endif
|