I2C API I2C time-out feature

//timeout: Timeout time value. Specifies thetimeout interval value in increments of-->
// 16 I2C function clocks (Min value is 16).-->
//				 if timeout = 0,  timeout feature is disabled-->
//         if timeout != 0, time value is timeout*16 i2c functionclock.-->
ErrorCode_t i2c_set_timeout(I2C_HANDLE_T*  h_i2c, uint32_ttimeout)-->
{-->
  I2C_DRIVER_TypeDef *h ;		  // declare pointer to i2c structure[handle]-->
  h = (I2C_DRIVER_TypeDef*) h_i2c ;   //assign handle pointeraddress-->
	if (timeout != 0){-->
		h->i2c_base->TimeOut = (timeout - 1)<<4;-->
		// Enable timeout feature-->
		h->i2c_base->CFG |= BI2C_TIMEOUT_EN;-->
	}-->
	else-->
		// disable timeout feature-->
		h->i2c_base->CFG &= ~BI2C_TIMEOUT_EN;-->
		return(LPC_OK) ;-->
}//i2c_set_timeout-->

-->