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

📄 ucos51c.h

📁 8051的UCOS实时操作系统(源代码)
💻 H
字号:
/* $Id: ucos51c.h,v 1.8 1997/07/16 15:18:24 gianpi Exp $
 *
 * Description
 *	uC/OS-51 - Processor dependent module interface
 *
 * Author[s]:
 *	Jean Labrosse
 *	Gianpaolo Macario	gianpi@geocities.com
 *
 * Conditionalizations:
 *	_CC51			BSO-Tasking CC51 v4.0r0
 */

#ifndef _UCOS51C_H_
#define _UCOS51C_H_

#ifndef _CC51
#error This include file fits BSO-Tasking CC51 v4.0r0
#endif

/*
************************************************************
*                      CONSTANTS
************************************************************
*/
#ifndef FALSE
#define FALSE 0
#endif

#ifndef TRUE
#define TRUE (!FALSE)
#endif


/*
************************************************************
*                        MACROS
************************************************************
*/
#define  OS_ENTER_CRITICAL()  	(EA = 0)
#define  OS_EXIT_CRITICAL()     (EA = 1)
#define  OS_TASK_SW()           OSCtxSw()

/*
************************************************************
*                       DATA TYPES
************************************************************
*/
typedef char            BOOLEAN;    /* Cannot use _bit in structures */
typedef unsigned char	UBYTE;
typedef signed   char	BYTE;
typedef unsigned int	UWORD;
typedef signed   int	WORD;
typedef unsigned long   ULONG;
typedef signed   long   LONG;

typedef unsigned char	u_char;

#define u_int8_t	UBYTE
#define u_int16_t	UWORD
#define u_int32_t	ULONG

/* Prototypes of functions defined in ucos51a.asm: */

/* Start Multitasking */
void OSStartHighRdy(void);
/* Perform a context switch (from task level) */
void OSCtxSw(void);
/* Perform a context switch (from an ISR) */
void OSIntCtxSw(void);
/* Handle Tick ISR */
void /* _interrupt */ OSTickISR(void);
/* Serial Port ISR */
void /* _interrupt */ OSSerialISR(void);

/* Prototypes of functions defined in ucos51c.c: */

UBYTE OSTaskCreate(
	void _regparm _large (*task)(void *pd),
	void *pdata,
	void *pstk,
	UBYTE p);

/* Prototypes of User-supplied functions: */
void OSSerial(void);

/*
************************************************************
*                       MISC
************************************************************
*/
#define OS_FAR		_large
#define OS_NEAR
#define OS_STK_TYPE	UBYTE

#endif	/* ndef _UCOS51C_H_ */

/* === End of File === */

⌨️ 快捷键说明

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