nrf5/bluetooth: Guarding implementation against being linked in by surrounding it with BLUETOOTH_SD flag. Flag is only set if SD=<sdname> parameter is provided during make.
This commit is contained in:
parent
4676e5900b
commit
e69e47bc24
@ -24,6 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if BLUETOOTH_SD
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
@ -1003,3 +1005,5 @@ void SWI2_EGU2_IRQHandler(void) {
|
||||
ble_evt_handler((ble_evt_t *)m_ble_evt_buf);
|
||||
} while (err_code != NRF_ERROR_NOT_FOUND && err_code != NRF_SUCCESS);
|
||||
}
|
||||
|
||||
#endif // BLUETOOTH_SD
|
||||
|
@ -27,6 +27,8 @@
|
||||
#ifndef BLUETOOTH_LE_DRIVER_H__
|
||||
#define BLUETOOTH_LE_DRIVER_H__
|
||||
|
||||
#if BLUETOOTH_SD
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@ -120,4 +122,6 @@ bool ble_drv_discover_characteristic(mp_obj_t obj,
|
||||
|
||||
void ble_drv_discover_descriptors(void);
|
||||
|
||||
#endif // BLUETOOTH_SD
|
||||
|
||||
#endif // BLUETOOTH_LE_DRIVER_H__
|
||||
|
@ -24,6 +24,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if BLUETOOTH_SD
|
||||
|
||||
#include <string.h>
|
||||
#include "ble_uart.h"
|
||||
#include "ringbuffer.h"
|
||||
@ -263,3 +265,4 @@ bool ble_uart_enabled(void) {
|
||||
|
||||
#endif // MICROPY_PY_BLE_NUS
|
||||
|
||||
#endif // BLUETOOTH_SD
|
||||
|
@ -27,6 +27,8 @@
|
||||
#ifndef BLUETOOTH_LE_UART_H__
|
||||
#define BLUETOOTH_LE_UART_H__
|
||||
|
||||
#if BLUETOOTH_SD
|
||||
|
||||
#include "modubluepy.h"
|
||||
#include "ble_drv.h"
|
||||
|
||||
@ -34,4 +36,7 @@ void ble_uart_init0(void);
|
||||
void ble_uart_advertise(void);
|
||||
bool ble_uart_connected(void);
|
||||
bool ble_uart_enabled(void);
|
||||
|
||||
#endif // BLUETOOTH_SD
|
||||
|
||||
#endif // BLUETOOTH_LE_UART_H__
|
||||
|
Loading…
x
Reference in New Issue
Block a user