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

Go to the source code of this file.

Functions

int usbd_register_set_config_callback (usbd_device *usbd_dev, usbd_set_config_callback callback)
 Registers a "Set Config" callback. More...
 
void usbd_register_set_altsetting_callback (usbd_device *usbd_dev, usbd_set_altsetting_callback callback)
 Registers a "Set Interface" (alternate setting) callback. More...
 
static uint16_t build_config_descriptor (usbd_device *usbd_dev, uint8_t index, uint8_t *buf, uint16_t len)
 
static int usb_descriptor_type (uint16_t wValue)
 
static int usb_descriptor_index (uint16_t wValue)
 
static enum usbd_request_return_codes usb_standard_get_descriptor (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_set_address (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_set_configuration (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_get_configuration (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_set_interface (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_get_interface (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_device_get_status (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_interface_get_status (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_endpoint_get_status (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_endpoint_stall (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
static enum usbd_request_return_codes usb_standard_endpoint_unstall (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
enum usbd_request_return_codes _usbd_standard_request_device (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
enum usbd_request_return_codes _usbd_standard_request_interface (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
enum usbd_request_return_codes _usbd_standard_request_endpoint (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 
enum usbd_request_return_codes _usbd_standard_request (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len)
 

Function Documentation

◆ _usbd_standard_request()

enum usbd_request_return_codes _usbd_standard_request ( usbd_device usbd_dev,
struct usb_setup_data req,
uint8_t **  buf,
uint16_t *  len 
)

◆ _usbd_standard_request_device()

◆ _usbd_standard_request_endpoint()

enum usbd_request_return_codes _usbd_standard_request_endpoint ( usbd_device usbd_dev,
struct usb_setup_data req,
uint8_t **  buf,
uint16_t *  len 
)

◆ _usbd_standard_request_interface()

enum usbd_request_return_codes _usbd_standard_request_interface ( usbd_device usbd_dev,
struct usb_setup_data req,
uint8_t **  buf,
uint16_t *  len 
)