mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-14 05:00:06 +00:00
nimble/ll: Add debugging for sched active item
This replaces sched_item_cb debug GPIO with sched_item that is set to high state for the entire duration of sched item active time, i.e. from sched run to LL standby. Note that sched_item_cb debugging is not that useful since it's almost the same as sched_run, so we better replace it instead of keeping both to avoid syscfg clutter.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "controller/ble_ll_trace.h"
|
||||
#include "controller/ble_ll_sync.h"
|
||||
#include "ble_ll_conn_priv.h"
|
||||
#include "ble_ll_priv.h"
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_DTM)
|
||||
#include "ble_ll_dtm_priv.h"
|
||||
@@ -1241,6 +1242,10 @@ void
|
||||
ble_ll_state_set(uint8_t ll_state)
|
||||
{
|
||||
g_ble_ll_data.ll_state = ll_state;
|
||||
|
||||
if (ll_state == BLE_LL_STATE_STANDBY) {
|
||||
BLE_LL_DEBUG_GPIO(SCHED_ITEM, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1183,11 +1183,14 @@ ble_ll_sched_execute_item(struct ble_ll_sched_item *sch)
|
||||
}
|
||||
|
||||
sched:
|
||||
BLE_LL_DEBUG_GPIO(SCHED_ITEM_CB, 1);
|
||||
BLE_LL_ASSERT(sch->sched_cb);
|
||||
|
||||
BLE_LL_DEBUG_GPIO(SCHED_ITEM, 1);
|
||||
rc = sch->sched_cb(sch);
|
||||
BLE_LL_DEBUG_GPIO(SCHED_ITEM_CB, 0);
|
||||
if (rc != BLE_LL_SCHED_STATE_RUNNING) {
|
||||
BLE_LL_DEBUG_GPIO(SCHED_ITEM, 0);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1331,7 +1334,7 @@ ble_ll_sched_stop(void)
|
||||
int
|
||||
ble_ll_sched_init(void)
|
||||
{
|
||||
BLE_LL_DEBUG_GPIO_INIT(SCHED_ITEM_CB);
|
||||
BLE_LL_DEBUG_GPIO_INIT(SCHED_ITEM);
|
||||
BLE_LL_DEBUG_GPIO_INIT(SCHED_RUN);
|
||||
|
||||
/*
|
||||
|
||||
@@ -367,10 +367,10 @@ syscfg.defs:
|
||||
GPIO pin number to debug scheduler running (on timer). Pin is set
|
||||
to high state while scheduler is running.
|
||||
value: -1
|
||||
BLE_LL_DEBUG_GPIO_SCHED_ITEM_CB:
|
||||
BLE_LL_DEBUG_GPIO_SCHED_ITEM:
|
||||
description: >
|
||||
GPIO pin number to debug scheduler item execution times. Pin is set
|
||||
to high state while item is executed.
|
||||
to high state while item is active.
|
||||
value: -1
|
||||
BLE_LL_DEBUG_GPIO_RFMGMT:
|
||||
description: >
|
||||
|
||||
Reference in New Issue
Block a user