[riot-notifications] [RIOT-OS/RIOT] drivers/adxl362: Initial support for ADXL362 accelerometer (#5744)
notifications at github.com
Sun Sep 10 22:08:10 CEST 2017
I started to work on a possible merge of ADXL362 & ADXL345 (and the whole Analog Devices' portfolio...)
But I'm asking a lot of questions regarding the feasibility of this endeavour :
- First, some accelerometers used SPI only, others I2C only and a bunch of them both I2C & SPI. So a shared driver must handle both SPI & I2C. (The user must select the desired interface).
Should we consider users can use one accelerometer with I2C and another one with SPI ? (driver must used the right interface at runtime) or should we impose one interface during the compilation ?(using #ifdef )
- Another issue is the register map. I did not read all the different datasheets but it seems (AFAIK) that each devices has a different register map. There is nothing to optimize here.
A possible architecture would be a file (adxl_common.c) with a number of basic functions (init, read, interrupt, etc.) with a return NO_SUPPORTED if the feature is not handle by the device. But with this configuration, we must have a specific file per device which must contains wrappers called only by the common file. (If you have any ideas or examples I'm more than interested).
I'm wondering if such a big rework is really worthwhile ?
Any thoughts ?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications