Skip to content

Commit

Permalink
Add compile guards to new controller files to prevent compiler errors…
Browse files Browse the repository at this point in the history
… with esp and ext advertising.
  • Loading branch information
h2zero committed Feb 26, 2024
1 parent 5ca40d3 commit 0f4ae66
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nimble/nimble/controller/src/ble_ll_hci_vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

#ifndef ESP_PLATFORM

#include <stdint.h>
#include "nimble/porting/nimble/include/syscfg/syscfg.h"
#include "../include/controller/ble_ll.h"
Expand Down Expand Up @@ -339,3 +341,5 @@ ble_ll_hci_vs_init(void)
}

#endif

#endif /* !ESP_PLATFORM */
4 changes: 4 additions & 0 deletions src/nimble/nimble/controller/src/ble_ll_scan_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

#ifndef ESP_PLATFORM

#include "nimble/porting/nimble/include/syscfg/syscfg.h"

#if MYNEWT_VAL(BLE_LL_ROLE_OBSERVER) && MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
Expand Down Expand Up @@ -1761,3 +1763,5 @@ ble_ll_scan_aux_init(void)
}

#endif /* BLE_LL_CFG_FEAT_LL_EXT_ADV */

#endif /* !ESP_PLATFORM */
4 changes: 4 additions & 0 deletions src/nimble/nimble/drivers/nrf51/src/ble_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
#error LE Coded PHY cannot be enabled on nRF51
#endif

#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif

/* XXX: 4) Make sure RF is higher priority interrupt than schedule */

/*
Expand Down
4 changes: 4 additions & 0 deletions src/nimble/nimble/drivers/nrf52/src/ble_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
#endif
#endif

#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif

#if BABBLESIM
extern void tm_tick(void);
#endif
Expand Down

0 comments on commit 0f4ae66

Please sign in to comment.