void LPI2C2_InitPins(void)
{
/* Enables the clock for PORT2: Enables clock */
CLOCK_EnableClock(kCLOCK_Port2);
const port_pin_config_t port2_4_pinP1_config = {/* Internal pull-up resistor is enabled */
kPORT_PullUp,
/* Low internal pull resistor value is selected. */
kPORT_LowPullResistor,
/* Fast slew rate is configured */
kPORT_FastSlewRate,
/* Passive input filter is disabled */
kPORT_PassiveFilterDisable,
/* Open drain output is enabled */
kPORT_OpenDrainEnable,
/* Low drive strength is configured */
kPORT_LowDriveStrength,
/* Pin is configured as FC2_P0 */
kPORT_MuxAlt2,
/* Digital input enabled */
kPORT_InputBufferEnable,
/* Digital input is not inverted */
kPORT_InputNormal,
/* Pin Control Register fields [15:0] are not locked */
kPORT_UnlockRegister};
/* PORT2_4 (pin P1) is configured as FC2_P0 */
PORT_SetPinConfig(PORT2, 4U, &port2_4_pinP1_config);
const port_pin_config_t port2_3_pinP2_config = {/* Internal pull-up resistor is enabled */
kPORT_PullUp,
/* Low internal pull resistor value is selected. */
kPORT_LowPullResistor,
/* Fast slew rate is configured */
kPORT_FastSlewRate,
/* Passive input filter is disabled */
kPORT_PassiveFilterDisable,
/* Open drain output is enabled */
kPORT_OpenDrainEnable,
/* Low drive strength is configured */
kPORT_LowDriveStrength,
/* Pin is configured as FC2_P1 */
kPORT_MuxAlt2,
/* Digital input enabled */
kPORT_InputBufferEnable,
/* Digital input is not inverted */
kPORT_InputNormal,
/* Pin Control Register fields [15:0] are not locked */
kPORT_UnlockRegister};
/* PORT2_3 (pin P2) is configured as FC2_P1 */
PORT_SetPinConfig(PORT2, 3U, &port2_3_pinP2_config);
}
But the i2c cannot function.
Are there anything I am missing?
Please comment.
Thanks
Carl