Skip to content

Commit

Permalink
porting/nimble_port: fix controller not initialized
Browse files Browse the repository at this point in the history
When using external controller, ble_transport_ll_init() was not
run because of NIMBLE_CFG_CONTROLLER was not defined.
But under current architecture ble_transport_ll_init() should also
be run to initialize the communication interface.
  • Loading branch information
CW-B-W authored and sjanc committed Sep 20, 2023
1 parent 0bfb9b2 commit bf76183
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions porting/nimble/src/nimble_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include "sysinit/sysinit.h"
#include "host/ble_hs.h"
#include "nimble/nimble_port.h"
#include "nimble/transport.h"
#if NIMBLE_CFG_CONTROLLER
#include "controller/ble_ll.h"
#include "nimble/transport.h"
#endif

static struct ble_npl_eventq g_eventq_dflt;
Expand All @@ -50,8 +50,10 @@ nimble_port_init(void)
hal_timer_init(5, NULL);
os_cputime_init(32768);
#endif
ble_transport_ll_init();
#endif

/* Initialize the controller */
ble_transport_ll_init();
}

void
Expand Down

0 comments on commit bf76183

Please sign in to comment.