2022-12-10 11:49:23 +00:00
|
|
|
/* Board */
|
2022-12-10 08:44:10 +00:00
|
|
|
#include "board.h"
|
|
|
|
#include "clock_config.h"
|
|
|
|
#include "peripherals.h"
|
|
|
|
#include "pin_mux.h"
|
|
|
|
|
2022-12-10 11:49:23 +00:00
|
|
|
/* FreeRTOS */
|
|
|
|
#include "FreeRTOS.h"
|
|
|
|
#include "task.h"
|
|
|
|
|
2022-12-10 08:44:10 +00:00
|
|
|
/* Debug console */
|
|
|
|
#include "fsl_debug_console.h"
|
|
|
|
|
2022-12-10 11:49:23 +00:00
|
|
|
/* WHD */
|
|
|
|
#include "whd.h"
|
|
|
|
#include "whd_wifi_api.h"
|
|
|
|
|
2022-12-11 13:31:13 +00:00
|
|
|
/* LwIP */
|
|
|
|
#include "lwip/init.h"
|
|
|
|
|
2022-12-10 11:49:23 +00:00
|
|
|
void task_hello_init(void);
|
|
|
|
|
2022-12-10 08:44:10 +00:00
|
|
|
int main(void) {
|
|
|
|
BOARD_InitBootPins();
|
|
|
|
BOARD_InitBootClocks();
|
|
|
|
BOARD_InitBootPeripherals();
|
|
|
|
BOARD_ConfigMPU();
|
|
|
|
|
|
|
|
BOARD_InitDebugConsole();
|
|
|
|
|
|
|
|
CLOCK_SetMode(kCLOCK_ModeRun);
|
|
|
|
|
2022-12-10 11:49:23 +00:00
|
|
|
PRINTF("CPU frequency: %dMHz\r\n", CLOCK_GetCoreSysClkFreq() / 1000000);
|
|
|
|
|
|
|
|
task_hello_init();
|
|
|
|
|
2022-12-11 13:31:13 +00:00
|
|
|
lwip_init();
|
|
|
|
|
2022-12-10 11:49:23 +00:00
|
|
|
vTaskStartScheduler();
|
2022-12-10 08:44:10 +00:00
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
__WFI();
|
|
|
|
}
|
|
|
|
}
|