libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the STM32F* USB drivers More...
Defined Constants and Types for the STM32F* USB drivers
LGPL License Terms libopencm3 License
#define USB_BTABLE_BTABLE 0xFFF8 |
Definition at line 139 of file st_usbfs_common.h.
#define USB_BTABLE_REG (&MMIO32(USB_DEV_FS_BASE + 0x50)) |
Definition at line 68 of file st_usbfs_common.h.
#define USB_CLR_EP_KIND | ( | EP | ) |
Definition at line 248 of file st_usbfs_common.h.
#define USB_CLR_EP_NTOGGLE_BIT_AND_SET | ( | EP, | |
BIT, | |||
EXTRA_BITS | |||
) |
Definition at line 225 of file st_usbfs_common.h.
#define USB_CLR_EP_RX_CTR | ( | EP | ) | USB_CLR_EP_NTOGGLE_BIT_AND_SET(EP, USB_EP_RX_CTR, USB_EP_TX_CTR) |
Definition at line 229 of file st_usbfs_common.h.
#define USB_CLR_EP_RX_DTOG | ( | EP | ) |
Definition at line 268 of file st_usbfs_common.h.
#define USB_CLR_EP_STAT_OUT | ( | EP | ) | USB_CLR_EP_KIND(EP) |
Definition at line 254 of file st_usbfs_common.h.
#define USB_CLR_EP_TX_CTR | ( | EP | ) | USB_CLR_EP_NTOGGLE_BIT_AND_SET(EP, USB_EP_TX_CTR, USB_EP_RX_CTR) |
Definition at line 232 of file st_usbfs_common.h.
#define USB_CLR_EP_TX_DTOG | ( | EP | ) |
Definition at line 263 of file st_usbfs_common.h.
#define USB_CLR_ISTR_ERR | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_ERR) |
Definition at line 114 of file st_usbfs_common.h.
#define USB_CLR_ISTR_ESOF | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_ESOF) |
Definition at line 119 of file st_usbfs_common.h.
#define USB_CLR_ISTR_PMAOVR | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_PMAOVR) |
Definition at line 113 of file st_usbfs_common.h.
#define USB_CLR_ISTR_RESET | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_RESET) |
Definition at line 117 of file st_usbfs_common.h.
#define USB_CLR_ISTR_SOF | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_SOF) |
Definition at line 118 of file st_usbfs_common.h.
#define USB_CLR_ISTR_SUSP | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_SUSP) |
Definition at line 116 of file st_usbfs_common.h.
#define USB_CLR_ISTR_WKUP | ( | ) | CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_WKUP) |
Definition at line 115 of file st_usbfs_common.h.
#define USB_CNTR_CTRM 0x8000 |
Definition at line 81 of file st_usbfs_common.h.
#define USB_CNTR_ERRM 0x2000 |
Definition at line 83 of file st_usbfs_common.h.
#define USB_CNTR_ESOFM 0x0100 |
Definition at line 88 of file st_usbfs_common.h.
#define USB_CNTR_FRES 0x0001 /* Force reset */ |
Definition at line 95 of file st_usbfs_common.h.
#define USB_CNTR_FSUSP 0x0008 /* Force suspend */ |
Definition at line 92 of file st_usbfs_common.h.
#define USB_CNTR_LP_MODE 0x0004 /* Low-power mode */ |
Definition at line 93 of file st_usbfs_common.h.
#define USB_CNTR_PMAOVRM 0x4000 |
Definition at line 82 of file st_usbfs_common.h.
#define USB_CNTR_PWDN 0x0002 /* Power down */ |
Definition at line 94 of file st_usbfs_common.h.
#define USB_CNTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x40)) |
Definition at line 60 of file st_usbfs_common.h.
#define USB_CNTR_RESETM 0x0400 |
Definition at line 86 of file st_usbfs_common.h.
#define USB_CNTR_RESUME 0x0010 /* Resume request */ |
Definition at line 91 of file st_usbfs_common.h.
#define USB_CNTR_SOFM 0x0200 |
Definition at line 87 of file st_usbfs_common.h.
#define USB_CNTR_SUSPM 0x0800 |
Definition at line 85 of file st_usbfs_common.h.
#define USB_CNTR_WKUPM 0x1000 |
Definition at line 84 of file st_usbfs_common.h.
#define USB_DADDR_ADDR 0x007F |
Definition at line 135 of file st_usbfs_common.h.
#define USB_DADDR_EF (1 << 7) |
Definition at line 134 of file st_usbfs_common.h.
#define USB_DADDR_REG (&MMIO32(USB_DEV_FS_BASE + 0x4C)) |
Definition at line 66 of file st_usbfs_common.h.
#define USB_EP0 0 |
Definition at line 145 of file st_usbfs_common.h.
#define USB_EP1 1 |
Definition at line 146 of file st_usbfs_common.h.
#define USB_EP2 2 |
Definition at line 147 of file st_usbfs_common.h.
#define USB_EP3 3 |
Definition at line 148 of file st_usbfs_common.h.
#define USB_EP4 4 |
Definition at line 149 of file st_usbfs_common.h.
#define USB_EP5 5 |
Definition at line 150 of file st_usbfs_common.h.
#define USB_EP6 6 |
Definition at line 151 of file st_usbfs_common.h.
#define USB_EP7 7 |
Definition at line 152 of file st_usbfs_common.h.
#define USB_EP_ADDR 0x000F /* Endpoint Address */ |
Definition at line 169 of file st_usbfs_common.h.
#define USB_EP_KIND |
Definition at line 163 of file st_usbfs_common.h.
#define USB_EP_NTOGGLE_MSK |
Definition at line 172 of file st_usbfs_common.h.
#define USB_EP_REG | ( | EP | ) | (&MMIO32(USB_DEV_FS_BASE) + (EP)) |
Definition at line 71 of file st_usbfs_common.h.
#define USB_EP_RX_CTR 0x8000 /* Correct transfer RX */ |
Definition at line 157 of file st_usbfs_common.h.
#define USB_EP_RX_DTOG 0x4000 /* Data toggle RX */ |
Definition at line 158 of file st_usbfs_common.h.
#define USB_EP_RX_STAT 0x3000 /* Endpoint status for RX */ |
Definition at line 159 of file st_usbfs_common.h.
#define USB_EP_RX_STAT_DISABLED 0x0000 |
Definition at line 185 of file st_usbfs_common.h.
#define USB_EP_RX_STAT_NAK 0x2000 |
Definition at line 187 of file st_usbfs_common.h.
#define USB_EP_RX_STAT_STALL 0x1000 |
Definition at line 186 of file st_usbfs_common.h.
#define USB_EP_RX_STAT_TOG_MSK (USB_EP_RX_STAT | USB_EP_NTOGGLE_MSK) |
Definition at line 180 of file st_usbfs_common.h.
#define USB_EP_RX_STAT_VALID 0x3000 |
Definition at line 188 of file st_usbfs_common.h.
#define USB_EP_SETUP 0x0800 /* Setup transaction completed */ |
Definition at line 161 of file st_usbfs_common.h.
#define USB_EP_TX_CTR 0x0080 /* Correct transfer TX */ |
Definition at line 165 of file st_usbfs_common.h.
#define USB_EP_TX_DTOG 0x0040 /* Data toggle TX */ |
Definition at line 166 of file st_usbfs_common.h.
#define USB_EP_TX_STAT 0x0030 /* Endpoint status for TX */ |
Definition at line 167 of file st_usbfs_common.h.
#define USB_EP_TX_STAT_DISABLED 0x0000 |
Definition at line 191 of file st_usbfs_common.h.
#define USB_EP_TX_STAT_NAK 0x0020 |
Definition at line 193 of file st_usbfs_common.h.
#define USB_EP_TX_STAT_STALL 0x0010 |
Definition at line 192 of file st_usbfs_common.h.
#define USB_EP_TX_STAT_TOG_MSK (USB_EP_TX_STAT | USB_EP_NTOGGLE_MSK) |
Definition at line 182 of file st_usbfs_common.h.
#define USB_EP_TX_STAT_VALID 0x0030 |
Definition at line 194 of file st_usbfs_common.h.
#define USB_EP_TYPE 0x0600 /* Endpoint type */ |
Definition at line 162 of file st_usbfs_common.h.
#define USB_EP_TYPE_BULK 0x0000 |
Definition at line 197 of file st_usbfs_common.h.
#define USB_EP_TYPE_CONTROL 0x0200 |
Definition at line 198 of file st_usbfs_common.h.
#define USB_EP_TYPE_INTERRUPT 0x0600 |
Definition at line 200 of file st_usbfs_common.h.
#define USB_EP_TYPE_ISO 0x0400 |
Definition at line 199 of file st_usbfs_common.h.
#define USB_FNR_FN (0x7FF << 0) |
Definition at line 130 of file st_usbfs_common.h.
#define USB_FNR_LCK (1 << 13) |
Definition at line 125 of file st_usbfs_common.h.
#define USB_FNR_LSOF (3 << USB_FNR_LSOF_SHIFT) |
Definition at line 128 of file st_usbfs_common.h.
#define USB_FNR_LSOF_SHIFT 11 |
Definition at line 127 of file st_usbfs_common.h.
#define USB_FNR_REG (&MMIO32(USB_DEV_FS_BASE + 0x48)) |
Definition at line 64 of file st_usbfs_common.h.
#define USB_FNR_RXDM (1 << 14) |
Definition at line 124 of file st_usbfs_common.h.
#define USB_FNR_RXDP (1 << 15) |
Definition at line 123 of file st_usbfs_common.h.
#define USB_GET_BTABLE GET_REG(USB_BTABLE_REG) |
Definition at line 276 of file st_usbfs_common.h.
#define USB_GET_EP_RX_ADDR | ( | EP | ) | GET_REG(USB_EP_RX_ADDR(EP)) |
Definition at line 282 of file st_usbfs_common.h.
#define USB_GET_EP_RX_COUNT | ( | EP | ) | GET_REG(USB_EP_RX_COUNT(EP)) |
Definition at line 283 of file st_usbfs_common.h.
#define USB_GET_EP_TX_ADDR | ( | EP | ) | GET_REG(USB_EP_TX_ADDR(EP)) |
Definition at line 280 of file st_usbfs_common.h.
#define USB_GET_EP_TX_COUNT | ( | EP | ) | GET_REG(USB_EP_TX_COUNT(EP)) |
Definition at line 281 of file st_usbfs_common.h.
#define USB_ISTR_CTR 0x8000 /* Correct Transfer */ |
Definition at line 99 of file st_usbfs_common.h.
#define USB_ISTR_DIR 0x0010 /* Direction of transaction */ |
Definition at line 107 of file st_usbfs_common.h.
#define USB_ISTR_EP_ID 0x000F /* Endpoint Identifier */ |
Definition at line 108 of file st_usbfs_common.h.
#define USB_ISTR_ERR 0x2000 /* Error */ |
Definition at line 101 of file st_usbfs_common.h.
#define USB_ISTR_ESOF 0x0100 /* Expected Start Of Frame */ |
Definition at line 106 of file st_usbfs_common.h.
#define USB_ISTR_PMAOVR 0x4000 /* Packet Memory Area Over / Underrun */ |
Definition at line 100 of file st_usbfs_common.h.
#define USB_ISTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x44)) |
Definition at line 62 of file st_usbfs_common.h.
#define USB_ISTR_RESET 0x0400 /* USB RESET request */ |
Definition at line 104 of file st_usbfs_common.h.
#define USB_ISTR_SOF 0x0200 /* Start Of Frame */ |
Definition at line 105 of file st_usbfs_common.h.
#define USB_ISTR_SUSP 0x0800 /* Suspend mode request */ |
Definition at line 103 of file st_usbfs_common.h.
#define USB_ISTR_WKUP 0x1000 /* Wake up */ |
Definition at line 102 of file st_usbfs_common.h.
#define USB_SET_EP_ADDR | ( | EP, | |
ADDR | |||
) |
Definition at line 256 of file st_usbfs_common.h.
#define USB_SET_EP_KIND | ( | EP | ) |
Definition at line 242 of file st_usbfs_common.h.
#define USB_SET_EP_RX_ADDR | ( | EP, | |
ADDR | |||
) | SET_REG(USB_EP_RX_ADDR(EP), ADDR) |
Definition at line 286 of file st_usbfs_common.h.
#define USB_SET_EP_RX_COUNT | ( | EP, | |
COUNT | |||
) | SET_REG(USB_EP_RX_COUNT(EP), COUNT) |
Definition at line 287 of file st_usbfs_common.h.
#define USB_SET_EP_RX_STAT | ( | EP, | |
STAT | |||
) |
Definition at line 210 of file st_usbfs_common.h.
#define USB_SET_EP_STAT_OUT | ( | EP | ) | USB_SET_EP_KIND(EP) |
Definition at line 253 of file st_usbfs_common.h.
#define USB_SET_EP_TX_ADDR | ( | EP, | |
ADDR | |||
) | SET_REG(USB_EP_TX_ADDR(EP), ADDR) |
Definition at line 284 of file st_usbfs_common.h.
#define USB_SET_EP_TX_COUNT | ( | EP, | |
COUNT | |||
) | SET_REG(USB_EP_TX_COUNT(EP), COUNT) |
Definition at line 285 of file st_usbfs_common.h.
#define USB_SET_EP_TX_STAT | ( | EP, | |
STAT | |||
) |
Definition at line 214 of file st_usbfs_common.h.
#define USB_SET_EP_TYPE | ( | EP, | |
TYPE | |||
) |
Definition at line 236 of file st_usbfs_common.h.