keil_examples/I2C/i2c.c
/*****************************************************************************
** Function name:		I2CStop
**
** Descriptions:		Set the I2C stop condition, if the routine
**				never exit, it's a fatal bus error.
**
** parameters:			None
** Returned value:		true or never return
** 
*****************************************************************************/
Function name:         I2CStop
Descriptions:          Set the I2C stop condition, if the routine
never exit, it's a fatal bus error.

None
Returned value:                true or never return
Function name : I2CStop Descriptions : Set the I2C stop condition if the routine never exit it ' s a fatal bus error . None Returned value : true or never return
uint32_t I2CStop( uint32_t portNum )
{
  LPC_I2C[portNum]->CONSET = I2CONSET_STO;       
  LPC_I2C[portNum]->CONCLR = I2CONCLR_SIC;   
  while( LPC_I2C[portNum]->CONSET & I2CONSET_STO );
  return TRUE;
}
uint32_t I2CStop ( uint32_t portNum ) { LPC_I2C [ portNum ] -> CONSET = I2CONSET_STO ; LPC_I2C [ portNum ] -> CONCLR = I2CONCLR_SIC ; while ( LPC_I2C [ portNum ] -> CONSET & I2CONSET_STO ) ; return TRUE ; }
Function name:         I2CStop
Descriptions:          Set the I2C stop condition, if the routine
never exit, it's a fatal bus error.
Function name : I2CStop Descriptions : Set the I2C stop condition if the routine never exit it ' s a fatal bus error .
/* Set Stop flag */ /* Clear SI flag */ /*--- Wait for STOP detected ---*/