aboutsummaryrefslogtreecommitdiff
path: root/ports/cc3200/mptask.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/cc3200/mptask.c')
-rw-r--r--ports/cc3200/mptask.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/ports/cc3200/mptask.c b/ports/cc3200/mptask.c
index c25380426..b0c32c819 100644
--- a/ports/cc3200/mptask.c
+++ b/ports/cc3200/mptask.c
@@ -81,16 +81,16 @@
/******************************************************************************
DECLARE PRIVATE FUNCTIONS
******************************************************************************/
-STATIC void mptask_pre_init (void);
-STATIC void mptask_init_sflash_filesystem (void);
-STATIC void mptask_enter_ap_mode (void);
-STATIC void mptask_create_main_py (void);
+STATIC void mptask_pre_init(void);
+STATIC void mptask_init_sflash_filesystem(void);
+STATIC void mptask_enter_ap_mode(void);
+STATIC void mptask_create_main_py(void);
/******************************************************************************
DECLARE PUBLIC DATA
******************************************************************************/
#ifdef DEBUG
-OsiTaskHandle svTaskHandle;
+OsiTaskHandle svTaskHandle;
#endif
/******************************************************************************
@@ -100,12 +100,12 @@ static fs_user_mount_t *sflash_vfs_fat;
static const char fresh_main_py[] = "# main.py -- put your code here!\r\n";
static const char fresh_boot_py[] = "# boot.py -- run on boot-up\r\n"
- "# can run arbitrary Python, but best to keep it minimal\r\n"
+ "# can run arbitrary Python, but best to keep it minimal\r\n"
#if MICROPY_STDIO_UART
- "import os, machine\r\n"
- "os.dupterm(machine.UART(0, " MP_STRINGIFY(MICROPY_STDIO_UART_BAUD) "))\r\n"
+ "import os, machine\r\n"
+ "os.dupterm(machine.UART(0, " MP_STRINGIFY(MICROPY_STDIO_UART_BAUD) "))\r\n"
#endif
- ;
+;
/******************************************************************************
DECLARE PUBLIC FUNCTIONS
@@ -118,9 +118,9 @@ void TASK_MicroPython (void *pvParameters) {
bool safeboot = false;
mptask_pre_init();
-#ifndef DEBUG
+ #ifndef DEBUG
safeboot = PRCMGetSpecialBit(PRCM_SAFE_BOOT_BIT);
-#endif
+ #endif
soft_reset:
@@ -130,7 +130,7 @@ soft_reset:
#endif
// initialise the stack pointer for the main thread (must be done after mp_thread_init)
- mp_stack_set_top((void*)sp);
+ mp_stack_set_top((void *)sp);
// GC init
gc_init(&_boot, &_eheap);
@@ -158,8 +158,7 @@ soft_reset:
// when waking up from hibernate we just want
// to enable simplelink and leave it as is
wlan_first_start();
- }
- else {
+ } else {
// only if not comming out of hibernate or a soft reset
mptask_enter_ap_mode();
}
@@ -218,7 +217,7 @@ soft_reset:
// main script is finished, so now go into REPL mode.
// the REPL mode can change, or it can request a soft reset.
- for ( ; ; ) {
+ for ( ; ;) {
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
if (pyexec_raw_repl() != 0) {
break;
@@ -286,9 +285,9 @@ STATIC void mptask_pre_init (void) {
//CRYPTOHASH_Init();
-#ifndef DEBUG
+ #ifndef DEBUG
OsiTaskHandle svTaskHandle;
-#endif
+ #endif
svTaskHandle = xTaskCreateStatic(TASK_Servers, "Servers",
SERVERS_STACK_LEN, NULL, SERVERS_PRIORITY, svTaskStack, &svTaskTCB);
ASSERT(svTaskHandle != NULL);
@@ -382,8 +381,8 @@ STATIC void mptask_enter_ap_mode (void) {
bool add_mac = !PRCMGetSpecialBit(PRCM_FIRST_BOOT_BIT);
// enable simplelink in ap mode (use the MAC address to make the ssid unique)
wlan_sl_init (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, ANTENNA_TYPE_INTERNAL, add_mac);
+ MICROPY_PORT_WLAN_AP_SECURITY, MICROPY_PORT_WLAN_AP_KEY, strlen(MICROPY_PORT_WLAN_AP_KEY),
+ MICROPY_PORT_WLAN_AP_CHANNEL, ANTENNA_TYPE_INTERNAL, add_mac);
}
STATIC void mptask_create_main_py (void) {