usb_defines.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USB_DEF_H__
30 #define __USB_DEF_H__
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "usb_conf.h"
34 
57 #define USB_OTG_SPEED_PARAM_HIGH 0
58 #define USB_OTG_SPEED_PARAM_HIGH_IN_FULL 1
59 #define USB_OTG_SPEED_PARAM_FULL 3
60 
61 #define USB_OTG_SPEED_HIGH 0
62 #define USB_OTG_SPEED_FULL 1
63 
64 #define USB_OTG_ULPI_PHY 1
65 #define USB_OTG_EMBEDDED_PHY 2
66 
75 #define GAHBCFG_TXFEMPTYLVL_EMPTY 1
76 #define GAHBCFG_TXFEMPTYLVL_HALFEMPTY 0
77 #define GAHBCFG_GLBINT_ENABLE 1
78 #define GAHBCFG_INT_DMA_BURST_SINGLE 0
79 #define GAHBCFG_INT_DMA_BURST_INCR 1
80 #define GAHBCFG_INT_DMA_BURST_INCR4 3
81 #define GAHBCFG_INT_DMA_BURST_INCR8 5
82 #define GAHBCFG_INT_DMA_BURST_INCR16 7
83 #define GAHBCFG_DMAENABLE 1
84 #define GAHBCFG_TXFEMPTYLVL_EMPTY 1
85 #define GAHBCFG_TXFEMPTYLVL_HALFEMPTY 0
86 #define GRXSTS_PKTSTS_IN 2
87 #define GRXSTS_PKTSTS_IN_XFER_COMP 3
88 #define GRXSTS_PKTSTS_DATA_TOGGLE_ERR 5
89 #define GRXSTS_PKTSTS_CH_HALTED 7
90 
98 #define MODE_HNP_SRP_CAPABLE 0
99 #define MODE_SRP_ONLY_CAPABLE 1
100 #define MODE_NO_HNP_SRP_CAPABLE 2
101 #define MODE_SRP_CAPABLE_DEVICE 3
102 #define MODE_NO_SRP_CAPABLE_DEVICE 4
103 #define MODE_SRP_CAPABLE_HOST 5
104 #define MODE_NO_SRP_CAPABLE_HOST 6
105 #define A_HOST 1
106 #define A_SUSPEND 2
107 #define A_PERIPHERAL 3
108 #define B_PERIPHERAL 4
109 #define B_HOST 5
110 #define DEVICE_MODE 0
111 #define HOST_MODE 1
112 #define OTG_MODE 2
113 
121 #define DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ 0
122 #define DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ 1
123 #define DSTS_ENUMSPD_LS_PHY_6MHZ 2
124 #define DSTS_ENUMSPD_FS_PHY_48MHZ 3
125 
126 #define DCFG_FRAME_INTERVAL_80 0
127 #define DCFG_FRAME_INTERVAL_85 1
128 #define DCFG_FRAME_INTERVAL_90 2
129 #define DCFG_FRAME_INTERVAL_95 3
130 
131 #define DEP0CTL_MPS_64 0
132 #define DEP0CTL_MPS_32 1
133 #define DEP0CTL_MPS_16 2
134 #define DEP0CTL_MPS_8 3
135 
136 #define EP_SPEED_LOW 0
137 #define EP_SPEED_FULL 1
138 #define EP_SPEED_HIGH 2
139 
140 #define EP_TYPE_CTRL 0
141 #define EP_TYPE_ISOC 1
142 #define EP_TYPE_BULK 2
143 #define EP_TYPE_INTR 3
144 #define EP_TYPE_MSK 3
145 
146 #define STS_GOUT_NAK 1
147 #define STS_DATA_UPDT 2
148 #define STS_XFER_COMP 3
149 #define STS_SETUP_COMP 4
150 #define STS_SETUP_UPDT 6
151 
159 #define HC_PID_DATA0 0
160 #define HC_PID_DATA2 1
161 #define HC_PID_DATA1 2
162 #define HC_PID_SETUP 3
163 
164 #define HPRT0_PRTSPD_HIGH_SPEED 0
165 #define HPRT0_PRTSPD_FULL_SPEED 1
166 #define HPRT0_PRTSPD_LOW_SPEED 2
167 
168 #define HCFG_30_60_MHZ 0
169 #define HCFG_48_MHZ 1
170 #define HCFG_6_MHZ 2
171 
172 #define HCCHAR_CTRL 0
173 #define HCCHAR_ISOC 1
174 #define HCCHAR_BULK 2
175 #define HCCHAR_INTR 3
176 
177 #ifndef MIN
178 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
179 #endif
180 
190 typedef enum
191 {
225 #define USB_OTG_READ_REG32(reg) (*(__IO uint32_t *)(reg))
226 #define USB_OTG_WRITE_REG32(reg,value) (*(__IO uint32_t *)(reg) = (value))
227 #define USB_OTG_MODIFY_REG32(reg,clear_mask,set_mask) \
228  USB_OTG_WRITE_REG32((reg), (((USB_OTG_READ_REG32(reg)) & ~(clear_mask)) | (set_mask)) )
229 
230 /********************************************************************************
231  ENUMERATION TYPE
232 ********************************************************************************/
238 };
239 
240 #endif /* __USB_DEFINES__H__ */
241 
242 
250 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
251 
USB_OTG_SPEED
Definition: usb_defines.h:233
USB_OTG_CORE_ID_TypeDef
Definition: usb_defines.h:190
General low level driver configuration.


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:26