This class provides APIs to all of the registers of the TI BQ24295 battery charger chip, as used on the u-blox C030 board. This class is not required to charge a battery connected to the C030 board, charging will begin automatically when a battery is connected. This class is only required if the user wishes to monitor the charger's state or change the charger's settings. The caller should instantiate an I2C interface and pass this to init(), which will initialise the chip and place it into its lowest power state. The chip may then be configured using the API calls. Once the chip is configured, battery charging can be enabled. If battery charging is disabled the chip will once more be put into its lowest power state.
Dependents: example-battery-charger-bq24295 example-C030-out-of-box-demo example-C030-out-of-box-demo Amit
Diff: TESTS/unit_tests/default/main.cpp
- Revision:
- 5:bb17656c9b9d
- Parent:
- 3:340d65a1a133
--- a/TESTS/unit_tests/default/main.cpp Tue Jun 06 13:08:46 2017 +0100 +++ b/TESTS/unit_tests/default/main.cpp Tue Jun 06 15:56:50 2017 +0100 @@ -33,26 +33,12 @@ #define NUM_RAND_ITERATIONS 50 #endif -#ifndef PIN_I2C_SDA -// Default for C030 board -#define PIN_I2C_SDA PC_9 -#endif - -#ifndef PIN_I2C_SDC -// Default for C030 board -#define PIN_I2C_SDC PA_8 -#endif - // ---------------------------------------------------------------- // PRIVATE VARIABLES // ---------------------------------------------------------------- -#ifdef TARGET_UBLOX_C027 -// This required only for UTM board -static DigitalOut gI2CPullUpBar(P1_1, 0); -#endif // I2C interface -I2C * gpI2C = new I2C(PIN_I2C_SDA, PIN_I2C_SDC); +I2C * gpI2C = new I2C(I2C_SDA_B, I2C_SCL_B); // ---------------------------------------------------------------- // TESTS