fix(nimble): Address compilation issues in nimble examples

This commit is contained in:
Rahul Tank
2025-10-30 10:54:07 +05:30
parent 4538733010
commit 8fd41d86c4
2 changed files with 13 additions and 4 deletions
@@ -25,6 +25,8 @@
#if MYNEWT_VAL(ENC_ADV_DATA)
#include "host/ble_ead.h"
#endif
#include "esp_nimble_cfg.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -50,15 +52,22 @@ typedef void (ble_svc_gap_chr_changed_fn) (uint16_t uuid);
void ble_svc_gap_set_chr_changed_cb(ble_svc_gap_chr_changed_fn *cb);
const char *ble_svc_gap_device_name(void);
int ble_svc_gap_device_name_set(const char *name);
uint16_t ble_svc_gap_device_appearance(void);
#ifdef CONFIG_BT_NIMBLE_GAP_SERVICE
void ble_svc_gap_init(void);
int ble_svc_gap_device_name_set(const char *name);
const char *ble_svc_gap_device_name(void);
int ble_svc_gap_device_appearance_set(uint16_t appearance);
#if MYNEWT_VAL(ENC_ADV_DATA)
int ble_svc_gap_device_key_material_set(uint8_t *session_key, uint8_t *iv);
#endif
void ble_svc_gap_init(void);
#else
#include "ble_svc_gap_stub.h"
#endif
void ble_svc_gap_deinit(void);
#ifdef __cplusplus
+1 -1
View File
@@ -25,7 +25,7 @@
#include "services/gap/ble_svc_gap.h"
#include "os/endian.h"
#if MYNEWT_VAL(BLE_GATTS)
#if MYNEWT_VAL(BLE_GATTS) && CONFIG_BT_NIMBLE_GAP_SERVICE
#define PPCP_ENABLED \
MYNEWT_VAL(BLE_ROLE_PERIPHERAL) && \