GD32F1x0
|
Macros | |
#define | CTLR_STIE (0x8000) |
CTLR control register bits definitions. More... | |
#define | CTLR_PMOUIE (0x4000) |
#define | CTLR_ERRIE (0x2000) |
#define | CTLR_WKUPIE (0x1000) |
#define | CTLR_SPSIE (0x0800) |
#define | CTLR_RSTIE (0x0400) |
#define | CTLR_SOFIE (0x0200) |
#define | CTLR_ESOFIE (0x0100) |
#define | CTLR_RSREQ (0x0010) |
#define | CTLR_SETSPS (0x0008) |
#define | CTLR_LOWM (0x0004) |
#define | CTLR_CLOSE (0x0002) |
#define | CTLR_SETRST (0x0001) |
#define | IFR_STIF (0x8000) |
IFR interrupt events bits definitions. More... | |
#define | IFR_PMOUIF (0x4000) |
#define | IFR_ERRIF (0x2000) |
#define | IFR_WKUPIF (0x1000) |
#define | IFR_SPSIF (0x0800) |
#define | IFR_RSTIF (0x0400) |
#define | IFR_SOFIF (0x0200) |
#define | IFR_ESOFIF (0x0100) |
#define | IFR_DIR (0x0010) |
#define | IFR_EPNUM (0x000F) |
#define | CLR_STIF (~IFR_STIF) |
#define | CLR_PMOUIF (~IFR_PMOUIF) |
#define | CLR_ERRIF (~IFR_ERRIF) |
#define | CLR_WKUPIF (~IFR_WKUPIF) |
#define | CLR_SPSIF (~IFR_SPSIF) |
#define | CLR_RSTIF (~IFR_RSTIF) |
#define | CLR_SOFIF (~IFR_SOFIF) |
#define | CLR_ESOFIF (~IFR_ESOFIF) |
#define | SR_RXDP (0x8000) |
SR status register bit definitions. More... | |
#define | SR_RXDM (0x4000) |
#define | SR_LOCK (0x2000) |
#define | SR_SOFLN (0x1800) |
#define | SR_FCNT (0x07FF) |
#define | AR_USBEN (0x80) |
AR device address register bit definitions. More... | |
#define | AR_USBADDR (0x7F) |
#define | SUB_ST (0x8000) |
Sub endpoint register bit definitions. More... | |
#define | SUB_STA (0x3000) |
#define | SUBPID_ATTR (0x07ff) |
#define | ATTR_BREMOTEWAKE (0x0100) |
#define | ATTR_HIRD (0x00f0) |
#define | ATTR_BLINKSTATE (0x000f) |
#define | SUBEP_DISABLE (0x0000) |
STAT_TX[1:0] STATus for Tx transfer. More... | |
#define | SUBEP_STALL (0x1000) |
#define | SUBEP_NYET (0x2000) |
#define | SUBEP_VALID (0x3000) |
#define | LPM_STIE (0x8000) |
LPM control register bit definitions. More... | |
#define | LPM_STIF (0x8000) |
LPM interrupt status register bit definitions. More... | |
#define | LPM_CLR_STIF (~LPM_STIF) |
#define | EPRX_ST (0x8000) |
EPCSR endpoint control and status register bit definitions. More... | |
#define | EPRX_DTG (0x4000) |
#define | EPRX_STA (0x3000) |
#define | EP_SETUP (0x0800) |
#define | EP_CTL (0x0600) |
#define | EP_KCTL (0x0100) |
#define | EPTX_ST (0x0080) |
#define | EPTX_DTG (0x0040) |
#define | EPTX_STA (0x0030) |
#define | EP_AR (0x000F) |
#define | EPCSR_MASK (EPRX_ST|EP_SETUP|EP_CTL|EP_KCTL|EPTX_ST|EP_AR) |
Endpoint control and status register mask (no toggle fields) | |
#define | EP_BULK (0x0000) |
EP_CTL[1:0] endpoint type control. More... | |
#define | EP_CONTROL (0x0200) |
#define | EP_ISO (0x0400) |
#define | EP_INTERRUPT (0x0600) |
#define | EP_CTL_MASK (~EP_CTL & EPCSR_MASK) |
#define | EPKCTL_MASK (~EP_KCTL & EPCSR_MASK) |
Endpoint kind control mask. | |
#define | EPTX_DISABLED (0x0000) |
TX_STA[1:0] status for Tx transfer. More... | |
#define | EPTX_STALL (0x0010) |
#define | EPTX_NAK (0x0020) |
#define | EPTX_VALID (0x0030) |
#define | EPTX_DTGMASK (EPTX_STA | EPCSR_MASK) |
#define | EPRX_DISABLED (0x0000) |
RX_STA[1:0] status for Rx transfer. More... | |
#define | EPRX_STALL (0x1000) |
#define | EPRX_NAK (0x2000) |
#define | EPRX_VALID (0x3000) |
#define | EPRX_DTGMASK (EPRX_STA | EPCSR_MASK) |
#define | EPRXCNTR_BLKSIZ (0x8000) |
Endpoint receive/transmission counter register bit definitions. | |
#define | EPRXCNTR_BLKNUM (0x7C00) |
#define | EPRXCNTR_CNT (0x03FF) |
#define | EPTXCNTR_CNT (0x03FF) |
#define | BLKSIZE_OFFSET (0x01) |
Endpoint receive/transmission counter register bit offset. | |
#define | BLKNUM_OFFSET (0x05) |
#define | RXCNT_OFFSET (0x0A) |
#define | TXCNT_OFFSET (0x0A) |
#define | BLKSIZE32_MASK (0x1f) |
#define | BLKSIZE2_MASK (0x01) |
#define | BLKSIZE32_OFFSETMASK (0x05) |
#define | BLKSIZE2_OFFSETMASK (0x01) |
Detailed Description
Macro Definition Documentation
#define AR_USBADDR (0x7F) |
USB device address
Definition at line 202 of file usb_regs.h.
#define AR_USBEN (0x80) |
AR device address register bit definitions.
USB module enable
Definition at line 201 of file usb_regs.h.
#define ATTR_BLINKSTATE (0x000f) |
Link state
Definition at line 213 of file usb_regs.h.
#define ATTR_BREMOTEWAKE (0x0100) |
bRemoteWake bit in bmAttributes field
Definition at line 211 of file usb_regs.h.
#define ATTR_HIRD (0x00f0) |
Host initiated resume duration field
Definition at line 212 of file usb_regs.h.
#define CLR_ERRIF (~IFR_ERRIF) |
Clear Error flag
Definition at line 182 of file usb_regs.h.
#define CLR_ESOFIF (~IFR_ESOFIF) |
Clear Expected start of frame flag
Definition at line 187 of file usb_regs.h.
#define CLR_PMOUIF (~IFR_PMOUIF) |
Clear Packet memory overrun/underrun flag
Definition at line 181 of file usb_regs.h.
#define CLR_RSTIF (~IFR_RSTIF) |
Clear Reset flag
Definition at line 185 of file usb_regs.h.
#define CLR_SOFIF (~IFR_SOFIF) |
Clear Start of frame flag
Definition at line 186 of file usb_regs.h.
#define CLR_SPSIF (~IFR_SPSIF) |
Clear Suspend state flag
Definition at line 184 of file usb_regs.h.
#define CLR_STIF (~IFR_STIF) |
Clear Successful transfer flag
Definition at line 180 of file usb_regs.h.
#define CLR_WKUPIF (~IFR_WKUPIF) |
Clear Wake up flag
Definition at line 183 of file usb_regs.h.
#define CTLR_CLOSE (0x0002) |
Goes to close state
Definition at line 163 of file usb_regs.h.
#define CTLR_ERRIE (0x2000) |
Error interrupt enable Mask
Definition at line 154 of file usb_regs.h.
#define CTLR_ESOFIE (0x0100) |
Expected start of frame interrupt enable Mask
Definition at line 159 of file usb_regs.h.
#define CTLR_LOWM (0x0004) |
Low-power mode at suspend state
Definition at line 162 of file usb_regs.h.
#define CTLR_PMOUIE (0x4000) |
Packet memory overrun/underrun interrupt enable Mask
Definition at line 153 of file usb_regs.h.
#define CTLR_RSREQ (0x0010) |
Resume request
Definition at line 160 of file usb_regs.h.
#define CTLR_RSTIE (0x0400) |
Reset interrupt enable Mask
Definition at line 157 of file usb_regs.h.
#define CTLR_SETRST (0x0001) |
Set USB reset
Definition at line 164 of file usb_regs.h.
#define CTLR_SETSPS (0x0008) |
Set suspend state
Definition at line 161 of file usb_regs.h.
#define CTLR_SOFIE (0x0200) |
Start of frame interrupt enable Mask
Definition at line 158 of file usb_regs.h.
#define CTLR_SPSIE (0x0800) |
Suspend state interrupt enable Mask
Definition at line 156 of file usb_regs.h.
#define CTLR_STIE (0x8000) |
CTLR control register bits definitions.
Successful transfer interrupt enable Mask
Definition at line 152 of file usb_regs.h.
#define CTLR_WKUPIE (0x1000) |
Wakeup interrupt enable Mask
Definition at line 155 of file usb_regs.h.
#define EP_AR (0x000F) |
EndPoint address
Definition at line 246 of file usb_regs.h.
#define EP_BULK (0x0000) |
#define EP_CONTROL (0x0200) |
CONTROL endpoint
Definition at line 257 of file usb_regs.h.
#define EP_CTL (0x0600) |
EndPoint type control
Definition at line 241 of file usb_regs.h.
#define EP_INTERRUPT (0x0600) |
INTERRUPT endpoint
Definition at line 259 of file usb_regs.h.
#define EP_ISO (0x0400) |
ISOCHRONOUS endpoint
Definition at line 258 of file usb_regs.h.
#define EP_KCTL (0x0100) |
EndPoint kind control
Definition at line 242 of file usb_regs.h.
#define EP_SETUP (0x0800) |
EndPoint setup transaction completed
Definition at line 240 of file usb_regs.h.
#define EPRX_DISABLED (0x0000) |
RX_STA[1:0] status for Rx transfer.
Ignore all reception requests of this endpoint
Definition at line 279 of file usb_regs.h.
#define EPRX_DTG (0x4000) |
EndPoint reception data PID toggle
Definition at line 238 of file usb_regs.h.
#define EPRX_NAK (0x2000) |
NAK handshake status
Definition at line 281 of file usb_regs.h.
#define EPRX_ST (0x8000) |
EPCSR endpoint control and status register bit definitions.
EndPoint reception successful transferred
Definition at line 237 of file usb_regs.h.
#define EPRX_STA (0x3000) |
EndPoint reception status bits
Definition at line 239 of file usb_regs.h.
#define EPRX_STALL (0x1000) |
STALL handshake status
Definition at line 280 of file usb_regs.h.
#define EPRX_VALID (0x3000) |
Enable endpoint for reception
Definition at line 282 of file usb_regs.h.
#define EPTX_DISABLED (0x0000) |
TX_STA[1:0] status for Tx transfer.
Ignore all transmission request of this endpoint
Definition at line 270 of file usb_regs.h.
#define EPTX_DTG (0x0040) |
EndPoint transmission data toggle
Definition at line 244 of file usb_regs.h.
#define EPTX_NAK (0x0020) |
NAK handshake status
Definition at line 272 of file usb_regs.h.
#define EPTX_ST (0x0080) |
EndPoint transmission successful transfer
Definition at line 243 of file usb_regs.h.
#define EPTX_STA (0x0030) |
EndPoint transmission transfers status bits
Definition at line 245 of file usb_regs.h.
#define EPTX_STALL (0x0010) |
STALL handshake status
Definition at line 271 of file usb_regs.h.
#define EPTX_VALID (0x0030) |
Enable this endpoint for transmission
Definition at line 273 of file usb_regs.h.
#define IFR_DIR (0x0010) |
Direction of transaction (read-only bit)
Definition at line 177 of file usb_regs.h.
#define IFR_EPNUM (0x000F) |
Endpoint number (read-only bit)
Definition at line 178 of file usb_regs.h.
#define IFR_ERRIF (0x2000) |
Error interrupt flag (clear-only bit)
Definition at line 171 of file usb_regs.h.
#define IFR_ESOFIF (0x0100) |
Expected start of frame interrupt flag(clear-only bit)
Definition at line 176 of file usb_regs.h.
#define IFR_PMOUIF (0x4000) |
Packet memory overrun/underrun interrupt flag (clear-only bit)
Definition at line 170 of file usb_regs.h.
#define IFR_RSTIF (0x0400) |
Reset interrupt flag (clear-only bit)
Definition at line 174 of file usb_regs.h.
#define IFR_SOFIF (0x0200) |
Start of frame interrupt flag (clear-only bit)
Definition at line 175 of file usb_regs.h.
#define IFR_SPSIF (0x0800) |
Suspend state interrupt flag (clear-only bit)
Definition at line 173 of file usb_regs.h.
#define IFR_STIF (0x8000) |
IFR interrupt events bits definitions.
Successful transfer interrupt flag (read only bit)
Definition at line 169 of file usb_regs.h.
#define IFR_WKUPIF (0x1000) |
Wakeup interrupt flag (clear-only bit)
Definition at line 172 of file usb_regs.h.
#define LPM_CLR_STIF (~LPM_STIF) |
clear successful transfer interrupt flag
Definition at line 232 of file usb_regs.h.
#define LPM_STIE (0x8000) |
LPM control register bit definitions.
LPM token successful transfer interrupt enable mask
Definition at line 226 of file usb_regs.h.
#define LPM_STIF (0x8000) |
LPM interrupt status register bit definitions.
LPM token successful transfer interrupt flag
Definition at line 231 of file usb_regs.h.
#define SR_FCNT (0x07FF) |
Frame number count
Definition at line 196 of file usb_regs.h.
#define SR_LOCK (0x2000) |
Locked the USB
Definition at line 194 of file usb_regs.h.
#define SR_RXDM (0x4000) |
Receive data - line status
Definition at line 193 of file usb_regs.h.
#define SR_RXDP (0x8000) |
SR status register bit definitions.
Receive data + line status
Definition at line 192 of file usb_regs.h.
#define SR_SOFLN (0x1800) |
SOF lost number
Definition at line 195 of file usb_regs.h.
#define SUB_ST (0x8000) |
Sub endpoint register bit definitions.
LPM token successful receive
Definition at line 207 of file usb_regs.h.
#define SUB_STA (0x3000) |
Status bits for the handshake of receiving subpid LPM
Definition at line 208 of file usb_regs.h.
#define SUBEP_DISABLE (0x0000) |
STAT_TX[1:0] STATus for Tx transfer.
Ignore all LPM token reception requests of this endpoint
Definition at line 218 of file usb_regs.h.
#define SUBEP_NYET (0x2000) |
NYET handshake status
Definition at line 220 of file usb_regs.h.
#define SUBEP_STALL (0x1000) |
STALL handshake status
Definition at line 219 of file usb_regs.h.
#define SUBEP_VALID (0x3000) |
Enable endpoint for reception LPM token
Definition at line 221 of file usb_regs.h.
#define SUBPID_ATTR (0x07ff) |
LPM token bmattribute field
Definition at line 209 of file usb_regs.h.
Generated by
