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

📄 os_cpu.h

📁 uc_os II__PIC24fj128ga010
💻 H
字号:
/************************************************************************************************
*                                            uC/OS-II
*                                      The Real-Time Kernel
*
*                           (c) Copyright 2006, Micrium, Weston, FL
*                                       All Rights Reserved
*
*
*                                   PIC24FJ128GA010 MPLab Port
*
*
* File : os_cpu.h
* By : 不负责任的天使(^_^)
* Port Version : V2.51
**************************************************************************************************/

#include    <p24fj128ga010.h>
/**************************************************************************************************
*
*                           APPLICATION INDEPENDENT DATA TYPES
*
* Notes : These data types are chosen based upon the C30 compiler datatype specifications
***************************************************************************************************/        
#ifdef  OS_CPU_GLOBALS
#define OS_CPU_EXT
#else
#define OS_CPU_EXT  extern
#endif
 
typedef unsigned char  BOOLEAN;
typedef unsigned char  INT8U;                    /* Unsigned  8 bit quantity, but on f240 it is actually 16 bit */
typedef signed   int  INT8S;                    /* Signed    8 bit quantity, but on f240 it is 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                    */

typedef unsigned int   OS_STK;                   /* Each stack entry is 16-bit wide                    */
typedef unsigned int OS_CPU_SR;                  /*define cup status register is 16b 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_CRITICAL_METHOD 3
#if      OS_CRITICAL_METHOD==3                   /*another two method are not define*/
#define	OS_ENTER_CRITICAL()	{ cpu_sr=SR; SRbits.IPL=7; }
#define	OS_EXIT_CRITICAL()  { SR=cpu_sr; }
#endif                                                                                

#define  OS_STK_GROWTH        0                  /* Stack grows from HIGH to LOW memory on 80x86  */
#define  OS_TASK_SW()        __asm__ volatile ("call _OSCtxSw")        

⌨️ 快捷键说明

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