project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
63 lines
1.1 KiB
C
63 lines
1.1 KiB
C
#include <rtthread.h>
|
|
#include "tc_comm.h"
|
|
|
|
static rt_thread_t tid = RT_NULL;
|
|
static void sample_thread(void* parameter)
|
|
{
|
|
rt_kprintf("I'm sample!\n");
|
|
}
|
|
static void sample_thread_cleanup(struct rt_thread *p)
|
|
{
|
|
tid = RT_NULL;
|
|
tc_done(TC_STAT_PASSED);
|
|
}
|
|
|
|
int sample_init()
|
|
{
|
|
tid = rt_thread_create("t",
|
|
sample_thread, RT_NULL,
|
|
THREAD_STACK_SIZE, THREAD_PRIORITY, THREAD_TIMESLICE);
|
|
if (tid != RT_NULL)
|
|
{
|
|
rt_thread_startup(tid);
|
|
tid->cleanup = sample_thread_cleanup;
|
|
}
|
|
else
|
|
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
|
|
|
return 0;
|
|
}
|
|
|
|
#ifdef RT_USING_TC
|
|
static void _tc_cleanup()
|
|
{
|
|
/* lock scheduler */
|
|
rt_enter_critical();
|
|
/* delete thread */
|
|
if (tid != RT_NULL)
|
|
{
|
|
rt_kprintf("tid1 is bad\n");
|
|
tc_stat(TC_STAT_FAILED);
|
|
}
|
|
/* unlock scheduler */
|
|
rt_exit_critical();
|
|
}
|
|
|
|
int _tc_sample()
|
|
{
|
|
/* set tc cleanup */
|
|
tc_cleanup(_tc_cleanup);
|
|
sample_init();
|
|
|
|
return 25;
|
|
}
|
|
FINSH_FUNCTION_EXPORT(_tc_sample, a thread testcase example);
|
|
#else
|
|
int rt_application_init()
|
|
{
|
|
sample_init();
|
|
|
|
return 0;
|
|
}
|
|
#endif
|