Skip to content

Commit 1cea5d2

Browse files
committed
Add support for RBL nRF52832 boards
1 parent e8c2be4 commit 1cea5d2

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/nRF51822.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@
1111
#include <ble.h>
1212
#include <ble_hci.h>
1313
#include <nrf_sdm.h>
14+
#elif defined(NRF52) && defined(S132) // ARDUINO_RBL_nRF52832
15+
#ifndef ARDUINO_RBL_nRF52832
16+
#define ARDUINO_RBL_nRF52832
17+
#endif
18+
19+
#include <sdk/softdevice/s132/headers/nrf_ble.h>
20+
#include <sdk/softdevice/s132/headers/nrf_ble_hci.h>
21+
#include <sdk/softdevice/s132/headers/nrf_sdm.h>
1422
#else
1523
#include <s110/ble.h>
1624
#include <s110/ble_hci.h>
1725
#include <s110/nrf_sdm.h>
1826
#endif
1927

20-
#if defined(NRF5) || defined(NRF51_S130)
28+
#if defined(NRF5) || defined(NRF51_S130) || defined(ARDUINO_RBL_nRF52832)
2129
uint32_t sd_ble_gatts_value_set(uint16_t handle, uint16_t offset, uint16_t* const p_len, uint8_t const * const p_value) {
2230
ble_gatts_value_t val;
2331

src/nRF51822.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
#include <ble_gatts.h>
1212
#include <ble_gattc.h>
1313
#include <nrf_soc.h>
14+
#elif defined(NRF52) && defined(S132) // ARDUINO_RBL_nRF52832
15+
#ifndef ARDUINO_RBL_nRF52832
16+
#define ARDUINO_RBL_nRF52832
17+
#endif
18+
#define NRF5
19+
20+
#include <sdk/softdevice/s132/headers/nrf_ble_gatts.h>
21+
#include <sdk/softdevice/s132/headers/nrf_ble_gattc.h>
22+
#include <sdk/softdevice/s132/headers/nrf_soc.h>
1423
#else
1524
#include <s110/ble_gatts.h>
1625
#include <s110/ble_gattc.h>

0 commit comments

Comments
 (0)