libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
st_usbfs_v2.h File Reference
Include dependency graph for st_usbfs_v2.h:

Go to the source code of this file.

Macros

#define USB_LPMCSR_REG   (&MMIO32(USB_DEV_FS_BASE + 0x54))
 
#define USB_BCDR_REG   (&MMIO32(USB_DEV_FS_BASE + 0x58))
 
#define USB_CNTR_L1REQM   (1 << 7)
 
#define USB_CNTR_L1RESUME   (1 << 5)
 
#define USB_ISTR_L1REQ   (1 << 7)
 
#define USB_LPMCSR_BESL_SHIFT   4
 
#define USB_LPMCSR_BESL   (15 << USB_LPMCSR_BESL_SHIFT)
 
#define USB_LPMCSR_REMWAKE   (1 << 3)
 
#define USB_LPMCSR_LPMACK   (1 << 1)
 
#define USB_LPMCSR_LPMEN   (1 << 0)
 
#define USB_BCDR_DPPU   (1 << 15)
 
#define USB_BCDR_PS2DET   (1 << 7)
 
#define USB_BCDR_SDET   (1 << 6)
 
#define USB_BCDR_PDET   (1 << 5)
 
#define USB_BCDR_DCDET   (1 << 4)
 
#define USB_BCDR_SDEN   (1 << 3)
 
#define USB_BCDR_PDEN   (1 << 2)
 
#define USB_BCDR_DCDEN   (1 << 1)
 
#define USB_BCDR_BCDEN   (1 << 0)
 
#define USB_EP_TX_ADDR(ep)    ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 0) * 1))
 
#define USB_EP_TX_COUNT(ep)    ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 2) * 1))
 
#define USB_EP_RX_ADDR(ep)    ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 4) * 1))
 
#define USB_EP_RX_COUNT(ep)    ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 6) * 1))
 
#define USB_GET_EP_TX_BUFF(ep)    (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_TX_ADDR(ep) * 1))
 
#define USB_GET_EP_RX_BUFF(ep)    (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_RX_ADDR(ep) * 1))
 

Macro Definition Documentation

◆ USB_BCDR_BCDEN

#define USB_BCDR_BCDEN   (1 << 0)

Definition at line 79 of file st_usbfs_v2.h.

◆ USB_BCDR_DCDEN

#define USB_BCDR_DCDEN   (1 << 1)

Definition at line 78 of file st_usbfs_v2.h.

◆ USB_BCDR_DCDET

#define USB_BCDR_DCDET   (1 << 4)

Definition at line 75 of file st_usbfs_v2.h.

◆ USB_BCDR_DPPU

#define USB_BCDR_DPPU   (1 << 15)

Definition at line 71 of file st_usbfs_v2.h.

◆ USB_BCDR_PDEN

#define USB_BCDR_PDEN   (1 << 2)

Definition at line 77 of file st_usbfs_v2.h.

◆ USB_BCDR_PDET

#define USB_BCDR_PDET   (1 << 5)

Definition at line 74 of file st_usbfs_v2.h.

◆ USB_BCDR_PS2DET

#define USB_BCDR_PS2DET   (1 << 7)

Definition at line 72 of file st_usbfs_v2.h.

◆ USB_BCDR_REG

#define USB_BCDR_REG   (&MMIO32(USB_DEV_FS_BASE + 0x58))

Definition at line 45 of file st_usbfs_v2.h.

◆ USB_BCDR_SDEN

#define USB_BCDR_SDEN   (1 << 3)

Definition at line 76 of file st_usbfs_v2.h.

◆ USB_BCDR_SDET

#define USB_BCDR_SDET   (1 << 6)

Definition at line 73 of file st_usbfs_v2.h.

◆ USB_CNTR_L1REQM

#define USB_CNTR_L1REQM   (1 << 7)

Definition at line 53 of file st_usbfs_v2.h.

◆ USB_CNTR_L1RESUME

#define USB_CNTR_L1RESUME   (1 << 5)

Definition at line 54 of file st_usbfs_v2.h.

◆ USB_EP_RX_ADDR

#define USB_EP_RX_ADDR (   ep)     ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 4) * 1))

Definition at line 89 of file st_usbfs_v2.h.

◆ USB_EP_RX_COUNT

#define USB_EP_RX_COUNT (   ep)     ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 6) * 1))

Definition at line 92 of file st_usbfs_v2.h.

◆ USB_EP_TX_ADDR

#define USB_EP_TX_ADDR (   ep)     ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 0) * 1))

Definition at line 83 of file st_usbfs_v2.h.

◆ USB_EP_TX_COUNT

#define USB_EP_TX_COUNT (   ep)     ((uint16_t *)(USB_PMA_BASE + (USB_GET_BTABLE + (ep) * 8 + 2) * 1))

Definition at line 86 of file st_usbfs_v2.h.

◆ USB_GET_EP_RX_BUFF

#define USB_GET_EP_RX_BUFF (   ep)     (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_RX_ADDR(ep) * 1))

Definition at line 100 of file st_usbfs_v2.h.

◆ USB_GET_EP_TX_BUFF

#define USB_GET_EP_TX_BUFF (   ep)     (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_TX_ADDR(ep) * 1))

Definition at line 97 of file st_usbfs_v2.h.

◆ USB_ISTR_L1REQ

#define USB_ISTR_L1REQ   (1 << 7)

Definition at line 58 of file st_usbfs_v2.h.

◆ USB_LPMCSR_BESL

#define USB_LPMCSR_BESL   (15 << USB_LPMCSR_BESL_SHIFT)

Definition at line 63 of file st_usbfs_v2.h.

◆ USB_LPMCSR_BESL_SHIFT

#define USB_LPMCSR_BESL_SHIFT   4

Definition at line 62 of file st_usbfs_v2.h.

◆ USB_LPMCSR_LPMACK

#define USB_LPMCSR_LPMACK   (1 << 1)

Definition at line 66 of file st_usbfs_v2.h.

◆ USB_LPMCSR_LPMEN

#define USB_LPMCSR_LPMEN   (1 << 0)

Definition at line 67 of file st_usbfs_v2.h.

◆ USB_LPMCSR_REG

#define USB_LPMCSR_REG   (&MMIO32(USB_DEV_FS_BASE + 0x54))

Definition at line 44 of file st_usbfs_v2.h.

◆ USB_LPMCSR_REMWAKE

#define USB_LPMCSR_REMWAKE   (1 << 3)

Definition at line 65 of file st_usbfs_v2.h.