/* Read data with special length in slave mode through the I2Cx peripheral.  */
void I2C_SlaveRead(I2C_TypeDef *I2Cx, u8 *pBuf, u8 len)
/* Read data with special length in slave mode through the I2Cx peripheral.  */
void I2C_SlaveRead(I2C_TypeDef *I2Cx, u8 *pBuf, u8 len)
{
	u8 cnt = 0;
	assert_param(IS_I2C_ALL_PERIPH(I2Cx));
	for(cnt = 0; cnt < len; cnt++) {
		while((I2C_CheckFlagState(I2Cx, (BIT_IC_STATUS_RFNE | BIT_IC_STATUS_RFF))) == 0);
		*pBuf++ = (u8)I2Cx->IC_DATA_CMD;
	}
}