📄 dsp240x_gpio.h
字号:
//###########################################################################
//
// FILE: DSP281x_Gpio.h
//
// TITLE: DSP281x General Purpose I/O Definitions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 1.00| 11 Sep 2003 | L.H. | Changes since previous version (v.58 Alpha)
// | | | Corrected union definitions that had BIT instead
// | | | of bit
//###########################################################################
#ifndef DSP281x_GPIO_H
#define DSP281x_GPIO_H
#ifdef __cplusplus
extern "C" {
#endif
//----------------------------------------------------
// General purpose I/O (GPIO) Register Bit Definitions
//----------------------------------------------------
// GPIO A mux control register bit definitions */
//
//
struct GPAMUX_BITS { // bits description
Uint16 SCITXD_GPIOA0:1; // 0
Uint16 SCIRXD_GPIOA1:1; // 1
Uint16 XINT1_GPIOA2:1; // 2
Uint16 CAP1Q1_GPIOA3:1; // 3
Uint16 CAP2Q2_GPIOA4:1; // 4
Uint16 CAP3_GPIOA5:1; // 5
Uint16 PWM1_GPIOA6:1; // 6
Uint16 PWM2_GPIOA7:1; // 7
Uint16 PWM3_GPIOB0:1; // 8
Uint16 PWM4_GPIOB1:1; // 9
Uint16 PWM5_GPIOB2:1; // 10
Uint16 PWM6_GPIOB3:1; // 11
Uint16 T1PWM_GPIOB4:1; // 12
Uint16 T2PWM_GPIOB5:1; // 13
Uint16 TDIRA_GPIOB6:1; // 14
Uint16 TCLKINA_GPIOB7:1; // 15
};
//----------------------------------------------------
// General purpose I/O (GPIO) Register Bit Definitions
//----------------------------------------------------
// GPIO B mux control register bit definitions */
//
//
union GPAMUX_REG {
Uint16 all;
struct GPAMUX_BITS bit;
};
struct GPBMUX_BITS { // bits description
Uint16 W/R_GPIOC0:1; // 0
Uint16 BIO_GPIOC1:1; // 1
Uint16 SPISIMO_GPIOC2:1; // 2
Uint16 SPISOMI_GPIOC3:1; // 3
Uint16 SPICLK_GPIOC4:1; // 4
Uint16 SPISTE_GPIOC5:1; // 5
Uint16 CANTX_GPIOC6:1; // 6
Uint16 CANRX_GPIOC7:1; // 7
Uint16 XINT2_GPIOD0:1; // 8
Uint16 rsvd1:7 //9-15
};
union GPBMUX_REG {
Uint16 all;
struct GPBMUX_BITS bit;
};
//---------------------------------------------------------------------------------
// GPIO C mux control register bit definitions
//
//
struct GPCMUX_BITS { // bits description
Uint16 CLKOUT_GPIOE0:1; // 0
Uint16 PWM7_GPIOE1:1; // 1
Uint16 PWM8_GPIOE2:1; // 2
Uint16 PWM9_GPIOE3:1; // 3
Uint16 PWM10_GPIOE4:1; // 4
Uint16 PWM11_GPIOE5:1; // 5
Uint16 PWM12_GPIOE6:1; // 6
Uint16 CAP4_GPIOE7:1; // 7
Uint16 CAP5_GPIOF0:1; // 8
Uint16 CAP6_GPIOF1:1; // 9
Uint16 T3PWM_GPIOF2:1; // 10
Uint16 T4PWM_GPIOF3:1; // 11
Uint16 TDIRB_GPIOF4:1; // 12
Uint16 TCLKINB_GPIOF5:1; // 13
Uint16 IOPF6_GPIOF6:1; // 14
Uint16 rstd:1; // 15
};
union GPCMUX_REG {
Uint16 all;
struct GPCMUX_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPADATDIR_BITS { // bits description
Uint16 GPIOA0:1; // 0
Uint16 GPIOA1:1; // 1
Uint16 GPIOA2:1; // 2
Uint16 GPIOA3:1; // 3
Uint16 GPIOA4:1; // 4
Uint16 GPIOA5:1; // 5
Uint16 GPIOA6:1; // 6
Uint16 GPIOA7:1; // 7
Uint16 GPIOA0DIR:1; // 8
Uint16 GPIOA1DIR:1; // 9
Uint16 GPIOA2DIR:1; // 10
Uint16 GPIOA3DIR:1; // 11
Uint16 GPIOA4DIR:1; // 12
Uint16 GPIOA5DIR:1; // 13
Uint16 GPIOA6DIR:1; // 14
Uint16 GPIOA7DIR:1; // 15
};
union GPADATDIR_REG {
Uint16 all;
struct GPADATDIR_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPBDATDIR_BITS { // bits description
Uint16 GPIOB0:1; // 0
Uint16 GPIOB1:1; // 1
Uint16 GPIOB2:1; // 2
Uint16 GPIOB3:1; // 3
Uint16 GPIOB4:1; // 4
Uint16 GPIOB5:1; // 5
Uint16 GPIOB6:1; // 6
Uint16 GPIOB7:1; // 7
Uint16 GPIOB0DIR:1; // 8
Uint16 GPIOB1DIR:1; // 9
Uint16 GPIOB2DIR:1; // 10
Uint16 GPIOB3DIR:1; // 11
Uint16 GPIOB4DIR:1; // 12
Uint16 GPIOB5DIR:1; // 13
Uint16 GPIOB6DIR:1; // 14
Uint16 GPIOB7DIR:1; // 15
};
union GPBDATDIR_REG {
Uint16 all;
struct GPBDATDIR_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPCDATDIR_BITS { // bits description
Uint16 GPIOC0:1; // 0
Uint16 GPIOC1:1; // 1
Uint16 GPIOC2:1; // 2
Uint16 GPIOC3:1; // 3
Uint16 GPIOC4:1; // 4
Uint16 GPIOC5:1; // 5
Uint16 GPIOC6:1; // 6
Uint16 GPIOC7:1; // 7
Uint16 GPIOC0DIR:1; // 8
Uint16 GPIOC1DIR:1; // 9
Uint16 GPIOC2DIR:1; // 10
Uint16 GPIOC3DIR:1; // 11
Uint16 GPIOC4DIR:1; // 12
Uint16 GPIOC5DIR:1; // 13
Uint16 GPIOC6DIR:1; // 14
Uint16 GPIOC7DIR:1; // 15
};
union GPCDATDIR_REG {
Uint16 all;
struct GPCDATDIR_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPDDATDIR_BITS { // bits description
Uint16 rsvd1:7; // 0
Uint16 GPIOD7:1; // 7
Uint16 GPIOD0DIR:1; // 8
Uint16 rsvd2:7; // 15
};
union GPDDATDIR_REG {
Uint16 all;
struct GPDDATDIR_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPEDATDIR_BITS { // bits description
Uint16 GPIOE0:1; // 0
Uint16 GPIOE1:1; // 1
Uint16 GPIOE2:1; // 2
Uint16 GPIOE3:1; // 3
Uint16 GPIOE4:1; // 4
Uint16 GPIOE5:1; // 5
Uint16 GPIOE6:1; // 6
Uint16 GPIOE7:1; // 7
Uint16 GPIOE0DIR:1; // 8
Uint16 GPIOE1DIR:1; // 9
Uint16 GPIOE2DIR:1; // 10
Uint16 GPIOE3DIR:1; // 11
Uint16 GPIOE4DIR:1; // 12
Uint16 GPIOE5DIR:1; // 13
Uint16 GPIOE6DIR:1; // 14
Uint16 GPIOE7DIR:1; // 15
};
union GPEDATDIR_REG {
Uint16 all;
struct GPEDATDIR_BITS bit;
};
//---------------------------------------------------------------------------------------
// GPIO A Direction control and data register bit definitions
//
//
struct GPFDATDIR_BITS { // bits description
Uint16 GPIOF0:1; // 0
Uint16 GPIOF1:1; // 1
Uint16 GPIOF2:1; // 2
Uint16 GPIOF3:1; // 3
Uint16 GPIOF4:1; // 4
Uint16 GPIOF5:1; // 5
Uint16 GPIOF6:1; // 6
Uint16 rsvd1:1; // 7
Uint16 GPIOF0DIR:1; // 8
Uint16 GPIOF1DIR:1; // 9
Uint16 GPIOF2DIR:1; // 10
Uint16 GPIOF3DIR:1; // 11
Uint16 GPIOF4DIR:1; // 12
Uint16 GPIOF5DIR:1; // 13
Uint16 GPIOF6DIR:1; // 14
Uint16 rsvd2:1; // 15
};
union GPFDATDIR_REG {
Uint16 all;
struct GPFDATDIR_BITS bit;
};
struct GPIO_REGS {
union GPAMUX_REG GPAMUX;
Uint16 rsvd1;
union GPBMUX_REG GPBMUX;
Uint16 rsvd2;
union GPCMUX_REG GPCMUX;
union GPEDATDIR_REG GPEDATDIR;
union GPFDATDIR_REG GPFDATDIR;
union GPADATDIR_REG GPADATDIR;
Uint16 rsvd3;
union GPBDATDIR_REG GPBDATDIR;
Uint16 rsvd4;
union GPCDATDIR_REG GPCDATDIR;
Uint16 rsvd5;
union GPDDATDIR_REG GPDDATDIR;
};
//---------------------------------------------------------------------------
// GPI/O External References & Function Declarations:
//
extern volatile struct GPIO_REGS GpioRegs;
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // end of DSP281x_GPIO_H definition
//===========================================================================
// No more.
//===========================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -