mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2026-07-06 11:35:45 +00:00
first add sdk
This commit is contained in:
commit
f91efd1250
3915 changed files with 1291882 additions and 0 deletions
52
project/realtek_amebaz_va0_example/src/main.c
Executable file
52
project/realtek_amebaz_va0_example/src/main.c
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "diag.h"
|
||||
#include "main.h"
|
||||
#include <example_entry.h>
|
||||
|
||||
extern void console_init(void);
|
||||
|
||||
static void test_thread(void *param)
|
||||
{
|
||||
DiagPrintf("test_thread\r\n");
|
||||
int i = 0;
|
||||
while(1)
|
||||
{
|
||||
DiagPrintf("%d\r\n", i++);
|
||||
vTaskDelay(1000 / portTICK_RATE_MS);
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Main program.
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void main(void)
|
||||
{
|
||||
/* Initialize log uart and at command service */
|
||||
//console_init();
|
||||
//ReRegisterPlatformLogUart();
|
||||
|
||||
/* pre-processor of application example */
|
||||
//pre_example_entry();
|
||||
|
||||
/* wlan intialization */
|
||||
#if defined(CONFIG_WIFI_NORMAL) && defined(CONFIG_NETWORK)
|
||||
//wlan_network();
|
||||
#endif
|
||||
|
||||
/* Execute application example */
|
||||
//example_entry();
|
||||
if(xTaskCreate(test_thread, ((const char*)"test_thread"), 1024, NULL, tskIDLE_PRIORITY + 1, NULL) != pdPASS)
|
||||
printf("\n\r%s xTaskCreate(init_thread) failed", __FUNCTION__);
|
||||
/*Enable Schedule, Start Kernel*/
|
||||
#if defined(CONFIG_KERNEL) && !TASK_SCHEDULER_DISABLED
|
||||
#ifdef PLATFORM_FREERTOS
|
||||
vTaskStartScheduler();
|
||||
#endif
|
||||
#else
|
||||
RtlConsolTaskRom(NULL);
|
||||
#endif
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue