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

How to Add a UART feature to sdk_config.h of ble_app_hrs ?

Hello.

I am evaluating with nRF52833 DK board.  I checked both peripheral/uart and ble_peripheral/ble_app_hrs.

Examples work each well on nRF52833 DK.  I want to add the UART function to ble_app_hrs.

I do the follow steps:

1) Modified the source code - add a UART initialize code, include files and a test code.

2) Add the existed files: nRF_Libraries/app_fifo.c ... include other files.

3) Insert the include folders in the common options.

4) Add the below code to sdk_config.h.

// <q> APP_FIFO_ENABLED  - app_fifo - Software FIFO implementation
 

#ifndef APP_FIFO_ENABLED
#define APP_FIFO_ENABLED 1
#endif

// <e> APP_UART_ENABLED - app_uart - UART driver
//==========================================================
#ifndef APP_UART_ENABLED
#define APP_UART_ENABLED 1
#endif
// <o> APP_UART_DRIVER_INSTANCE  - UART instance used
 
// <0=> 0 

#ifndef APP_UART_DRIVER_INSTANCE
#define APP_UART_DRIVER_INSTANCE 0
#endif

// </e>

Anyway, The compile succeeded. 

I have a question on step 4. I added the upper boxed code manually.

How to insert the defined code automatically or smarter?

How to know the relative feature? or How to get sdk_config.h include all feature?

In the beginning, I missed a APP_FIFO_ENABLED part in sdk_config.h.

I fixed it in while compiling, after show the error message.

Please give a advice to me.

Regards,

HyunSuk Lee

Related