This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于协议栈的I2C接口的使用

Other Parts Discussed in Thread: Z-STACK

我现在需要使用I2C接口读取传感器的数据,

在Zstack中添加了hal_i2c.c以及hal_i2c.h,

并且在初始化中进行I2C初始化

HalI2CInit();

然后在任务中调用

 HalI2CReceive(uint8 address, uint8 *buf, uint16 len);

HalI2CSend(uint8 address, uint8 *buf, uint16 len);

这两个函数,进行读取数据,但是还是无法读取数据。

HalI2CSend(0x52,0xc0, 1);
HalI2CReceive(0x52, data, 1);

想问问协议栈的I2C接口应该如何使用?