STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
usbd_def.h File Reference

General defines for the usb device library. More...

#include "usbd_conf.h"
Include dependency graph for usbd_def.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  usb_setup_req
struct  __PACKED
struct  USBD_BosDescTypeDef
struct  USBD_DescHeaderTypeDef
struct  _Device_cb
struct  USBD_DescriptorsTypeDef
struct  USBD_EndpointTypeDef
struct  _USBD_HandleTypeDef

Macros

#define NULL   0U
#define USBD_MAX_NUM_INTERFACES   1U
#define USBD_MAX_NUM_CONFIGURATION   1U
#define USBD_MAX_SUPPORTED_CLASS   1U
#define USBD_MAX_CLASS_ENDPOINTS   5U
#define USBD_MAX_CLASS_INTERFACES   5U
#define USBD_LPM_ENABLED   0U
#define USBD_SELF_POWERED   1U
#define USBD_MAX_POWER   0x32U /* 100 mA */
#define USBD_SUPPORT_USER_STRING_DESC   0U
#define USBD_CLASS_USER_STRING_DESC   0U
#define USB_LEN_DEV_QUALIFIER_DESC   0x0AU
#define USB_LEN_DEV_DESC   0x12U
#define USB_LEN_CFG_DESC   0x09U
#define USB_LEN_IF_DESC   0x09U
#define USB_LEN_EP_DESC   0x07U
#define USB_LEN_OTG_DESC   0x03U
#define USB_LEN_LANGID_STR_DESC   0x04U
#define USB_LEN_OTHER_SPEED_DESC_SIZ   0x09U
#define USBD_IDX_LANGID_STR   0x00U
#define USBD_IDX_MFC_STR   0x01U
#define USBD_IDX_PRODUCT_STR   0x02U
#define USBD_IDX_SERIAL_STR   0x03U
#define USBD_IDX_CONFIG_STR   0x04U
#define USBD_IDX_INTERFACE_STR   0x05U
#define USB_REQ_TYPE_STANDARD   0x00U
#define USB_REQ_TYPE_CLASS   0x20U
#define USB_REQ_TYPE_VENDOR   0x40U
#define USB_REQ_TYPE_MASK   0x60U
#define USB_REQ_RECIPIENT_DEVICE   0x00U
#define USB_REQ_RECIPIENT_INTERFACE   0x01U
#define USB_REQ_RECIPIENT_ENDPOINT   0x02U
#define USB_REQ_RECIPIENT_MASK   0x03U
#define USB_REQ_GET_STATUS   0x00U
#define USB_REQ_CLEAR_FEATURE   0x01U
#define USB_REQ_SET_FEATURE   0x03U
#define USB_REQ_SET_ADDRESS   0x05U
#define USB_REQ_GET_DESCRIPTOR   0x06U
#define USB_REQ_SET_DESCRIPTOR   0x07U
#define USB_REQ_GET_CONFIGURATION   0x08U
#define USB_REQ_SET_CONFIGURATION   0x09U
#define USB_REQ_GET_INTERFACE   0x0AU
#define USB_REQ_SET_INTERFACE   0x0BU
#define USB_REQ_SYNCH_FRAME   0x0CU
#define USB_DESC_TYPE_DEVICE   0x01U
#define USB_DESC_TYPE_CONFIGURATION   0x02U
#define USB_DESC_TYPE_STRING   0x03U
#define USB_DESC_TYPE_INTERFACE   0x04U
#define USB_DESC_TYPE_ENDPOINT   0x05U
#define USB_DESC_TYPE_DEVICE_QUALIFIER   0x06U
#define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION   0x07U
#define USB_DESC_TYPE_IAD   0x0BU
#define USB_DESC_TYPE_BOS   0x0FU
#define USB_CONFIG_REMOTE_WAKEUP   0x02U
#define USB_CONFIG_SELF_POWERED   0x01U
#define USB_FEATURE_EP_HALT   0x00U
#define USB_FEATURE_REMOTE_WAKEUP   0x01U
#define USB_FEATURE_TEST_MODE   0x02U
#define USB_DEVICE_CAPABITY_TYPE   0x10U
#define USB_CONF_DESC_SIZE   0x09U
#define USB_IF_DESC_SIZE   0x09U
#define USB_EP_DESC_SIZE   0x07U
#define USB_IAD_DESC_SIZE   0x08U
#define USB_HS_MAX_PACKET_SIZE   512U
#define USB_FS_MAX_PACKET_SIZE   64U
#define USB_MAX_EP0_SIZE   64U
#define USBD_STATE_DEFAULT   0x01U
#define USBD_STATE_ADDRESSED   0x02U
#define USBD_STATE_CONFIGURED   0x03U
#define USBD_STATE_SUSPENDED   0x04U
#define USBD_EP0_IDLE   0x00U
#define USBD_EP0_SETUP   0x01U
#define USBD_EP0_DATA_IN   0x02U
#define USBD_EP0_DATA_OUT   0x03U
#define USBD_EP0_STATUS_IN   0x04U
#define USBD_EP0_STATUS_OUT   0x05U
#define USBD_EP0_STALL   0x06U
#define USBD_EP_TYPE_CTRL   0x00U
#define USBD_EP_TYPE_ISOC   0x01U
#define USBD_EP_TYPE_BULK   0x02U
#define USBD_EP_TYPE_INTR   0x03U
#define LOBYTE(x)
#define HIBYTE(x)
#define MIN(a, b)
#define MAX(a, b)
#define __ALIGN_END

Typedefs

typedef struct usb_setup_req USBD_SetupReqTypedef
typedef struct _Device_cb USBD_ClassTypeDef
typedef struct _USBD_HandleTypeDef USBD_HandleTypeDef

Enumerations

enum  USBD_SpeedTypeDef { USBD_SPEED_HIGH = 0U , USBD_SPEED_FULL = 1U , USBD_SPEED_LOW = 2U }
enum  USBD_StatusTypeDef { USBD_OK = 0U , USBD_BUSY , USBD_EMEM , USBD_FAIL }
enum  USBD_EPDirectionTypeDef { OUT = 0x00 , IN = 0x80 }
enum  USBD_CDC_NotifCodeTypeDef { NETWORK_CONNECTION = 0x00 , RESPONSE_AVAILABLE = 0x01 , CONNECTION_SPEED_CHANGE = 0x2A }

Functions

__STATIC_INLINE uint16_t SWAPBYTE (uint8_t *addr)

Detailed Description

General defines for the usb device library.

Author
MCD Application Team
Attention

Copyright (c) 2015 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file usbd_def.h.