Hello everyone!
I am trying to figure out how SPI drivers for Bosch bme280 sensor work... I would like to somehow recycle them to write my own SPI drivers for another device (an adc from Texas Instruments).
I am currently looking at "bme280_spi.c" (you can find it in /zephyr/drivers/sensor/bme280). I really don't get what is the purpose of the "buf" pointer passed as an input argument to the function bme280_reg_read_spi. Moreover, rx_buf[1].buf = &buf[1]: what does that mean?
Can you please me help me articulating a little bit more about the purpose of the "buf" pointer? And do you know why rx_buf has size 2?
Here's the code fragment I am struggling with:
Thanks to everyone in advance!