AnsweredAssumed Answered

LIS2DH12 how to use standard ST driver functions:Sensor_IO_Read/Write

Question asked by melt brink on Jul 4, 2017
Latest reply on Sep 28, 2017 by melt brink

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.

Outcomes