Skip to content
Snippets Groups Projects
Commit 6f218d74 authored by Daniel Campora's avatar Daniel Campora
Browse files

cc3200: Move wlan_init0() to the boot section.

This one creates a semaphore, therefore it must be executed only
after a hard reset (or when coming out of hibernation).
parent d8713d78
Branches
No related tags found
No related merge requests found
...@@ -379,6 +379,7 @@ void SimpleLinkSockEventHandler(SlSockEvent_t *pSock) { ...@@ -379,6 +379,7 @@ void SimpleLinkSockEventHandler(SlSockEvent_t *pSock) {
// SimpleLink Asynchronous Event Handlers -- End // SimpleLink Asynchronous Event Handlers -- End
//***************************************************************************** //*****************************************************************************
__attribute__ ((section (".boot")))
void wlan_init0 (void) { void wlan_init0 (void) {
// create the wlan lock // create the wlan lock
ASSERT(OSI_OK == sl_LockObjCreate(&wlan_LockObj, "WlanLock")); ASSERT(OSI_OK == sl_LockObjCreate(&wlan_LockObj, "WlanLock"));
......
...@@ -126,7 +126,6 @@ soft_reset: ...@@ -126,7 +126,6 @@ soft_reset:
pin_init0(); pin_init0();
readline_init0(); readline_init0();
mod_network_init0(); mod_network_init0();
wlan_init0();
#if MICROPY_HW_ENABLE_RNG #if MICROPY_HW_ENABLE_RNG
rng_init0(); rng_init0();
#endif #endif
...@@ -273,6 +272,9 @@ STATIC void mptask_pre_init (void) { ...@@ -273,6 +272,9 @@ STATIC void mptask_pre_init (void) {
// this one allocates memory for the nvic vault // this one allocates memory for the nvic vault
pybsleep_pre_init(); pybsleep_pre_init();
// this one allocates mameory for the WLAN semaphore
wlan_init0();
#if MICROPY_HW_HAS_SDCARD #if MICROPY_HW_HAS_SDCARD
pybsd_init0(); pybsd_init0();
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment