add littfs demo on tos_evb_aiot board
This commit is contained in:
28
board/TencentOS_tiny_EVB_AIoT/littlefs/main.c
Normal file
28
board/TencentOS_tiny_EVB_AIoT/littlefs/main.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "mcu_init.h"
|
||||
|
||||
#define APPLICATION_TASK_STK_SIZE 4096
|
||||
k_task_t application_task;
|
||||
uint8_t application_task_stk[APPLICATION_TASK_STK_SIZE];
|
||||
|
||||
extern void application_entry(void *arg);
|
||||
|
||||
#pragma weak application_entry
|
||||
void application_entry(void *arg)
|
||||
{
|
||||
while (1) {
|
||||
printf("This is a demo task,please use your task entry!\r\n");
|
||||
tos_task_delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
board_init();
|
||||
PRINTF("Welcome to TencentOS tiny(%s)\r\n", TOS_VERSION);
|
||||
tos_knl_init(); // TencentOS Tiny kernel initialize
|
||||
tos_task_create(&application_task, "application_task", application_entry, NULL, 4, application_task_stk, APPLICATION_TASK_STK_SIZE, 0);
|
||||
tos_knl_start();
|
||||
|
||||
while (1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user