i2c_nuttx:Use BOARD_NUMBER_I2C_BUSES and BOARD_I2C_BUS_CLOCK_INIT

Used the board overrideable vlaues to define the _bus_clocks
   array and initalize it.
This commit is contained in:
David Sidrane
2017-08-07 16:08:19 -10:00
committed by Lorenz Meier
parent 9644f855e3
commit 64aaec4419
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ namespace device
* All calls to init() will NOT set the buss frequency
*/
unsigned int I2C::_bus_clocks[3] = { 100000, 100000, 100000 };
unsigned int I2C::_bus_clocks[BOARD_NUMBER_I2C_BUSES] = BOARD_I2C_BUS_CLOCK_INIT;
I2C::I2C(const char *name,
const char *devname,
+1 -1
View File
@@ -62,7 +62,7 @@ public:
static int set_bus_clock(unsigned bus, unsigned clock_hz);
static unsigned int _bus_clocks[3];
static unsigned int _bus_clocks[BOARD_NUMBER_I2C_BUSES];
protected:
/**