Jeff Langballe <Jeff.langballe@...>
Is there a BMX160 driver in the works? I see that there are drivers for the BMI160 and the BMM150 but nothing for the BMX160. Even Bosch does not provide a driver for the BMX160. Instead they say to use the BMI160 and BMM150 drivers with some modifications. Is there something like this with the Zephyr implementations of the two drivers? If there’s nothing existing, what are some of the resources I should be looking at before I begin hacking away at this with my very, very limited experience.
toggle quoted messageShow quoted text
I can't speak of in progress drivers.
The best way to understand how to create drivers in zephyr, in my experience so far, is to look at the current drivers. That said if the devices really are that similar you might might be best served by adding a Kconfig option to select which device is actually there. Then wrap certain sections of the driver code in the appropriate ifdefs. Doing that is probably easier than creating a whole new driver.
If you understand C, I2C/SPI, you should be able to dig in pretty quickly. If you run into something you don't understand and want quicker responses then ask on Slack.
Do note that Zephyr has contribution guides if you'd like to upstream your patch, I recommend you look at those and keep a close eye on the checkpatch.pl (patch linter) results as the number of warnings and errors from it can get quite large quite fast if you aren't used to the styling it wants.
On Tue, Sep 17, 2019 at 2:03 PM Jeff Langballe <Jeff.langballe@...> wrote: