I am trying to set up the LPS22HB sensor with an nRF52840. I am starting with the twi_sensor example(SDK16->examples->peripherals->twi_sensor) and adding the lps22hb example code from the SDK(SDK16->Components->drivers_ext->lps22hb)
I have added lps22hb.c, lps22hb.h, and lps22hb_internal.h to my the twi_sensor example.
The first instruction in lps22hb.h says "Sensor instance has to be defined first in global context using @ref LPS22HB_INSTANCE DEF."
I think that means to create an instance using the macro on line 163 in lps22hb.h
#define LPS22HB_INSTANCE_DEF(_lps22hb_inst_name, _p_twi_sensor, _sensor_address) \ LPS22HB_INTERNAL_INSTANCE_DEF(_lps22hb_inst_name, _p_twi_sensor, _sensor_address)
I'm not sure what arguments use when I call the function. I know the sensor address is 0x5D, but I don't know what to put in for the first two.
I'm also not sure what I'm getting back from the function call. What is the syntax I should use when calling the function?
If anyone could give me some pointers on calling this function that would be great!
Thank you