V1.13
This commit is contained in:
@ -9,10 +9,22 @@
|
||||
#define INC_EEPROM_H_
|
||||
|
||||
#include <stm32f3xx_hal.h>
|
||||
#include "ADBMS_LL_Driver.h"
|
||||
#include "soc_estimation.h"
|
||||
#include <state_machine.h>
|
||||
#include "stm32f3xx_hal_def.h"
|
||||
#include "stm32f3xx_hal_i2c.h"
|
||||
#include "TMP1075.h"
|
||||
|
||||
// see Datasheet for these values
|
||||
#define EEPROM_I2C_ADDR 0xA4 // 0xA4 for the the first 2⁸ addresses and 0xA6 for the the last 2⁸ addresses
|
||||
#define EERROM_MEMORY_ADDR_SIZE 2 // it is controlled by A17 in the address Byte, see datasheet
|
||||
#define EEPROM_MEMORY_SIZE 131072 // in bytes
|
||||
#define EEPROM_PAGE_SIZE 32 // in bytes
|
||||
|
||||
extern uint32_t write_address, read_address;
|
||||
|
||||
void eeprom_init(I2C_HandleTypeDef* hi2c);
|
||||
void eeprom_dump_status();
|
||||
void eeprom_write_status();
|
||||
|
||||
HAL_StatusTypeDef eeprom_read(uint8_t* data, uint16_t data_length);
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "ADBMS_LL_Driver.h"
|
||||
#include <AMS_HighLevel.h>
|
||||
#include <can.h>
|
||||
#include <eeprom.h>
|
||||
#include <errors.h>
|
||||
#include <PWM_control.h>
|
||||
|
||||
Reference in New Issue
Block a user