Integrating Adafruit Library with Zephyr on nRF52

Hi everyone,

I am currently working on a project using the Zephyr RTOS on an nRF52 board and I'm looking to integrate the Adafruit library into my project. Most of the Adafruit libraries are developed for Arduino and use C++, while the example code for Zephyr and nRF52 typically uses C.

I'm wondering if there are any tutorials or guides available that can help with integrating Adafruit libraries into a Zephyr project on the nRF52 platform. Any pointers on handling the differences between C and C++ in this context would also be greatly appreciated.

Thank you for your assistance!

Parents Reply
  • oliver0804 said:
    1. The course mentions how to build Zephyr custom driver code, in fact, I don't need to build the driver, the introduction may just be a library of algorithms.

    You don't need to build new drivers but you will need to port whatever driver that is not in Zephyr. Depending on what driver you need, I would recommend checking the libraries available in Zephyr first. There might already be support. 

    oliver0804 said:
    2. I have found github.com/.../prj.conf
    This github guide shows how to do cpp compilation, but what I want is to keep using main.c, not to change to main.cpp, and only call libraries use cpp.

    If the library/driver is not available in Zephyr OS, then you will need to port it. 

    You might get a better answer on this question in the Zephyr community on Discord

Children
No Data
Related