44 #include "em_device.h" 72 CMU_ClockEnable(cmuClock_I2C0,
true);
73 CMU_ClockEnable(cmuClock_GPIO,
true);
74 CMU_ClockEnable(cmuClock_HFLE,
true);
77 CMU_OscillatorEnable(cmuOsc_LFXO,
true,
true);
80 I2C_Init_TypeDef i2cInit = I2C_INIT_DEFAULT;
82 i2cInit.freq = I2C_FREQ_FAST_MAX;
89 I2C0->ROUTE = I2C_ROUTE_SDAPEN | I2C_ROUTE_SCLPEN;
90 I2C0->ROUTE = (I2C0->ROUTE & (~_I2C_ROUTE_LOCATION_MASK)) |
BUS_I2C_LOC;
98 #if DEBUG_DBPRINT == 1 99 dbinfo(
"I2C initialized.");
int8_t initI2C(void)
I2C initialization (if not already initialized).
signed char int8_t
Typedef defining 8 bit char type. The developer should modify this to suit the platform being deploye...
void dbinfo(char *message)
Print an info string (char array) to USARTx and go to the next line.
The pin definitions for the custom board.
Enable or disable printing to UART with dbprint.