libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
usb_efm32.c File Reference
#include <string.h>
#include <libopencm3/cm3/common.h>
#include <libopencm3/efm32/memorymap.h>
#include <libopencm3/efm32/cmu.h>
#include <libopencm3/efm32/usb.h>
#include <libopencm3/usb/usbd.h>
#include "usb_private.h"
Include dependency graph for usb_efm32.c:

Go to the source code of this file.

Macros

#define RX_FIFO_SIZE   256
 
#define ENDPOINT_COUNT   4
 

Functions

static usbd_deviceefm32lg_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