diff options
| author | Daniel Campora <daniel@wipy.io> | 2015-04-29 16:01:51 +0200 |
|---|---|---|
| committer | Daniel Campora <daniel@wipy.io> | 2015-04-29 16:10:40 +0200 |
| commit | 6f218d74725e38e71aeed27250d8c67dd83401d8 (patch) | |
| tree | ed55b0efd65e768054a188260a5bd2c9a8802429 | |
| parent | d8713d78f57286b4c462932a621c0afadb3d0667 (diff) | |
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).
| -rw-r--r-- | cc3200/mods/modwlan.c | 1 | ||||
| -rw-r--r-- | cc3200/mptask.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c index 95c418da4..dd76bed37 100644 --- a/cc3200/mods/modwlan.c +++ b/cc3200/mods/modwlan.c @@ -379,6 +379,7 @@ void SimpleLinkSockEventHandler(SlSockEvent_t *pSock) { // SimpleLink Asynchronous Event Handlers -- End //***************************************************************************** +__attribute__ ((section (".boot"))) void wlan_init0 (void) { // create the wlan lock ASSERT(OSI_OK == sl_LockObjCreate(&wlan_LockObj, "WlanLock")); diff --git a/cc3200/mptask.c b/cc3200/mptask.c index d9c0ed8f7..6d3ef825d 100644 --- a/cc3200/mptask.c +++ b/cc3200/mptask.c @@ -126,7 +126,6 @@ soft_reset: pin_init0(); readline_init0(); mod_network_init0(); - wlan_init0(); #if MICROPY_HW_ENABLE_RNG rng_init0(); #endif @@ -273,6 +272,9 @@ STATIC void mptask_pre_init (void) { // this one allocates memory for the nvic vault pybsleep_pre_init(); + // this one allocates mameory for the WLAN semaphore + wlan_init0(); + #if MICROPY_HW_HAS_SDCARD pybsd_init0(); #endif |
