libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Macros | |
#define | RX_FIFO_SIZE 256 |
#define | ENDPOINT_COUNT 4 |
Functions | |
static usbd_device * | efm32lg_usbd_init (void) |
Initialize the USB_FS device controller hardware of the STM32. More... | |
static void | efm32lg_set_address (usbd_device *usbd_dev, uint8_t addr) |
static void | efm32lg_ep_setup (usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void(*callback)(usbd_device *usbd_dev, uint8_t ep)) |
static void | efm32lg_endpoints_reset (usbd_device *usbd_dev) |
static void | efm32lg_ep_stall_set (usbd_device *usbd_dev, uint8_t addr, uint8_t stall) |
static uint8_t | efm32lg_ep_stall_get (usbd_device *usbd_dev, uint8_t addr) |
static void | efm32lg_ep_nak_set (usbd_device *usbd_dev, uint8_t addr, uint8_t nak) |
static uint16_t | efm32lg_ep_write_packet (usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len) |
static uint16_t | efm32lg_ep_read_packet (usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len) |
static void | efm32lg_poll (usbd_device *usbd_dev) |
static void | efm32lg_disconnect (usbd_device *usbd_dev, bool disconnected) |
Variables | |
static struct _usbd_device | _usbd_dev |
const struct _usbd_driver | efm32lg_usb_driver |
#define ENDPOINT_COUNT 4 |
Definition at line 50 of file usb_efm32.c.
#define RX_FIFO_SIZE 256 |
Definition at line 38 of file usb_efm32.c.
|
static |
Definition at line 408 of file usb_efm32.c.
References USB_DCTL, and USB_DCTL_SDIS.
|
static |
Definition at line 184 of file usb_efm32.c.
|
static |
Definition at line 235 of file usb_efm32.c.
References USB_DOEP0CTL_CNAK, USB_DOEP0CTL_SNAK, and USB_DOEPx_CTL.
|
static |
Definition at line 279 of file usb_efm32.c.
References USB_DOEP0CTL_CNAK, USB_DOEP0CTL_EPENA, USB_DOEP0CTL_SNAK, USB_DOEPx_CTL, USB_DOEPx_TSIZ, and USB_FIFOxD.
|
static |
Definition at line 107 of file usb_efm32.c.
References USB_DIEP0CTL, USB_DIEP0CTL_CNAK, USB_DIEP0CTL_EPENA, USB_DIEP0CTL_MPSIZ_16, USB_DIEP0CTL_MPSIZ_32, USB_DIEP0CTL_MPSIZ_64, USB_DIEP0CTL_MPSIZ_8, USB_DIEP0CTL_SD0PID, USB_DIEP0CTL_SNAK, USB_DIEP0CTL_USBAEP, USB_DIEP0TSIZ, USB_DIEP0TSIZ_PKTCNT, USB_DIEP0TSIZ_STUPCNT_1, USB_DIEP0TSIZ_XFRSIZ_MASK, USB_DIEPTXF, USB_DIEPx_CTL, USB_DIEPx_TSIZ, USB_DOEP0CTL_EPENA, USB_DOEP0CTL_SD0PID, USB_DOEP0CTL_USBAEP, USB_DOEPx_CTL, USB_DOEPx_TSIZ, and USB_GNPTXFSIZ.
|
static |
Definition at line 221 of file usb_efm32.c.
References USB_DIEP0CTL_STALL, USB_DIEPx_CTL, USB_DOEP0CTL_STALL, and USB_DOEPx_CTL.
|
static |
Definition at line 190 of file usb_efm32.c.
References USB_DIEP0CTL_SD0PID, USB_DIEP0CTL_STALL, USB_DIEPx_CTL, USB_DOEP0CTL_SD0PID, USB_DOEP0CTL_STALL, and USB_DOEPx_CTL.
|
static |
Definition at line 251 of file usb_efm32.c.
References USB_DIEP0CTL_CNAK, USB_DIEP0CTL_EPENA, USB_DIEP0TSIZ_PKTCNT, USB_DIEPx_CTL, USB_DIEPx_TSIZ, and USB_FIFOxD.
|
static |
Definition at line 307 of file usb_efm32.c.
References _usbd_reset(), ENDPOINT_COUNT, USB_DIEP_INT_XFRC, USB_DIEPx_INT, USB_FIFOxD, USB_GINTMSK, USB_GINTMSK_SOFM, USB_GINTSTS, USB_GINTSTS_ENUMDNE, USB_GINTSTS_RXFLVL, USB_GINTSTS_SOF, USB_GINTSTS_USBSUSP, USB_GINTSTS_WKUPINT, USB_GRXSTSP, USB_GRXSTSP_BCNT_MASK, USB_GRXSTSP_EPNUM_MASK, USB_GRXSTSP_PKTSTS_MASK, USB_GRXSTSP_PKTSTS_OUT, and USB_GRXSTSP_PKTSTS_SETUP.
|
static |
Definition at line 100 of file usb_efm32.c.
References USB_DCFG.
|
static |
Initialize the USB_FS device controller hardware of the STM32.
Definition at line 55 of file usb_efm32.c.
References _usbd_dev, CMU_CMD, CMU_CMD_USBCCLKSEL_HFCLKNODIV, CMU_HFCORECLKEN0, CMU_HFCORECLKEN0_USB, CMU_HFCORECLKEN0_USBC, CMU_STATUS, CMU_STATUS_USBCHFCLKSEL, efm32lg_usb_driver, USB_CTRL, USB_DAINTMSK, USB_DCFG, USB_DCFG_DSPD, USB_DIEPMSK, USB_DIEPMSK_XFRCM, USB_GAHBCFG, USB_GAHBCFG_GLBLINTRMSK, USB_GINTMSK, USB_GINTMSK_ENUMDNEM, USB_GINTMSK_IEPINT, USB_GINTMSK_RXFLVLM, USB_GINTMSK_USBSUSPM, USB_GINTMSK_WUIM, USB_GINTSTS, USB_GINTSTS_MMIS, USB_GRSTCTL, USB_GRSTCTL_AHBIDL, USB_GRSTCTL_CSRST, USB_GRXFSIZ, USB_GUSBCFG, USB_GUSBCFG_FDMOD, USB_GUSBCFG_TRDT_16BIT, USB_PCGCCTL, USB_ROUTE, USB_ROUTE_DMPUPEN, and USB_ROUTE_PHYPEN.
|
static |
Definition at line 52 of file usb_efm32.c.
Referenced by efm32lg_usbd_init().
const struct _usbd_driver efm32lg_usb_driver |
Definition at line 419 of file usb_efm32.c.
Referenced by efm32lg_usbd_init().