mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-28 05:47:45 +00:00
nimble/ll: Replace BLE_NUM_COMP_PKT_RATE with an interval in ms
Using an OS specific define in MYNEWT_VAL can be cumbersome when porting to other systems. Replace this value with universal interval in milliseconds.
This commit is contained in:
@@ -264,7 +264,7 @@ ble_ll_conn_num_comp_pkts_event_send(struct ble_ll_conn_sm *connsm)
|
||||
* (i.e. enqueued in a connection state machine).
|
||||
*/
|
||||
if ((ble_npl_stime_t)(ble_npl_time_get() - g_ble_ll_last_num_comp_pkt_evt) <
|
||||
MYNEWT_VAL(BLE_NUM_COMP_PKT_RATE)) {
|
||||
ble_npl_time_ms_to_ticks32(MYNEWT_VAL(BLE_LL_NUM_COMP_PKT_ITVL_MS))) {
|
||||
/*
|
||||
* If this connection has completed packets, send an event right away.
|
||||
* We do this to increase throughput but we dont want to search the
|
||||
|
||||
@@ -72,12 +72,11 @@ syscfg.defs:
|
||||
description: 'Transmit power level.'
|
||||
value: '0'
|
||||
|
||||
BLE_NUM_COMP_PKT_RATE:
|
||||
BLE_LL_NUM_COMP_PKT_ITVL_MS:
|
||||
description: >
|
||||
Determines the maximum rate at which the controller will send the
|
||||
number of completed packets event to the host. Rate is in os time
|
||||
ticks.
|
||||
value: '(2 * OS_TICKS_PER_SEC)'
|
||||
Determines the interval at which the controller will send the
|
||||
number of completed packets event to the host. Rate is in milliseconds.
|
||||
value: 2000
|
||||
|
||||
BLE_LL_MFRG_ID:
|
||||
description: >
|
||||
@@ -369,6 +368,11 @@ syscfg.defs:
|
||||
description: Superseded by BLE_CONTROLLER
|
||||
value: 1
|
||||
defunct: 1
|
||||
BLE_NUM_COMP_PKT_RATE:
|
||||
description: Superseded by BLE_LL_NUM_COMP_PKT_ITVL_MS
|
||||
value: '(2 * OS_TICKS_PER_SEC)'
|
||||
defunct: 1
|
||||
|
||||
|
||||
syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
|
||||
BLE_LL_CFG_FEAT_LE_CSA2: 1
|
||||
|
||||
@@ -594,8 +594,8 @@
|
||||
#define MYNEWT_VAL_BLE_LP_CLOCK (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_NUM_COMP_PKT_RATE
|
||||
#define MYNEWT_VAL_BLE_NUM_COMP_PKT_RATE ((2 * 128)) /* XXX */
|
||||
#ifndef MYNEWT_VAL_BLE_LL_NUM_COMP_PKT_ITVL_MS
|
||||
#define MYNEWT_VAL_BLE_LL_NUM_COMP_PKT_ITVL_MS (2000)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_PUBLIC_DEV_ADDR
|
||||
|
||||
Reference in New Issue
Block a user