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 CUER

Committer:
DasSidG
Date:
Sun Jul 02 11:25:37 2017 +0000
Revision:
15:e901aff1f5b3
Parent:
1:51477fe4851b
Added temperature probe initialization

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lcockerton62 0:0a5f554d2a16 1 #include "mbed.h"
lcockerton62 0:0a5f554d2a16 2
lcockerton62 0:0a5f554d2a16 3 #ifndef EEPROM_I2C_H
lcockerton62 0:0a5f554d2a16 4 #define EEPROM_I2C_H
lcockerton62 0:0a5f554d2a16 5
lcockerton62 0:0a5f554d2a16 6 #define I2C_DATA p9
lcockerton62 0:0a5f554d2a16 7 #define I2C_CLOCK p10
lcockerton62 0:0a5f554d2a16 8 #define ADDRESS_1 0xAF
lcockerton62 0:0a5f554d2a16 9 #define ADDRESS_2 0xAE // TODO check did both addresses work
lcockerton62 0:0a5f554d2a16 10
lcockerton62 1:51477fe4851b 11 /**
lcockerton62 1:51477fe4851b 12 * Method for writing one byte to the EEPROM
lcockerton62 1:51477fe4851b 13 *
lcockerton62 1:51477fe4851b 14 * @param start_address the start address on the EEPROM to read from
lcockerton62 1:51477fe4851b 15 * @param data_out data to send
lcockerton62 1:51477fe4851b 16 */
lcockerton62 1:51477fe4851b 17 /* Dont think this will be used
lcockerton62 0:0a5f554d2a16 18 void i2c_write(int start_address,char data_out);
lcockerton62 1:51477fe4851b 19 */
lcockerton62 1:51477fe4851b 20 /**
lcockerton62 1:51477fe4851b 21 * Method for reading from the EEPROM
lcockerton62 1:51477fe4851b 22 *
lcockerton62 1:51477fe4851b 23 * @param start_address the start address on the EEPROM to read from
lcockerton62 1:51477fe4851b 24 *
lcockerton62 1:51477fe4851b 25 */
lcockerton62 1:51477fe4851b 26 /*Dont think this will be used
lcockerton62 0:0a5f554d2a16 27 char i2c_read(int start_address);
lcockerton62 1:51477fe4851b 28 */
lcockerton62 1:51477fe4851b 29 /**
lcockerton62 1:51477fe4851b 30 * Method for page writing to the EEPROM
lcockerton62 1:51477fe4851b 31 *
lcockerton62 1:51477fe4851b 32 * @param start_address the start address on the EEPROM to write to
lcockerton62 1:51477fe4851b 33 * @param length the length of data_out
lcockerton62 1:51477fe4851b 34 * @param data_out data to send
lcockerton62 1:51477fe4851b 35 *
lcockerton62 1:51477fe4851b 36 */
lcockerton62 1:51477fe4851b 37 void i2c_page_write(uint16_t start_address,int length, char data_out[] );
lcockerton62 0:0a5f554d2a16 38
lcockerton62 1:51477fe4851b 39 /**
lcockerton62 1:51477fe4851b 40 * Method for page reading from the EEPROM
lcockerton62 1:51477fe4851b 41 *
lcockerton62 1:51477fe4851b 42 * @param start_address the start address on the EEPROM to read from
lcockerton62 1:51477fe4851b 43 * @param length the length of data_in
lcockerton62 1:51477fe4851b 44 * @param data_in data to read
lcockerton62 1:51477fe4851b 45 *
lcockerton62 1:51477fe4851b 46 */
lcockerton62 1:51477fe4851b 47 void i2c_page_read(uint16_t start_address,int length, char data_in[]);
lcockerton62 0:0a5f554d2a16 48
lcockerton62 0:0a5f554d2a16 49 #endif