Re: using low level sensor drivers directly, without sensor API


Martin Schröder
 

Hi Rudolph, 

If you want to configure FIFO it would make the most sense to do so in the adxl driver. So just modify the driver, perhaps add a boolean dts option for the functionality and then create a pull request to get that functionality accepted into and managed by the main project. 

On Mon, 10 May 2021 at 15:12, Rudolph Aschmoneit <rudolph.aschmoneit@...> wrote:
Hey all,

I'm quite new to Zephyr, and I have definitely not yet understood all the concepts in their full depth. So please excuse me if my question seems a little bit stupid. Is it possible to use the functions of low level sensor drivers directly, without using the sensor API? About the background: I want to use the ADXL372 Sensor in Instant On mode. There is no Kconfig Macro for this. I also do not see any possibility to set the sensor to this mode or configure his FIFO accordingly using the Sensor API. But I found the functions I need in the driver implementation of the sensor (adxl372.c) But I can not use them (they’re definitions are not mentioned in adxl372.h and when I try to add it there, removing the static attribute in their adxl372.c declaration and adding them in the .h file everything becomes very unstable.) So it seems to me, that it is not intended by Zephyr to use this functions in my Applications. And of course I don’t want to write something into the original driver files, this was just for a short test.

I am very grateful for any kind of advice or suggestion!

Thank you a lot in Advance

Best Regards
Rudolph



--
Best regards,

Martin Schröder
Consultant

Join {devel@lists.zephyrproject.org to automatically receive all group messages.