?? common.h
字號:
//===================================================================//
// Project Name : MOTOROLA-PDIUSBD12 USB-MCS CARD
// Module Name : Master Firmware Program
// Product Type : License
// OS/Dev Tool : CodeWarrior Development Studio for HC(S)08 Microcontrollers
// Original Author : Ming Zeng
// Organization : Tsinghua University , DEP
// Original Date : Feb, 20, 2003
// Addr : Tsinghua University, Beijing City
// TEL :
// EMail : ming@zming.net
// Website : http://www.zming.net
// Copyright : Copyright ZMing.net, 2003
// Comments :
//
//
//===================================================================//
#ifndef __COMMON_H__
#define __COMMON_H__
#include "68hc08gp32.h"
#include <hidef.h>
// New type definitions
typedef unsigned char boolean;
typedef unsigned char BOOL;
typedef unsigned char UCHAR;
typedef unsigned short USHORT;
typedef unsigned long ULONG;
/**************************************************************************/
/* macro */
/**************************************************************************/
#define SWAP(x) ((((x) & 0xFF) << 8) | (((x) >> 8) & 0xFF))//高低字節(jié)換序宏
#define MSB(x) (((x) >> 8) & 0xFF)//高字節(jié)
#define LSB(x) ((x) & 0xFF)//低字節(jié)
#define FALSE 0
#define true TRUE
#define false FALSE
#define DMA_IDLE 0
#define DMA_RUNNING 1
#define DMA_PENDING 2
typedef union _COMMON_FLAGS
{
struct _FLAGS
{
unsigned char bTimer ;//: 1;
unsigned char bBus_Reset ;//: 1;
unsigned char bSuspend ;//: 1;
unsigned char bSetup_Packet ;//: 1;
unsigned char bRemote_Wakeup ;//: 1;
unsigned char bIN_ISR ;//: 1;
unsigned char bControl_State ;//: 2;
unsigned char bConfiguration ;//: 1;
unsigned char bDMA_State ;//: 2;
unsigned char bRun ;//: 1; // Used for Run
unsigned char bUSB_Busy ;// USB事件處理中
} bits;
unsigned short nValue;
} COMMONFLAGS;
#endif /*__COMMON_H__*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -