../packages/pcf8574-latest/pcf8574.c: In function 'pcf8574_port_read':
../packages/pcf8574-latest/pcf8574.c:25:29: error: dereferencing pointer to incomplete type 'struct rt_i2c_bus_device'
rt_device_read(&dev->bus->parent, dev->i2c_addr, &value, 1);
^~
../packages/pca9685-latest/pca9685.c: In function 'pca9685_restart':
../packages/pca9685-latest/pca9685.c:208:22: warning: 'reg' is used uninitialized in this function [-Wuninitialized]
if ((reg & 0x80) != 0)
make: *** [packages/pcf8574-latest/subdir.mk:21: packages/pcf8574-latest/pcf8574.o] Error 1
make: *** Waiting for unfinished jobs....
"make -j20 all" terminated with exit code 2. Build might be incomplete.
里面的读写使用的是rt_device_read(&dev->bus->parent, dev->i2c_addr, &value, 1);
而不是rt_i2c_transfer((struct rt_i2c_bus_device *)dev->bus, &msgs, 1)
被遗忘更新了?
更多回帖