Hi, I am trying to write a driver to communicate to the BMA456 from Cypress's CYBLE 212006-01 through SPI. I have been using your API provided here:
I am writing the bus_read and bus_write functions, and I keep seeing dev-> intf_ptr. Do I need to initialize this pointer to something? I am just confused as to what this pointer should be doing. I know it is part of the device struct, but I do not see any examples using this pointer.
This line of code is from bma4.c : dev->intf_rslt = dev->bus_write(addr, data, len, dev->intf_ptr);
Any help on this would be great, thank you.
Solved! Go to Solution.
There is some example code as below generic folder.
Regarding intf, please check bma4_interface_selection function in bma4_common.c.