2017-07-04 03:03 AM
Goodday. Im trying out the ST standard component driver for LIS2DH12 (LIS2DH12_ACC_driver.c) I have added it to my project but compiler kicks out a undefined symbol error. Which is what I would expect as I have not defined any of the below.
extern uint8_t Sensor_IO_Read(void *handle, uint8_t ReadAddr, uint8_t *pBuffer, uint16_t nBytesToRead);
extern uint8_t Sensor_IO_Write(void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite);
Im trying to figure out what is required of me to define and where? I can see its an I2C R/W function with certain unsigned int's that needs to be used in that order to read and write, but I have no idea how to declare these in main.c or how to call these in conjunction with the standard I2C.c in stdPeriph_driver library.
these two functions are nowhere else in the driver so do I need to write my own?
any explanation or direction would be greatly appreciated.
#accelerometer-lis2dh12-configure2017-07-19 03:10 AM
brink.melt
you can add attachment (for example .c file) If you reply to the post click on 'Use advanced editor' then you can add the attachment.2017-08-10 09:46 AM
to whom will download the zip file in the future,
that will prove indeed useful, under some clarifications:
2017-09-28 05:08 AM
I have attached a spreadsheet on some configurations I have tested on the LIS2DH In case someone can use it in future.
These include
1. Single click configuration
2. Double click configuration
3. Free fall setup
4. XYZ movement setup with and without HP filter.
Feel free to correct or add to the spreadsheet.
________________ Attachments : accel config.xlsx : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyOx&d=%2Fa%2F0X0000000b77%2FZQlWYeclYsJyCpdSApVytAvgoQI2naEdpgmLOo65Soo&asPdf=false