📄 common.h
字号:
#define VIDEOSIZE 49000
#define PICTURESIZE 21168
#define PCMSIZE 256*16
#define C51_TO_DSP_PORT *(unsigned short *)0x7e
#define DSP_TO_51_PORT *(unsigned short *)0x7d
#define COM_PORT *(unsigned short *)0x7c
#define VIDEO_PORT (int *)0x4000
#define PCM_PORT (int *)0x4000
void delay(int k);
/////////////////////////////////
#define NULL 0
#define TRUE 1
#define FALSE 0
#define UARTBUF_LENGTH 520//16384
#define BUFFER_LENGTH 520 //8192
#define MAX_READ_LENGTH 1024//16384
#define MAX_WRITE_LENGTH 1024//2048
typedef unsigned char INT8;
typedef unsigned short INT16;
typedef unsigned long INT32;
typedef union {
struct
{
INT8 Type;
INT8 Index;
} Descriptor;
struct
{
INT8 tx0; // MSB for 8051 Keil C
INT8 tx1;
INT8 endp;
INT8 c0; // LSB for 8051 Keil C
} chars;
struct
{
INT8 c3; // MSB for 8051 Keil C
INT8 c2;
INT8 c1;
INT8 c0; // LSB for 8051 Keil C
} chars0;
struct
{
INT16 i1; // MSW for 8051 keil C
INT16 i0; // LSW for 8051 Keil C
} ints;
INT32 u0;
} FLEXI_INT32;
typedef union {
struct
{
INT8 c1; // MSB for 8051 Keil C
INT8 c0; // LSB for 8051 Keil C
} chars;
INT16 i0;
} FLEXI_INT16, * PFLEXI_INT16;
typedef union __FLAGS
{
struct _FLAGS
{
unsigned char bTimer ;
unsigned char bIN_ISR ;
unsigned char bCOM_ERR ;
unsigned char bTimeout ;
unsigned char SLAVE_IS_ATTACHED ;
unsigned char SLAVE_REMOVED ;
unsigned char SLAVE_FOUND ; // Slave USB device found
unsigned char SLAVE_ENUMERATED ; // slave USB device enumeration done
unsigned char SLAVE_ONLINE ;
unsigned char TIMEOUT_ERR ; // timeout error during data endpoint transfer
unsigned char DATA_STOP ; // device unplugged during data transfer
unsigned char bData1 ;
unsigned char bUartInDone ;
///////////////////////////////////////////
unsigned char bMassDevice ;
} bits;
} FLAGS;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -