本文整理汇总了C++中rt_thread_startup函数的典型用法代码示例。如果您正苦于以下问题:C++ rt_thread_startup函数的具体用法?C++ rt_thread_startup怎么用?C++ rt_thread_startup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rt_thread_startup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lcd1602_FileNameRollStart
void lcd1602_FileNameRollStart()
{
lcd_thread_filename = rt_thread_create("lcdFN", lcd1602_FileNameRoll, (void *)0, 1024, 7, 20);
if (lcd_thread_filename != RT_NULL)
{
rt_thread_startup(lcd_thread_filename);
}
}
示例2: rt_application_init
int rt_application_init()
{
rt_thread_t init_thread;
rt_err_t result;
result = rt_sem_init(&sem, "sem", 0, RT_IPC_FLAG_FIFO);
if (result != RT_EOK)
{
rt_kprintf("error, init sem failed!\n");
return 0;
}
#if (RT_THREAD_PRIORITY_MAX == 32)
init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, 8, 20);
#else
init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, 80, 20);
#endif
if (init_thread != RT_NULL)
rt_thread_startup(init_thread);
//------- init thread1
rt_thread_init(&thread1,
"keyp", //producer
rt_thread_entry1,
RT_NULL,
&thread1_stack[0],
sizeof(thread1_stack),11,25);
rt_thread_startup(&thread1);
//------- init thread2
rt_thread_init(&thread2,
"keyc", //consumer
rt_thread_entry2,
RT_NULL,
&thread2_stack[0],
sizeof(thread2_stack),11,24);
rt_thread_startup(&thread2);
return 0;
}
示例3: osThreadCreate
/// Create a thread and add it to Active Threads and set it to state READY
osThreadId osThreadCreate(osThreadDef_t *thread_def, void *argument)
{
osThreadId thread;
thread = rt_thread_create(thread_def->name, thread_def->entry, argument, thread_def->stack_size, thread_def->priority, thread_def->tick);
if (thread != RT_NULL)
rt_thread_startup(thread);
return thread;
}
示例4: rt_application_init
int rt_application_init(void)
{
rt_thread_t tid;
tid = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, RT_THREAD_PRIORITY_MAX / 3, 20);
if (tid != RT_NULL) rt_thread_startup(tid);
return 0;
}
示例5: rt_application_init
int rt_application_init(void)
{
rt_thread_t init_thread = NULL;
rt_thread_init(&thread_sys_monitor,
"sys_monitor",
thread_entry_sys_monitor,
RT_NULL,
thread_sys_monitor_stack,
sizeof(thread_sys_monitor_stack),
thread_sys_monitor_prio, 5);
rt_thread_startup(&thread_sys_monitor);
init_thread = rt_thread_create("sys init", sys_init_thread,
NULL, 512, 10, 10);
if (init_thread != NULL) {
rt_thread_startup(init_thread);
}
return 0;
}
示例6: info_init
void info_init()
{
rt_thread_t tid;
tid = rt_thread_create("info",
info_entry, RT_NULL,
2048, 25, 10);
if (tid != RT_NULL) rt_thread_startup(tid);
}
示例7: rt_application_init
int rt_application_init(void)
{
rt_thread_t init_thread;
rt_err_t result;
#if (RT_THREAD_PRIORITY_MAX == 32)
init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, 8, 20);
#else
init_thread = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, 80, 20);
#endif
if (init_thread != RT_NULL)
rt_thread_startup(init_thread);
/* init led thread */
result = rt_thread_init(&adc_thread,
"adc",
adc_thread_entry,
RT_NULL,
(rt_uint8_t*)&adc_stack[0],
sizeof(adc_stack),
10,5);
rt_thread_startup(&adc_thread);
/* init main thread */
result = rt_thread_init(&main_thread,
"main",
main_thread_entry,
RT_NULL,
(rt_uint8_t*)&main_stack[0],
sizeof(main_stack),
2,1);
rt_thread_startup(&main_thread);
return 0;
}
示例8: libc_sem
void libc_sem()
{
rt_thread_t tid;
tid = rt_thread_create("semtest", test_thread, RT_NULL,
2048, 20, 5);
if (tid != RT_NULL) {
rt_thread_startup(tid);
}
}
示例9: webnet_init
void webnet_init(void)
{
rt_thread_t tid;
tid = rt_thread_create(WEBNET_THREAD_NAME,
webnet_thread, RT_NULL,
WEBNET_THREAD_STACKSIZE, WEBNET_PRIORITY, 5);
if (tid != RT_NULL) rt_thread_startup(tid);
}
示例10: thread_slow_log_init
//gps log initialization
void thread_slow_log_init(void)
{
rt_thread_init(&thread_slow_log_handle,
"log slow",
entry_thread_slow_log,
RT_NULL,
&thread_slow_log_stack[0],
sizeof(thread_slow_log_stack),25,1);
rt_thread_startup(&thread_slow_log_handle);
}
示例11: rt_application_init
int rt_application_init()
{
rt_thread_t tid;
tid = rt_thread_create("init", init_thread, RT_NULL,
1024, RT_THREAD_PRIORITY_MAX/3, 10);
if (tid != RT_NULL) rt_thread_startup(tid);
return 0;
}
示例12: today_init
void today_init()
{
rt_thread_t tid;
tid = rt_thread_create("today",
today_entry, RT_NULL,
2048, 25, 10);
if (tid != RT_NULL) rt_thread_startup(tid);
}
示例13: chargen_init
void chargen_init(void)
{
rt_thread_t chargen;
chargen = rt_thread_create(CHARGEN_THREAD_NAME,
chargen_thread, RT_NULL,
CHARGEN_THREAD_STACKSIZE,
CHARGEN_PRIORITY, 5);
if (chargen != RT_NULL) rt_thread_startup(chargen);
}
示例14: window
void window(void)
{
rt_thread_t tid;
static rt_uint32_t no = 0;
tid = rt_thread_create("win", window_entry, (void*)no, 2048, 20, 5);
if (tid != RT_NULL) rt_thread_startup(tid);
no ++;
}
示例15: apps_copter_init
int apps_copter_init(void)
{
rt_thread_t attitude_thread,data_transmit_thread,receiver_thread,attitude_outter_thread;
//初始化IMU(惯性测量单元)
IMU_Init();
//初始化飞行控制
fc.Init();
//初始化参数
Params_Init();
//初始化Transmiter
cmd.Init("tcpserv");
attitude_thread = rt_thread_create("attitude",attitude_thread_entry,RT_NULL,1024,12,5);
if(attitude_thread != RT_NULL)
{
rt_thread_startup(attitude_thread);
}
attitude_outter_thread = rt_thread_create("att_outter",attitude_outter_thread_entry,RT_NULL,1024,11,5);
if(attitude_thread != RT_NULL)
{
rt_thread_startup(attitude_outter_thread);
}
data_transmit_thread = rt_thread_create("transmit",data_transmit_thread_entry,RT_NULL,1024,13,5);
if(data_transmit_thread != RT_NULL)
{
rt_thread_startup(data_transmit_thread);
}
receiver_thread = rt_thread_create("receiver",receiver_thread_entry,RT_NULL,1024,14,5);
if(receiver_thread != RT_NULL)
{
rt_thread_startup(receiver_thread);
}
return 0;
}