?? os_cpu.h
字號:
/*
*********************************************************************************************************
* uC/OS-II
* The Real-Time Kernel
*
* (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
* All Rights Reserved
* (c) Copyright ARM Limited 1999. All rights reserved.
*
* ARM Specific code
*
* File : OS_CPU.H
*********************************************************************************************************
*/
#include <hidef.h> /* common defines and macros */
#include <MC9S12GC128.h> /* cpu register */
#ifdef OS_CPU_GLOBALS
#define OS_CPU_EXT
#else
#define OS_CPU_EXT extern
#endif
/*
*********************************************************************************************************
* 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 char OS_STK; /* Each stack entry is 16-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
/*
*********************************************************************************************************
* ARM, various architectures
*
*********************************************************************************************************
*/
#define OS_TASK_SW() OSCtxSw()
#define OS_ENTER_CRITICAL() DisableInterrupts
#define OS_EXIT_CRITICAL() EnableInterrupts
/*
* Definitions specific to Freescale 9S12
*/
/* stack stuff 堆棧增長方向*/
#define OS_STK_GROWTH 1
typedef struct{
OS_STK *Sys_stack_ptr;
}SYS_Stk;
extern SYS_Stk *Sys_sp;
#define OS_SAVE_SP() if(OSIntNesting==1){asm ldx OSTCBCur;asm sts 0,x;asm ldx Sys_sp;asm lds 0,x;}//保存第一層被中斷打斷任務(wù)的堆棧現(xiàn)場 切換到系統(tǒng)堆棧
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -