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

📄 reg_bit.h

📁 DSP控制1362做从设备
💻 H
字号:
#ifndef _REG_BIT_H
#define _REG_BIT_H
/*----  DcHardwareConfiguration register bit define---- */
#define EXTPUL  0x4000
#define NOLAZY  0x2000
#define CLKRUN  0x1000
//#define CLKDIV   ??共有3位,如何定义呢?
#define DAKOLY  0x0080
#define DPQPOL  0x0040
#define DAKPOL  0x0020
//0x0010 is reserved
#define WKUPCS  0x0008
//0x0004 is reserved
#define INTLVL  0x0002
#define INTPOL  0x0001

/*-------------DcMode register bit define-------------*/
// bit 7-6 and bit 4,bit 1 is reserved
#define GOSUSP  0x20
#define INTENA  0x08
#define DBGMOD  0x04
#define SOFTCT	0x01


/*----------DcEndpointConfiguration register bit define--------*/
#define FIFOEN  0x80
#define EPDIR 	0x40
#define DBLBUF	0x20
#define FFOISO	0x10
//bit[3...0]is ffosz,select the buffer memory size

//*-----------DcInterrrupt register bit define ---------------*/
//bit[31...24]is reserved
//bit[23...10]is indicates the interrupt source(s):endpoint 14 to 1, how to define them?
//unsigned char REG;
//#define INT_EP1			1<<(9+REG)
#define INT_EP0IN		0x00000200
#define INT_EP0OUT		0x00000100
#define INT_BUSSTATUS	0x0080
#define INT_SPEOT		0x0040
#define INT_PSOF		0x0020
#define INT_SOF			0x0010
#define INT_EOT			0x0008
#define INT_SUSPEND		0x0004
#define INT_RESUME		0x0002
#define INT_RESET		0x0001

//*------------DcEndpointStatus register bit define------------*/
#define EPSTAL			0x80
#define EPFULL1			0x40
#define EPFULL0			0x20
#define DATA_PID		0x10
#define OVERWRITE		0x08
#define SETUPT			0x04
#define CPUBUF			0x02
//bit 0 is reserved
#endif _REG_BIT_H

⌨️ 快捷键说明

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