STATIC void mptask_pre_init (void) { // this one only makes sense after a poweron reset pyb_rtc_pre_init(); // Create the simple link spawn task ASSERT (OSI_OK == VStartSimpleLinkSpawnTask(SIMPLELINK_SPAWN_TASK_PRIORITY)); // Allocate memory for the flash file system ASSERT ((sflash_fatfs = mem_Malloc(sizeof(FATFS))) != NULL); // this one allocates memory for the nvic vault pyb_sleep_pre_init(); // this one allocates memory for the WLAN semaphore wlan_pre_init(); // this one allocates memory for the updater semaphore updater_pre_init(); // this one allocates memory for the socket semaphore modusocket_pre_init(); //CRYPTOHASH_Init(); #ifdef DEBUG ASSERT (OSI_OK == osi_TaskCreate(TASK_Servers, (const signed char *)"Servers", SERVERS_STACK_SIZE, NULL, SERVERS_PRIORITY, &svTaskHandle)); #else ASSERT (OSI_OK == osi_TaskCreate(TASK_Servers, (const signed char *)"Servers", SERVERS_STACK_SIZE, NULL, SERVERS_PRIORITY, NULL)); #endif }
STATIC void mptask_pre_init (void) { // this one only makes sense after a poweron reset pyb_rtc_pre_init(); // Create the simple link spawn task ASSERT (OSI_OK == VStartSimpleLinkSpawnTask(SIMPLELINK_SPAWN_TASK_PRIORITY)); // Allocate memory for the flash file system ASSERT ((sflash_vfs_fat = mem_Malloc(sizeof(*sflash_vfs_fat))) != NULL); // this one allocates memory for the nvic vault pyb_sleep_pre_init(); // this one allocates memory for the WLAN semaphore wlan_pre_init(); // this one allocates memory for the updater semaphore updater_pre_init(); // this one allocates memory for the socket semaphore modusocket_pre_init(); //CRYPTOHASH_Init(); #ifndef DEBUG OsiTaskHandle svTaskHandle; #endif svTaskHandle = xTaskCreateStatic(TASK_Servers, "Servers", SERVERS_STACK_LEN, NULL, SERVERS_PRIORITY, svTaskStack, &svTaskTCB); ASSERT(svTaskHandle != NULL); }