stm_usb_fs_lib/inc/usb_def.h@0:8f0d870509fe, 2017-09-04 (annotated)
- Committer:
- Sergunb
- Date:
- Mon Sep 04 12:04:13 2017 +0000
- Revision:
- 0:8f0d870509fe
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sergunb | 0:8f0d870509fe | 1 | /******************** (C) COPYRIGHT 2010 STMicroelectronics ******************** |
Sergunb | 0:8f0d870509fe | 2 | * File Name : usb_def.h |
Sergunb | 0:8f0d870509fe | 3 | * Author : MCD Application Team |
Sergunb | 0:8f0d870509fe | 4 | * Version : V3.2.1 |
Sergunb | 0:8f0d870509fe | 5 | * Date : 07/05/2010 |
Sergunb | 0:8f0d870509fe | 6 | * Description : Definitions related to USB Core |
Sergunb | 0:8f0d870509fe | 7 | ******************************************************************************** |
Sergunb | 0:8f0d870509fe | 8 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
Sergunb | 0:8f0d870509fe | 9 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
Sergunb | 0:8f0d870509fe | 10 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
Sergunb | 0:8f0d870509fe | 11 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
Sergunb | 0:8f0d870509fe | 12 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
Sergunb | 0:8f0d870509fe | 13 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
Sergunb | 0:8f0d870509fe | 14 | *******************************************************************************/ |
Sergunb | 0:8f0d870509fe | 15 | |
Sergunb | 0:8f0d870509fe | 16 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Sergunb | 0:8f0d870509fe | 17 | #ifndef __USB_DEF_H |
Sergunb | 0:8f0d870509fe | 18 | #define __USB_DEF_H |
Sergunb | 0:8f0d870509fe | 19 | |
Sergunb | 0:8f0d870509fe | 20 | /* Includes ------------------------------------------------------------------*/ |
Sergunb | 0:8f0d870509fe | 21 | /* Exported types ------------------------------------------------------------*/ |
Sergunb | 0:8f0d870509fe | 22 | typedef enum _RECIPIENT_TYPE |
Sergunb | 0:8f0d870509fe | 23 | { |
Sergunb | 0:8f0d870509fe | 24 | DEVICE_RECIPIENT, /* Recipient device */ |
Sergunb | 0:8f0d870509fe | 25 | INTERFACE_RECIPIENT, /* Recipient interface */ |
Sergunb | 0:8f0d870509fe | 26 | ENDPOINT_RECIPIENT, /* Recipient endpoint */ |
Sergunb | 0:8f0d870509fe | 27 | OTHER_RECIPIENT |
Sergunb | 0:8f0d870509fe | 28 | } RECIPIENT_TYPE; |
Sergunb | 0:8f0d870509fe | 29 | |
Sergunb | 0:8f0d870509fe | 30 | |
Sergunb | 0:8f0d870509fe | 31 | typedef enum _STANDARD_REQUESTS |
Sergunb | 0:8f0d870509fe | 32 | { |
Sergunb | 0:8f0d870509fe | 33 | GET_STATUS = 0, |
Sergunb | 0:8f0d870509fe | 34 | CLEAR_FEATURE, |
Sergunb | 0:8f0d870509fe | 35 | RESERVED1, |
Sergunb | 0:8f0d870509fe | 36 | SET_FEATURE, |
Sergunb | 0:8f0d870509fe | 37 | RESERVED2, |
Sergunb | 0:8f0d870509fe | 38 | SET_ADDRESS, |
Sergunb | 0:8f0d870509fe | 39 | GET_DESCRIPTOR, |
Sergunb | 0:8f0d870509fe | 40 | SET_DESCRIPTOR, |
Sergunb | 0:8f0d870509fe | 41 | GET_CONFIGURATION, |
Sergunb | 0:8f0d870509fe | 42 | SET_CONFIGURATION, |
Sergunb | 0:8f0d870509fe | 43 | GET_INTERFACE, |
Sergunb | 0:8f0d870509fe | 44 | SET_INTERFACE, |
Sergunb | 0:8f0d870509fe | 45 | TOTAL_sREQUEST, /* Total number of Standard request */ |
Sergunb | 0:8f0d870509fe | 46 | SYNCH_FRAME = 12 |
Sergunb | 0:8f0d870509fe | 47 | } STANDARD_REQUESTS; |
Sergunb | 0:8f0d870509fe | 48 | |
Sergunb | 0:8f0d870509fe | 49 | /* Definition of "USBwValue" */ |
Sergunb | 0:8f0d870509fe | 50 | typedef enum _DESCRIPTOR_TYPE |
Sergunb | 0:8f0d870509fe | 51 | { |
Sergunb | 0:8f0d870509fe | 52 | DEVICE_DESCRIPTOR = 1, |
Sergunb | 0:8f0d870509fe | 53 | CONFIG_DESCRIPTOR, |
Sergunb | 0:8f0d870509fe | 54 | STRING_DESCRIPTOR, |
Sergunb | 0:8f0d870509fe | 55 | INTERFACE_DESCRIPTOR, |
Sergunb | 0:8f0d870509fe | 56 | ENDPOINT_DESCRIPTOR |
Sergunb | 0:8f0d870509fe | 57 | } DESCRIPTOR_TYPE; |
Sergunb | 0:8f0d870509fe | 58 | |
Sergunb | 0:8f0d870509fe | 59 | /* Feature selector of a SET_FEATURE or CLEAR_FEATURE */ |
Sergunb | 0:8f0d870509fe | 60 | typedef enum _FEATURE_SELECTOR |
Sergunb | 0:8f0d870509fe | 61 | { |
Sergunb | 0:8f0d870509fe | 62 | ENDPOINT_STALL, |
Sergunb | 0:8f0d870509fe | 63 | DEVICE_REMOTE_WAKEUP |
Sergunb | 0:8f0d870509fe | 64 | } FEATURE_SELECTOR; |
Sergunb | 0:8f0d870509fe | 65 | |
Sergunb | 0:8f0d870509fe | 66 | /* Exported constants --------------------------------------------------------*/ |
Sergunb | 0:8f0d870509fe | 67 | /* Definition of "USBbmRequestType" */ |
Sergunb | 0:8f0d870509fe | 68 | #define REQUEST_TYPE 0x60 /* Mask to get request type */ |
Sergunb | 0:8f0d870509fe | 69 | #define STANDARD_REQUEST 0x00 /* Standard request */ |
Sergunb | 0:8f0d870509fe | 70 | #define CLASS_REQUEST 0x20 /* Class request */ |
Sergunb | 0:8f0d870509fe | 71 | #define VENDOR_REQUEST 0x40 /* Vendor request */ |
Sergunb | 0:8f0d870509fe | 72 | |
Sergunb | 0:8f0d870509fe | 73 | #define RECIPIENT 0x1F /* Mask to get recipient */ |
Sergunb | 0:8f0d870509fe | 74 | |
Sergunb | 0:8f0d870509fe | 75 | /* Exported macro ------------------------------------------------------------*/ |
Sergunb | 0:8f0d870509fe | 76 | /* Exported functions ------------------------------------------------------- */ |
Sergunb | 0:8f0d870509fe | 77 | |
Sergunb | 0:8f0d870509fe | 78 | #endif /* __USB_DEF_H */ |
Sergunb | 0:8f0d870509fe | 79 | |
Sergunb | 0:8f0d870509fe | 80 | /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/ |