Has base BMU code but sends dummy temperature and voltage readings to test CAN
Dependencies: CUER_CAN DS1820 LTC2943 LTC6804 mbed
Fork of BMS_BMUCore_Max by
EEPROM_I2C.h
- Committer:
- lcockerton62
- Date:
- 2016-12-22
- Revision:
- 0:0a5f554d2a16
- Child:
- 1:51477fe4851b
File content as of revision 0:0a5f554d2a16:
#include "mbed.h" #ifndef EEPROM_I2C_H #define EEPROM_I2C_H #define I2C_DATA p9 #define I2C_CLOCK p10 #define ADDRESS_1 0xAF #define ADDRESS_2 0xAE // TODO check did both addresses work /** * Method for writing one byte to the EEPROM * * @param start_address the start address on the EEPROM to read from * @param data_out data to send */ void i2c_write(int start_address,char data_out); /** * Method for reading from the EEPROM * * @param start_address the start address on the EEPROM to read from * */ char i2c_read(int start_address); /** * Method for page writing to the EEPROM * * @param start_address the start address on the EEPROM to write to * @param length the length of data_out * @param data_out data to send * */ void i2c_page_write(int start_address,int length, char data_out[] ); /** * Method for page reading from the EEPROM * * @param start_address the start address on the EEPROM to read from * @param length the length of data_in * @param data_in data to read * */ void i2c_page_read(int start_address,int length, char data_in[]); #endif