📄 os_const.h
字号:
/******************************************************************************
Copyright (c) 2006 by RockOS.
All rights reserved.
This software is supported by the Rock Software Workroom.
Any bugs please contact the author with e-mail or QQ:
E-mail : baobaoba520@yahoo.com.cn
QQ : 59681888
*******************************************************************************
File name : os_const.h
Description : constants for RockOS.
:
:
Auther : sunxinqiu
History :
2006-3-15 first release.
******************************************************************************/
#ifndef __OS_CONST_H__
#define __OS_CONST_H__
#ifdef __cplusplus
extern "C" {
#endif
#define HIGHEST_TASK_PRIO 1
#define LOWEST_TASK_PRIO 65535
#if MAX_SHELL_CMD > 0
#define MAX_CMD_NAME_LEN 15
#define MAX_CMD_ARGS 16
#define MAX_CMD_DESC_LEN 255
#endif
#define MAX_SYS_MSGQ MAX_SYS_TASK
/* Recomments:
* In RockOS, queue lib provides FIFO, LIFO and priority base queue three types algrithm.
* There are such queues in system:
* * 1 ready task queue --- (this queue is priority based.)
* * max 3 free message packet queue --- (this queue is FIFO.)
* * each task has 1 owned semaphore queue --- (this queue is LIFO.)
* * each semaphore has 1 owner task queue --- (this queue is a set.)
* * each semaphore has 1 pending task queue --- (this queue is priority based.)
* For these, the MAX_QUEUE_NUM should be defined as:
* (1 + 3 + MAX_SYS_MSGQ + MAX_SYS_TASK + 2 * MAX_SYS_SEMA)
*/
#define MAX_QUEUE_NUM (1 + 3 + MAX_SYS_MSGQ + MAX_SYS_TASK + 2 * MAX_SYS_SEMA)
/* Recomments:
* In RockOS, these resources are managed as basec (include FIFO, LIFO and set) queue:
* * free message packet queue --- (FIFO queue)
* * task's own semaphores set --- (LIFO queue)
* * semaphore's owner task queue --- (a set)
* Double the total numbers for redundancy.
*/
#define MAX_BASIC_QELEMENT ((MINI_MSG_NUM + COMMON_MSG_NUM + HUGE_MSG_NUM \
+ MAX_SYS_TASK + MAX_SYS_SEMA) * 2)
/* Recomments:
* In RockOS, only task has priority attribute, double the total number for redundancy.
*/
#define MAX_PRIORITY_QELEMENT (MAX_SYS_TASK * 2)
#define NULL_EVENT ((U16)(-1))
#define NULL_HANDLE ((HANDLE)(-1))
#define NULL_FSM NULL_HANDLE
#define NULL_QUEUE NULL_HANDLE
#define NULL_TIMER NULL_HANDLE
#define NULL_MSG NULL_HANDLE
#define NULL_MSGQ NULL_HANDLE
#define NULL_SEMA NULL_HANDLE
#define NULL_TASK NULL_HANDLE
#define OS_NO_WAIT (0)
#define OS_WAIT_FOR_EVER (-1)
#define OS_SUCCESS (0)
#define OS_FAIL (-1)
#define TICK_TASK_STACK_SIZE (8*1024)
#define IDLE_TASK_STACK_SIZE (2*1024)
#define SHELL_TASK_STACK_SIZE (16*1024)
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -