?? ports_def.h
字號:
#define PWMCNT6 PORTIO_8(IO_BASE + 0xb2) /* PWM Channel Counter 6 */
#define PWMCNT7 PORTIO_8(IO_BASE + 0xb3) /* PWM Channel Counter 7 */
#define PWMPER0 PORTIO_8(IO_BASE + 0xb4) /* PWM Channel Period 0 */
#define PWMPER1 PORTIO_8(IO_BASE + 0xb5) /* PWM Channel Period 1 */
#define PWMPER2 PORTIO_8(IO_BASE + 0xb6) /* PWM Channel Period 2 */
#define PWMPER3 PORTIO_8(IO_BASE + 0xb7) /* PWM Channel Period 3 */
#define PWMPER4 PORTIO_8(IO_BASE + 0xb8) /* PWM Channel Period 4 */
#define PWMPER5 PORTIO_8(IO_BASE + 0xb9) /* PWM Channel Period 5 */
#define PWMPER6 PORTIO_8(IO_BASE + 0xba) /* PWM Channel Period 6 */
#define PWMPER7 PORTIO_8(IO_BASE + 0xbb) /* PWM Channel Period 7 */
#define PWMDTY0 PORTIO_8(IO_BASE + 0xbc) /* PWM Channel Duty 0 */
#define PWMDTY1 PORTIO_8(IO_BASE + 0xbd) /* PWM Channel Duty 1 */
#define PWMDTY2 PORTIO_8(IO_BASE + 0xbe) /* PWM Channel Duty 2 */
#define PWMDTY3 PORTIO_8(IO_BASE + 0xbf) /* PWM Channel Duty 3 */
#define PWMDTY4 PORTIO_8(IO_BASE + 0xc0) /* PWM Channel Duty 4 */
#define PWMDTY5 PORTIO_8(IO_BASE + 0xc1) /* PWM Channel Duty 5 */
#define PWMDTY6 PORTIO_8(IO_BASE + 0xc2) /* PWM Channel Duty 6 */
#define PWMDTY7 PORTIO_8(IO_BASE + 0xc3) /* PWM Channel Duty 7 */
#define PWMSDN PORTIO_8(IO_BASE + 0xc4) /* PWM shutdown register */
/* SCI register offsets
jeffs: Use these to offset any standard SCI base
*/
#define _SCIBD 0x0 /* SCI baud rate high */
#define _SCIBDH 0x0 /* SCI baud rate high */
#define _SCIBDL 0x1 /* SCI baud rate low */
#define _SCICR1 0x2 /* SCI control register 1 */
#define _SCICR2 0x3 /* SCI control register 2 */
#define _SCISR1 0x4 /* SCI status register 1 */
#define _SCISR2 0x5 /* SCI status register 2 */
#define _SCIDRH 0x6 /* SCI data register high */
#define _SCIDRL 0x7 /* SCI data register low */
/* SCI0 Module
jeffs: Use symbols like SCI0_BASE to reference which SCI block
*/
#define SCI0_BASE (IO_BASE + 0xc8)
#define SCI0BD PORTIO_16(IO_BASE + 0xc8) /* SCI 0 baud rate high */
#define SCI0BDH PORTIO_8(IO_BASE + 0xc8) /* SCI 0 baud rate high */
#define SCI0BDL PORTIO_8(IO_BASE + 0xc9) /* SCI 0 baud rate low */
#define SCI0CR1 PORTIO_8(IO_BASE + 0xca) /* SCI 0 control register 1 */
#define SCI0CR2 PORTIO_8(IO_BASE + 0xcb) /* SCI 0 control register 2 */
#define SCI0SR1 PORTIO_8(IO_BASE + 0xcc) /* SCI 0 status register 1 */
#define SCI0SR2 PORTIO_8(IO_BASE + 0xcd) /* SCI 0 status register 2 */
#define SCI0DRH PORTIO_8(IO_BASE + 0xce) /* SCI 0 data register high */
#define SCI0DRL PORTIO_8(IO_BASE + 0xcf) /* SCI 0 data register low */
/* SCI1 Module
*/
#define SCI1_BASE (IO_BASE + 0xd0)
#define SCI1BD PORTIO_16(IO_BASE + 0xd0) /* SCI 1 16bit baud rate */
#define SCI1BDH PORTIO_8(IO_BASE + 0xd0) /* SCI 1 baud rate high */
#define SCI1BDL PORTIO_8(IO_BASE + 0xd1) /* SCI 1 baud rate low */
#define SCI1CR1 PORTIO_8(IO_BASE + 0xd2) /* SCI 1 control register 1 */
#define SCI1CR2 PORTIO_8(IO_BASE + 0xd3) /* SCI 1 control register 2 */
#define SCI1SR1 PORTIO_8(IO_BASE + 0xd4) /* SCI 1 status register 1 */
#define SCI1SR2 PORTIO_8(IO_BASE + 0xd5) /* SCI 1 status register 2 */
#define SCI1DRH PORTIO_8(IO_BASE + 0xd6) /* SCI 1 data register high */
#define SCI1DRL PORTIO_8(IO_BASE + 0xd7) /* SCI 1 data register low */
//SCInSR1
#define TDRE 0x80
#define RDRF 0x20
#define IDLE 0x10
/* SPI register offsets
*/
#define _SPICR1 PORTIO_8(IO_BASE + 0x0) /* SPI control register 1 */
#define _SPICR2 PORTIO_8(IO_BASE + 0x1) /* SPI control register 2 */
#define _SPIBR PORTIO_8(IO_BASE + 0x2) /* SPI baud rate register */
#define _SPISR PORTIO_8(IO_BASE + 0x3) /* SPI status register */
#define _SPIDR PORTIO_8(IO_BASE + 0x5) /* SPI data register */
/* SPI0 Module
*/
#define SPI0_BASE (IO_BASE + 0xd8)
#define SPI0CR1 PORTIO_8(IO_BASE + 0xd8) /* SPI 0 control register 1 */
#define SPI0CR2 PORTIO_8(IO_BASE + 0xd9) /* SPI 0 control register 2 */
#define SPI0BR PORTIO_8(IO_BASE + 0xda) /* SPI 0 baud rate register */
#define SPI0SR PORTIO_8(IO_BASE + 0xdb) /* SPI 0 status register */
#define SPI0DR PORTIO_8(IO_BASE + 0xdd) /* SPI 0 data register */
//SPInCR1
#define SPIE 0x80
#define SPE 0x40
#define SPTIE 0x20
#define MSTR 0x10
#define CPOL 0x08
#define CPHA 0x04
#define SSOE 0x02
#define LSBFE 0x01
//SPInSR
#define SPIF 0x80
#define SPTEF 0x20
#define MODF 0x10
/* I2C Module
*/
#define IBAD PORTIO_8(IO_BASE + 0xe0) /* I2C address register */
#define IBFD PORTIO_8(IO_BASE + 0xe1) /* I2C freqency divider reg */
#define IBCR PORTIO_8(IO_BASE + 0xe2) /* I2C control register */
#define IBSR PORTIO_8(IO_BASE + 0xe3) /* I2C status register */
#define IBDR PORTIO_8(IO_BASE + 0xe4) /* I2C data register */
//IBSR
#define TCF 0x80
#define IAAS 0x40
#define IBB 0x20
#define IBAL 0x10
#define SRW 0x04
#define IBIF 0x02
#define RXAK 0x01
/* BDLC Module
*/
#define DLCBCR1 PORTIO_8(IO_BASE + 0xe8) /* BDLC control register 1 */
#define DLCBSVR PORTIO_8(IO_BASE + 0xe9) /* BDLC state vector register */
#define DLCBCR2 PORTIO_8(IO_BASE + 0xea) /* BDLC control register 2 */
#define DLCBDR PORTIO_8(IO_BASE + 0xeb) /* BDLC data register */
#define DLCBARD PORTIO_8(IO_BASE + 0xec) /* BDLC analog round trip delay */
#define DLCBRSR PORTIO_8(IO_BASE + 0xed) /* BDLC rate select register */
#define DLCSCR PORTIO_8(IO_BASE + 0xee) /* BDLC control register */
#define DLCBSTAT PORTIO_8(IO_BASE + 0xef) /* BDLC status register */
/* SPI1 Module
*/
#define SPI1_BASE (IO_BASE + 0xf0)
#define SPI1CR1 PORTIO_8(IO_BASE + 0xf0) /* SPI 1 control register 1 */
#define SPI1CR2 PORTIO_8(IO_BASE + 0xf1) /* SPI 1 control register 2 */
#define SPI1BR PORTIO_8(IO_BASE + 0xf2) /* SPI 1 baud rate register */
#define SPI1SR PORTIO_8(IO_BASE + 0xf3) /* SPI 1 status register */
#define SPI1DR PORTIO_8(IO_BASE + 0xf5) /* SPI 1 data register */
/* SPI2 Module
*/
#define SPI2_BASE (IO_BASE + 0xf8)
#define SPI2CR1 PORTIO_8(IO_BASE + 0xf8) /* SPI 2 control register 1 */
#define SPI2CR2 PORTIO_8(IO_BASE + 0xf9) /* SPI 2 control register 2 */
#define SPI2BR PORTIO_8(IO_BASE + 0xfa) /* SPI 2 baud rate register */
#define SPI2SR PORTIO_8(IO_BASE + 0xfb) /* SPI 2 status register */
#define SPI2DR PORTIO_8(IO_BASE + 0xfd) /* SPI 2 data register */
/* FLC Module
*/
#define FCLKDIV PORTIO_8(IO_BASE + 0x100) /* flash clock divider */
#define FSEC PORTIO_8(IO_BASE + 0x101) /* flash security register */
#define FCNFG PORTIO_8(IO_BASE + 0x103) /* flash configuration register */
#define FPROT PORTIO_8(IO_BASE + 0x104) /* flash protection register */
#define FSTAT PORTIO_8(IO_BASE + 0x105) /* flash status register */
#define FCMD PORTIO_8(IO_BASE + 0x106) /* flash command register */
/* EEPROM Module
*/
#define ECLKDIV PORTIO_8(IO_BASE + 0x110) /* eeprom clock divider */
#define ECNFG PORTIO_8(IO_BASE + 0x113) /* eeprom configuration register */
#define EPROT PORTIO_8(IO_BASE + 0x114) /* eeprom protection register */
#define ESTAT PORTIO_8(IO_BASE + 0x115) /* eeprom status register */
#define ECMD PORTIO_8(IO_BASE + 0x116) /* eeprom command register */
/* ATD1 Module
*/
#define ATD1_BASE (IO_BASE + 0x120)
#define ATD1CTL0 PORTIO_8(IO_BASE + 0x120) /* A/D1 control register 0 */
#define ATD1CTL1 PORTIO_8(IO_BASE + 0x121) /* A/D1 control register 1 */
#define ATD1CTL2 PORTIO_8(IO_BASE + 0x122) /* A/D1 control register 2 */
#define ATD1CTL3 PORTIO_8(IO_BASE + 0x123) /* A/D1 control register 3 */
#define ATD1CTL4 PORTIO_8(IO_BASE + 0x124) /* A/D1 control register 4 */
#define ATD1CTL5 PORTIO_8(IO_BASE + 0x125) /* A/D1 control register 5 */
#define ATD1STAT0 PORTIO_8(IO_BASE + 0x126) /* A/D1 status register 0 */
#define ATD1STAT1 PORTIO_8(IO_BASE + 0x127) /* A/D1 status register 1 */
#define ATD1TEST0 PORTIO_8(IO_BASE + 0x128) /* A/D1 test register 0 */
#define ATD1TEST1 PORTIO_8(IO_BASE + 0x129) /* A/D1 test register 1 */
#define ATD1DIEN PORTIO_8(IO_BASE + 0x12d) /* A/D1 interrupt enable */
#define PORTAD1 PORTIO_8(IO_BASE + 0x12f) /* port AD1 data input register */
#define ATD1DR0 PORTIO_16(IO_BASE + 0x130) /* A/D1 result 0 */
#define ATD1DR0H PORTIO_8(IO_BASE + 0x130) /* A/D1 result 0 */
#define ATD1DR1 PORTIO_16(IO_BASE + 0x132) /* A/D1 result 1 */
#define ATD1DR1H PORTIO_8(IO_BASE + 0x132) /* A/D1 result 1 */
#define ATD1DR2 PORTIO_16(IO_BASE + 0x134) /* A/D1 result 2 */
#define ATD1DR2H PORTIO_8(IO_BASE + 0x134) /* A/D1 result 2 */
#define ATD1DR3 PORTIO_16(IO_BASE + 0x136) /* A/D1 result 3 */
#define ATD1DR3H PORTIO_8(IO_BASE + 0x136) /* A/D1 result 3 */
#define ATD1DR4 PORTIO_16(IO_BASE + 0x138) /* A/D1 result 4 */
#define ATD1DR4H PORTIO_8(IO_BASE + 0x138) /* A/D1 result 4 */
#define ATD1DR5 PORTIO_16(IO_BASE + 0x13a) /* A/D1 result 5 */
#define ATD1DR5H PORTIO_8(IO_BASE + 0x13a) /* A/D1 result 5 */
#define ATD1DR6 PORTIO_16(IO_BASE + 0x13c) /* A/D1 result 6 */
#define ATD1DR6H PORTIO_8(IO_BASE + 0x13c) /* A/D1 result 6 */
#define ATD1DR7 PORTIO_16(IO_BASE + 0x13e) /* A/D1 result 7 */
#define ATD1DR7H PORTIO_8(IO_BASE + 0x13e) /* A/D1 result 7 */
/* CAN0 Module
*/
#define CAN0_BASE (IO_BASE + 0x140)
#define CAN0CTL0 PORTIO_8(IO_BASE + 0x140) /* CAN0 control register 0 */
#define CAN0CTL1 PORTIO_8(IO_BASE + 0x141) /* CAN0 control register 1 */
#define CAN0BTR0 PORTIO_8(IO_BASE + 0x142) /* CAN0 bus timing register 0 */
#define CAN0BTR1 PORTIO_8(IO_BASE + 0x143) /* CAN0 bus timing register 1 */
#define CAN0RFLG PORTIO_8(IO_BASE + 0x144) /* CAN0 receiver flag register */
#define CAN0RIER PORTIO_8(IO_BASE + 0x145) /* CAN0 receiver interrupt reg */
#define CAN0TFLG PORTIO_8(IO_BASE + 0x146) /* CAN0 transmitter flag reg */
#define CAN0TIER PORTIO_8(IO_BASE + 0x147) /* CAN0 transmitter control reg */
#define CAN0TARQ PORTIO_8(IO_BASE + 0x148) /* CAN0 transmitter abort request */
#define CAN0TAAK PORTIO_8(IO_BASE + 0x149) /* CAN0 transmitter abort acknowledge */
#define CAN0TBSEL PORTIO_8(IO_BASE + 0x14a) /* CAN0 transmit buffer selection */
#define CAN0IDAC PORTIO_8(IO_BASE + 0x14b) /* CAN0 identifier acceptance */
#define CAN0RXERR PORTIO_8(IO_BASE + 0x14e) /* CAN0 receive error counter */
#define CAN0TXERR PORTIO_8(IO_BASE + 0x14f) /* CAN0 transmit error counter */
#define CAN0IDAR0 PORTIO_8(IO_BASE + 0x150) /* CAN0 id acceptance reg 0 */
#define CAN0IDAR1 PORTIO_8(IO_BASE + 0x151) /* CAN0 id acceptance reg 1 */
#define CAN0IDAR2 PORTIO_8(IO_BASE + 0x152) /* CAN0 id acceptance reg 2 */
#define CAN0IDAR3 PORTIO_8(IO_BASE + 0x153) /* CAN0 id acceptance reg 3 */
#define CAN0IDMR0 PORTIO_8(IO_BASE + 0x154) /* CAN0 id mask register 0 */
#define CAN0IDMR1 PORTIO_8(IO_BASE + 0x155) /* CAN0 id mask register 1 */
#define CAN0IDMR2 PORTIO_8(IO_BASE + 0x156) /* CAN0 id mask register 2 */
#define CAN0IDMR3 PORTIO_8(IO_BASE + 0x157) /* CAN0 id mask register 3 */
#define CAN0IDAR4 PORTIO_8(IO_BASE + 0x158) /* CAN0 id acceptance reg 4 */
#define CAN0IDAR5 PORTIO_8(IO_BASE + 0x159) /* CAN0 id acceptance reg 5 */
#define CAN0IDAR6 PORTIO_8(IO_BASE + 0x15a) /* CAN0 id acceptance reg 6 */
#define CAN0IDAR7 PORTIO_8(IO_BASE + 0x15b) /* CAN0 id acceptance reg 7 */
#define CAN0IDMR4 PORTIO_8(IO_BASE + 0x15c) /* CAN0 id mask register 4 */
#define CAN0IDMR5 PORTIO_8(IO_BASE + 0x15d) /* CAN0 id mask register 5 */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -