slave device using is IQS333触摸传感器。在那里我无法正确地沟通。
以下是代码片段,请解释在就绪字节函数
中工作的
SEND_I2C_COMMAND (0 x0100);//设置R/W位为1(读访问)
WAIT_FOR_RECEIVED_BYTE (); // Wait for received data
and i2c_eeprom_error_code
i2c_eeprom_error_code i2c_wait_until_i2c_eeprom_ready(void)
{
uint16_t ui16tx_abrt_source;
// Check if ACK is received
for (uint32_t ui32Indx = 0; ui32Indx < I2C_MAX_RETRIES; ui32Indx++)
{
SEND_I2C_COMMAND(0x08); // Make a dummy access
WAIT_UNTIL_I2C_FIFO_IS_EMPTY(); // Wait until Tx FIFO is empty
WAIT_UNTIL_NO_MASTER_ACTIVITY(); // Wait until no master activity
ui16tx_abrt_source = GetWord16(I2C_TX_ABRT_SOURCE_REG); // Read the I2C_TX_ABRT_SOURCE_REG register
GetWord16(I2C_CLR_TX_ABRT_REG); // Clear I2C_TX_ABRT_SOURCE register
if ((ui16tx_abrt_source & ABRT_7B_ADDR_NOACK) == 0)
{
return I2C_NO_ERROR;
}
}
return I2C_7B_ADDR_NOACK_ERROR;
}
above attached snippet.
Urgent help need.
Thanks and Regards
Rohit
我有点困惑如何实现以上sleep_mode任务。谁能帮我完成我的任务?< / p > < p >感谢和问候Rohit < / p > < br / > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords /睡眠模式”“=”skos:概念”属性= " rdfs: label skos:prefLabel" datatype="">sleep mode