⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_cpu.h

📁 这个UCOS II在TI2400DSP平台上的移植源代码
💻 H
字号:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                        The Real-Time Kernel
*
*                        (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
*                                          All Rights Reserved
*
*                                  TI's TMS320C2400 Series Specific Code
*                
*
*                           	Code Generation Toolset Release Version 7.00
*                     
*
* File : OS_CPU.H
* By   : Jean J. Labrosse 		(Modified by Ding Curie)
*********************************************************************************************************
*                                              DATA TYPES
*                                         (Compiler Specific)
*********************************************************************************************************
*/

typedef unsigned char  BOOLEAN;
typedef unsigned char  INT8U;     				/* Unsigned  8 bit quantity, but actually 16 bit 		*/
typedef signed   char  INT8S;                   /* Signed    8 bit quantity, but actually 16 bit 		*/
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 long  	       INT32S;                  /* Signed   32 bit quantity                           	*/
typedef float          FP32;                    /* Single precision floating point                    	*/
typedef double         FP64;                    /* Double precision floating point, but actually single */

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

#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

/* 
*********************************************************************************************************
*                              TI TMS320C/F240
*********************************************************************************************************
*/
#define OS_CRITICAL_METHOD	1

#if OS_CRITICAL_METHOD == 1
#define  OS_ENTER_CRITICAL()  asm(" SETC INTM")       	/* Disable interrupts */
#define  OS_EXIT_CRITICAL()   asm(" CLRC INTM")       	/* Enable  interrupts */
#endif

#if OS_CRITICAL_METHOD == 2
#define OS_ENTER_CRITICAL()	???
#define OS_EXIT_CRITICAL()	???
#endif

#if OS_CRITICAL_METHOD == 3
#define OS_ENTER_CRITICAL()	???
#define OS_EXIT_CRITICAL()  ???
#endif  

/*
*********************************************************************************************************
*                           TI TMS320C/F240 Miscellaneous
*********************************************************************************************************
*/

#define  OS_STK_GROWTH        0                       	/* Stack grows from LOW to HIGH memory  	*/
#define  OS_TASK_SW()         asm(" INTR 8")			/* use software INT 8 to do context switch 	*/

⌨️ 快捷键说明

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