📄 os_cfg.h
字号:
/*
*********************************************************************************************************
* uC/OS-II
* The Real-Time Kernel
*
* (c) Copyright 1992-1999, Jean J. Labrosse, Weston, FL
* All Rights Reserved
*
* Configuration for Motorola 683xx
*
* File : OS_CFG.H
* By : Jean J. Labrosse
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* REVISION HISTORY
*
* $Log: J:/software/ucos-ii/m683xx/sds/source/vc/os_cfg.h_v $
*
* Rev 1.3 01 May 1999 11:51:40 JJL
* ***************************** M683xx REL V1.05 ******************************
* - Added check of OSIntNesting in OSIntExit68K() (see OS_CPU_A.S).
*
* Rev 1.2 29 Jun 1999 22:04:02 JJL
* ***************************** M683xx REL V1.04 ******************************
* - Added function OSIntExit68K() (see OS_CPU_A.S) which must now be JUMPed to
* at the end of ALL ISRs. Your ISR code MUST now look as follows:
*
* _YourISR:
* ADDQ.B #1,_OSIntNesting ; OSIntNesting++
* MOVEM.L A0-A6/D0-D7,-(A7) ; Save ALL registers
* ; CLEAR the INTERRUPT source!
* JSR _YourISRHandler
* JMP _OSIntExit68K ; Exit through uC/OS-II at end of ISR
*
* As you can see, you MUST increment OSIntNesting at the beginning of the ISR
* and NOT call OSIntExit(). OSIntExit68K() knows to return to task level code
* because it examines the stack frame for the contents of the Status register
* (SR) that is pushed onto the stack when the CPU recognizes an interrupt.
*
* Rev 1.1 09 May 1999 11:06:56 JJL
* ***************************** M683xx REL V1.03 ******************************
* - The stack adjustment constant in OSIntCtxSw() was set incorrectly. The
* correct value needed to be 10 instead of 18 because the SDS compiler
* doesn't allocate local variables for OSIntExit().
*
* - The function OSSetVect() is OS_CPU_C.C didn't properly cast 'addr'. The
* correct statement is:
* *pvect = (INT32U)addr;
* instead of:
* *pvect = (INT32U *)addr;
*
* Rev 1.0 07 Feb 1999 21:25:32 JJL
* ***************************** M683xx REL V1.02 ******************************
* - Initial release of the SDS port for uC/OS-II. The revision number matches
* that of other M683xx or M680x0 ports.
*********************************************************************************************************
*/
/*$PAGE*/
/*
*********************************************************************************************************
* uC/OS-II CONFIGURATION
*********************************************************************************************************
*/
#ifndef _OS_CFG_H
#define _OS_CFG_H
/* ----------------------MISCELLANEOUS ----------------------- */
#define OS_ARG_CHK_EN 1 /* Enable (1) or Disable (0) argument checking */
#define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files */
#define OS_LOWEST_PRIO 5 /* Defines the lowest priority that can be assigned ... */
/* ... MUST NEVER be higher than 63 */
#define OS_MAX_EVENTS 10 /* Max. number of event control blocks in your application ... */
/* ... MUST be > 0 */
#define OS_MAX_FLAGS 5 /* Max. number of Event Flag Groups in your application ... */
/* ... MUST be > 0 */
#define OS_MAX_MEM_PART 2 /* Max. number of memory partitions ... */
/* ... MUST be > 0 */
#define OS_MAX_QS 2 /* Max. number of queue control blocks in your application ... */
/* ... MUST be > 0 */
#define OS_MAX_TASKS 63 /* Max. number of tasks in your application ... */
/* ... MUST be >= 2 */
#define OS_SCHED_LOCK_EN 1 /* Include code for OSSchedLock() and OSSchedUnlock() */
#define OS_TASK_IDLE_STK_SIZE 256 /* Idle task stack size (# of OS_STK wide entries) */
#define OS_TASK_STAT_EN 1 /* Enable (1) or Disable(0) the statistics task */
#define OS_TASK_STAT_STK_SIZE 256 /* Statistics task stack size (# of OS_STK wide entries) */
#define OS_TICKS_PER_SEC 100 /* Set the number of ticks in one second */
/* ----------------------- EVENT FLAGS ------------------------ */
#define OS_FLAG_EN 1 /* Enable (1) or Disable (0) code generation for EVENT FLAGS */
#define OS_FLAG_WAIT_CLR_EN 1 /* Include code for Wait on Clear EVENT FLAGS */
#define OS_FLAG_ACCEPT_EN 1 /* Include code for OSFlagAccept() */
#define OS_FLAG_DEL_EN 1 /* Include code for OSFlagDel() */
#define OS_FLAG_QUERY_EN 1 /* Include code for OSFlagQuery() */
/* -------------------- MESSAGE MAILBOXES --------------------- */
#define OS_MBOX_EN 1 /* Enable (1) or Disable (0) code generation for MAILBOXES */
#define OS_MBOX_ACCEPT_EN 1 /* Include code for OSMboxAccept() */
#define OS_MBOX_DEL_EN 1 /* Include code for OSMboxDel() */
#define OS_MBOX_POST_EN 1 /* Include code for OSMboxPost() */
#define OS_MBOX_POST_OPT_EN 1 /* Include code for OSMboxPostOpt() */
#define OS_MBOX_QUERY_EN 1 /* Include code for OSMboxQuery() */
/* --------------------- MEMORY MANAGEMENT -------------------- */
#define OS_MEM_EN 1 /* Enable (1) or Disable (0) code generation for MEMORY MANAGER */
#define OS_MEM_QUERY_EN 1 /* Include code for OSMemQuery() */
/* ---------------- MUTUAL EXCLUSION SEMAPHORES --------------- */
#define OS_MUTEX_EN 1 /* Enable (1) or Disable (0) code generation for MUTEX */
#define OS_MUTEX_ACCEPT_EN 1 /* Include code for OSMutexAccept() */
#define OS_MUTEX_DEL_EN 1 /* Include code for OSMutexDel() */
#define OS_MUTEX_QUERY_EN 1 /* Include code for OSMutexQuery() */
/* ---------------------- MESSAGE QUEUES ---------------------- */
#define OS_Q_EN 1 /* Enable (1) or Disable (0) code generation for QUEUES */
#define OS_Q_ACCEPT_EN 1 /* Include code for OSQAccept() */
#define OS_Q_DEL_EN 1 /* Include code for OSQDel() */
#define OS_Q_FLUSH_EN 1 /* Include code for OSQFlush() */
#define OS_Q_POST_EN 1 /* Include code for OSQPost() */
#define OS_Q_POST_FRONT_EN 1 /* Include code for OSQPostFront() */
#define OS_Q_POST_OPT_EN 1 /* Include code for OSQPostOpt() */
#define OS_Q_QUERY_EN 1 /* Include code for OSQQuery() */
/* ------------------------ SEMAPHORES ------------------------ */
#define OS_SEM_EN 1 /* Enable (1) or Disable (0) code generation for SEMAPHORES */
#define OS_SEM_ACCEPT_EN 1 /* Include code for OSSemAccept() */
#define OS_SEM_DEL_EN 1 /* Include code for OSSemDel() */
#define OS_SEM_QUERY_EN 1 /* Include code for OSSemQuery() */
/* --------------------- TASK MANAGEMENT ---------------------- */
#define OS_TASK_CHANGE_PRIO_EN 1 /* Include code for OSTaskChangePrio() */
#define OS_TASK_CREATE_EN 1 /* Include code for OSTaskCreate() */
#define OS_TASK_CREATE_EXT_EN 0 /* Include code for OSTaskCreateExt() */
#define OS_TASK_DEL_EN 1 /* Include code for OSTaskDel() */
#define OS_TASK_SUSPEND_EN 1 /* Include code for OSTaskSuspend() and OSTaskResume() */
#define OS_TASK_QUERY_EN 0 /* Include code for OSTaskQuery() */
/* --------------------- TIME MANAGEMENT ---------------------- */
#define OS_TIME_DLY_HMSM_EN 1 /* Include code for OSTimeDlyHMSM() */
#define OS_TIME_DLY_RESUME_EN 0 /* Include code for OSTimeDlyResume() */
#define OS_TIME_GET_SET_EN 0 /* Include code for OSTimeGet() and OSTimeSet() */
typedef INT16U OS_FLAGS; /* Date type for event flag bits (8, 16 or 32 bits) */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -