host/mesh: define Low Latency mode for non-NimBLE controller

This fixes build for porting
This commit is contained in:
Krzysztof Kopyściński
2021-10-25 13:03:08 +02:00
committed by Krzysztof Kopyściński
parent 039e3ca80e
commit 04d723ed05
2 changed files with 12 additions and 1 deletions
+7 -1
View File
@@ -22,6 +22,12 @@
/* Convert from ms to 0.625ms units */
#define ADV_SCAN_UNIT(_ms) ((_ms) * 8 / 5)
#if (MYNEWT_VAL(BSP_NRF51) && !MYNEWT_VAL(BLE_CONTROLLER))
#define CONFIG_BT_CTLR_LOW_LAT 1
#else
#define CONFIG_BT_CTLR_LOW_LAT 0
#endif
/* Pre-5.0 controllers enforce a minimum interval of 100ms
* whereas 5.0+ controllers can go down to 20ms.
*/
@@ -83,7 +89,7 @@ static inline void adv_send(struct os_mbuf *buf)
* amount of scan window duration to compensate for the blocked
* advertising events.
*/
if (MYNEWT_VAL(BSP_NRF51)) {
if (CONFIG_BT_CTLR_LOW_LAT) {
duration += BT_MESH_SCAN_WINDOW_MS;
}
#endif
@@ -1013,6 +1013,11 @@
#define MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_SIZE (4)
#endif
#ifndef MYNEWT_VAL_BSP_NRF51
#define MYNEWT_VAL_BSP_NRF51 (0)
#endif
/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV
#define MYNEWT_VAL_BLE_MESH_PB_ADV (1)