This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trying to add LED calls to DK project

As a test of how to add a library to a project, I am trying to add access to this library http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/include/dk_buttons_and_leds.html to the light sensor example here https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0#h166sjwm56wzcmgvd418wzzus1esk5n3

From what I can determine, to add the ability to call functions from a library to your project, you need to add a CONFIG_... define to your project.conf file, but I can't figure out what the CONFIG_... define is for the DK_button_and_LEDs library (or any other for that matter.) I tried just adding a call to dk_leds_init(); and an include of #include <dk_buttons_and_leds.h> to the light intensity controller main.c file, but the project won't link.

Please advise how to add support from a given library to your project in general (how do you find the CONFIG_ define required if that is the issue?) Also, please provide the specific advice for the button and LEDs library. Thanks.

Parents Reply Children
No Data
Related