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

📄 includes.h

📁 ucos2.85在vs2005上模拟环境
💻 H
字号:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                The Real-Time Kernel (by Jean J. Labrosse)
*
*					WIN32 PORT & LINUX PORT
*
*                          (c) Copyright 2004-... Werner.Zimmermann@hs-esslingen.de
*                                           All Rights Reserved
*
* File : INCLUDES.H
* By   : Werner Zimmermann
*********************************************************************************************************
*/

#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <time.h>
#include <string.h>

#ifndef __GNUC__
#include <conio.h>
#endif

#ifdef __WIN32__
#include <windows.h>
#endif

#ifdef __GNUC__
#include <unistd.h>
#include <termios.h>
#include <sys/time.h>
#endif

#include "os_cpu.h"
#include "os_cfg.h"
#include "ucos_ii.h"
#include "pc.h"

#define false	0
#define true	1

typedef unsigned char 	u8;
typedef unsigned int 	u32;
typedef unsigned int 	U32;

typedef            int   bool;
typedef          char    char_t;
typedef signed   char    int8_t;
typedef signed   short   int16_t;
typedef signed     int   int32_t;
typedef unsigned  char   uint8_t;
typedef unsigned short  uint16_t;
typedef unsigned   int  uint32_t;
typedef long long        int64_t;
typedef unsigned long long uint64_t;
typedef          float  float32_t;
typedef int64_t offset_t;
typedef unsigned   int  uint;

typedef u32          RTOS_Thread;                     //!< the thread identifier type
typedef u32          RTOS_Semaphore;                  //!< the semaphore identifier type
typedef u32          RTOS_Mutex;                      //!< the mutex semaphore identifier type
typedef u32          RTOS_Mailbox;                    //!< the mailbox identifier type
typedef u32          RTOS_Mailqueue;                  //!< the mailqueue identifier type
typedef void*        RTOS_Message;                    //!< the generic message identifier type
typedef u32          RTOS_Semaphore;                  //!< the semaphore identifier type


#define _error(msg) do{  \
	OS_CPU_SR  cpu_sr;	\
 OS_ENTER_CRITICAL();	\
 printf("%s",msg);		\
  OS_EXIT_CRITICAL();	\
}while(0)


#define _log(msg)	do{   \
	OS_CPU_SR  cpu_sr;	\
 OS_ENTER_CRITICAL();	\
 printf("%s",msg);		\
  OS_EXIT_CRITICAL();	\
}while(0)


⌨️ 快捷键说明

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