ciaa-nxp/board_ciaa_edu_4337/src/board.c
/* Set I2C mode to polling/interrupt */
Set I2C mode to polling/interrupt
Set I2C mode to polling / interrupt
static void i2c_set_mode(I2C_ID_T id, int polling)
{
	if (!polling) {
		Chip_I2C_SetMasterEventHandler(id, Chip_I2C_EventHandler);
		NVIC_EnableIRQ(id == I2C0 ? I2C0_IRQn : I2C1_IRQn);
	}
	else {
		NVIC_DisableIRQ(id == I2C0 ? I2C0_IRQn : I2C1_IRQn);
		Chip_I2C_SetMasterEventHandler(id, Chip_I2C_EventHandlerPolling);
	}
}
static void i2c_set_mode ( I2C_ID_T id , int polling ) { if ( ! polling ) { Chip_I2C_SetMasterEventHandler ( id , Chip_I2C_EventHandler ) ; NVIC_EnableIRQ ( id == I2C0 ? I2C0_IRQn : I2C1_IRQn ) ; } else { NVIC_DisableIRQ ( id == I2C0 ? I2C0_IRQn : I2C1_IRQn ) ; Chip_I2C_SetMasterEventHandler ( id , Chip_I2C_EventHandlerPolling ) ; } }
Set I2C mode to polling/interrupt
Set I2C mode to polling / interrupt
//mode_poll &= ~(1 << id); //mode_poll |= 1 << id;