mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-06 22:57:22 +00:00
nimble/ll: Add init and reset for external code
This adds init and reset calls for external code so it can be initialized and reset properly in sync with LL.
This commit is contained in:
@@ -36,6 +36,10 @@ extern "C" {
|
||||
|
||||
struct ble_ll_sched_item;
|
||||
|
||||
/* Called when LL package is initialized (before ll_task is started) */
|
||||
void ble_ll_ext_init(void);
|
||||
/* Called when LL is reset (i.e. HCI_Reset) */
|
||||
void ble_ll_ext_reset(void);
|
||||
/* Called when LL is in "external" state and PHY starts to receive a PDU */
|
||||
int ble_ll_ext_rx_isr_start(uint8_t pdu_type, struct ble_mbuf_hdr *rxhdr);
|
||||
/* Called when LL is in "external" state and PHY finished to receive a PDU */
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
#include "ble_ll_dtm_priv.h"
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_EXT)
|
||||
#include <controller/ble_ll_ext.h>
|
||||
#endif
|
||||
|
||||
/* XXX:
|
||||
*
|
||||
* 1) use the sanity task!
|
||||
@@ -1605,6 +1609,10 @@ ble_ll_reset(void)
|
||||
ble_ll_rfmgmt_reset();
|
||||
OS_EXIT_CRITICAL(sr);
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_EXT)
|
||||
ble_ll_ext_reset();
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_ROLE_BROADCASTER)
|
||||
/* Stop any advertising */
|
||||
ble_ll_adv_reset();
|
||||
@@ -1981,6 +1989,10 @@ ble_ll_init(void)
|
||||
ble_ll_hci_vs_init();
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_EXT)
|
||||
ble_ll_ext_init();
|
||||
#endif
|
||||
|
||||
#if MYNEWT
|
||||
/* Initialize the LL task */
|
||||
os_task_init(&g_ble_ll_task, "ble_ll", ble_ll_task, NULL,
|
||||
|
||||
Reference in New Issue
Block a user