All,
Where are the sources used to build the wiringX library used by the duo-sdk. The current sdk only includes a wiringx.h
header and a shared library duo-sdk/rootfs/usr/lib/wiringx.so
. Further, there is no source provided in the buildroot as it includes the compiled shared-object library, e.g. /buildroot-2021.05/package/wiringx/src/libwiringx.so
This is not the general version of wiringX on github or the radxa variant because it includes the following functions not included in either of the other repositories:
int wiringXSetPWMPeriod(int pin, long period);
int wiringXSetPWMDuty(int pin, long duty_cycle);
int wiringXSetPWMPolarity(int pin, int polarity);
int wiringXPWMEnable(int pin, int enable);
I need the actual source so I can add a routine to read a set number of bytes from an I2C address on the Inversense MPU9250. Currently the wiringx library included in the sdk only provides:
int wiringXI2CReadReg8(int fd, int reg);
int wiringXI2CReadReg16(int fd, int reg);
This does not accommodate reading an arbitrary number of bytes from device register such as the 7, 8 or 512 bytes of data needed to read the linear and angular acceleration with/without the temperature or reading from the MPU FIFO. I need to be able to specify a wiringXI2CReadReg(int fd, int reg, uint8_t *buf, int length);
to accommodate the chip without having to loop providing an offset - which would be awkward at best, unreliable at the other end of the scale.
In fact, all that really needs to be done is to expose the wiringX i2c_smbus_access()
function that is wrapped within the wiringXI2CReadReg8()
and wiringXI2CReadReg16()
functions that are available. The wiringX source already contains:
extern inline __s32 i2c_smbus_access(int fd, char rw, int cmd, int size, union i2c_smbus_data *data);
It appears simply exposing the i2c_smbus_access()
woulds expose a read/write with the size
parameter allowing a single read of the 512 byte FIFO instead of having to make 512 calls to wiringXI2CReadReg8()
which would destroy the efficiency of the read.
Where is the source for /buildroot-2021.05/package/wiringx/src/libwiringx.so
so I can modify and build that along with the image?