aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mptask.c
diff options
context:
space:
mode:
Diffstat (limited to 'cc3200/mptask.c')
-rw-r--r--cc3200/mptask.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/cc3200/mptask.c b/cc3200/mptask.c
index 6d66c9074..3a62c4623 100644
--- a/cc3200/mptask.c
+++ b/cc3200/mptask.c
@@ -106,12 +106,13 @@ void TASK_Micropython (void *pvParameters) {
uint32_t sp = gc_helper_get_sp();
gc_collect_init (sp);
+ bool safeboot = false;
+ mptask_pre_init();
+
#ifndef DEBUG
- bool safeboot = PRCMGetSpecialBit(PRCM_SAFE_BOOT_BIT);
+ safeboot = PRCMGetSpecialBit(PRCM_SAFE_BOOT_BIT);
#endif
- mptask_pre_init();
-
soft_reset:
// GC init
@@ -372,9 +373,12 @@ STATIC void mptask_init_sflash_filesystem (void) {
}
STATIC void mptask_enter_ap_mode (void) {
+ // append the mac only if it's not the first boot
+ bool append_mac = !PRCMGetSpecialBit(PRCM_FIRST_BOOT_BIT);
+
// enable simplelink in ap mode (use the MAC address to make the ssid unique)
wlan_sl_enable (ROLE_AP, MICROPY_PORT_WLAN_AP_SSID, strlen(MICROPY_PORT_WLAN_AP_SSID), MICROPY_PORT_WLAN_AP_SECURITY,
- MICROPY_PORT_WLAN_AP_KEY, strlen(MICROPY_PORT_WLAN_AP_KEY), MICROPY_PORT_WLAN_AP_CHANNEL, true);
+ MICROPY_PORT_WLAN_AP_KEY, strlen(MICROPY_PORT_WLAN_AP_KEY), MICROPY_PORT_WLAN_AP_CHANNEL, append_mac);
}
STATIC void mptask_create_main_py (void) {