os_cpu.h

来自「c的源码」· C头文件 代码 · 共 57 行

H
57
字号
/*
**********************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                              ADSP-21065L SHARC Specific Code version 1.1
*
* File : OS_CPU.H
* By   : Bertrand Hurst, Francois Veuve, Cedric Bornand (dspos@engineer.com)
*        CETT - MIS
*        Rte de Galilee 15
*        1400 Yverdon
*        Switzerland
**********************************************************************************************
*/

/*
*********************************************************************************************************
*                                              DATA TYPES
*                                         (Compiler Specific)
*********************************************************************************************************
*/

typedef unsigned char  BOOLEAN;
typedef unsigned char  INT8U;                    /* Unsigned  8 bit quantity                           */
typedef signed   char  INT8S;                    /* Signed    8 bit quantity                           */
typedef unsigned int   INT16U;                   /* Unsigned 16 bit quantity                           */
typedef signed   int   INT16S;                   /* Signed   16 bit quantity                           */
typedef unsigned long  INT32U;                   /* Unsigned 32 bit quantity                           */
typedef signed   long  INT32S;                   /* Signed   32 bit quantity                           */
typedef float          FP32;                     /* Single precision floating point                    */
typedef double         FP64;                     /* Double precision floating point                    */

typedef unsigned int   OS_STK;                   /* Each stack entry is 32-bit wide                    */

#define BYTE           INT8S                     /* Define data types for backward compatibility ...   */
#define UBYTE          INT8U                     /* ... to uC/OS V1.xx.  Not actually needed for ...   */
#define WORD           INT16S                    /* ... uC/OS-II.                                      */
#define UWORD          INT16U
#define LONG           INT32S
#define ULONG          INT32U

/*
**********************************************************************************************************
**********************************************************************************************************
*/

#define  OS_ENTER_CRITICAL()  asm("bit clr MODE1 0x1000;")  /* Disables interrupts                      */
#define  OS_EXIT_CRITICAL()   asm("bit set MODE1 0x1000;")  /* Enables  interrupts                      */

/*
**********************************************************************************************************
**********************************************************************************************************
*/

#define  OS_STK_GROWTH        1                             /* Growing from high to low memory          */
#define  OS_TASK_SW()         OSCtxSw()

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?