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

sdk 14.0 ble nus uart example - error

Hello,

I have been playing with sdk 14.0 examples for a while and I wanted to try the Nordic UART ble_app_uart using multiple files (ble init, advertising, sdh separate from main.c) and I have been running into some errors:

In file included from drivers/drv_ble.h:22:0,
                 from app/main.c:10:
../../sdk/140/components/ble/ble_advertising/ble_advertising.h:178:5: error: unknown type name 'ble_gap_whitelist_t'
     ble_gap_whitelist_t m_whitelist =
     ^
../../sdk/140/components/ble/ble_advertising/ble_advertising.h:178:37: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
     ble_gap_whitelist_t m_whitelist =
                                     ^

and the contents of the drv_ble.h header file is:

#define BLE_GAP_WHITELIST_IRK_MAX_COUNT		8

#include "drv_std.h"
#include <ble.h>
#include <ble_nus.h>
#include <nrf_sdh.h>
#include <nrf_sdh_soc.h>
#include <nrf_sdh_ble.h>
#include <nrf_ble_gatt.h>
#include <ble_hci.h>
#include <ble_advdata.h>
#include <ble_advertising.h>
#include <ble_conn_params.h>

The main.c contains only a reference to ble_init() which is an empty function. The Makefile has the same contents as the PCA10040 example. I did a grep lookup Inside the sdk folder for the "ble_gap_whitelist_t" and found only this:

image description

What am I missing here? Why don't I get that error when compiling the original example?

Related