示例#1
0
文件: i2c.c 项目: cyysu/AliOS-Things
/**
  * @brief  This function generates I2C start timing.
  * @param  None
  * @return None
  */
void I2cStart(void* I2cMasterHandle)
{
	SetSDA(I2cMasterHandle);
	SetSCL(I2cMasterHandle);
	SetOutputSCL(I2cMasterHandle);
	SetOutputSDA(I2cMasterHandle);

	ClrSDA(I2cMasterHandle);
	ClrSCL(I2cMasterHandle);
}
示例#2
0
文件: i2c.c 项目: cyysu/AliOS-Things
/**
  * @brief  This function generates I2C stop timing.
  * @param  None
  * @return None
  */
void I2cStop(void* I2cMasterHandle)
{
	SetOutputSCL(I2cMasterHandle);
	SetOutputSDA(I2cMasterHandle);

	ClrSDA(I2cMasterHandle);
	SetSCL(I2cMasterHandle);
	SetSDA(I2cMasterHandle);

	SetInputSDA(I2cMasterHandle);
}
示例#3
0
// send STOP signal. 
VOID I2C_Stop(BYTE I2cDevice)
{
//	DBG(("I2C_Stop()\n")); 
	SetOutputSCL(I2cDevice);
	SetOutputSDA(I2cDevice);
	
	ClrSDA(I2cDevice); 	
	KtIICDelay();
	SetSCL(I2cDevice);
	SetSDA(I2cDevice);

	SetInputSDA(I2cDevice);
}
示例#4
0
// send START signal. 
VOID I2C_Start(BYTE I2cDevice)
{
	SetSDA(I2cDevice);
	SetSCL(I2cDevice);
	
	SetOutputSCL(I2cDevice);
	SetOutputSDA(I2cDevice);

	SetSDA(I2cDevice);
	SetSCL(I2cDevice);
	KtIICDelay();
	ClrSDA(I2cDevice);
	ClrSCL(I2cDevice);
}