NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
usb_conf.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USB_CONF_H
30 #define __USB_CONF_H
31 
32 /* Includes ------------------------------------------------------------------*/
33 /* Exported types ------------------------------------------------------------*/
34 /* Exported constants --------------------------------------------------------*/
35 /* Exported macro ------------------------------------------------------------*/
36 /* Exported functions ------------------------------------------------------- */
37 /* External variables --------------------------------------------------------*/
38 
39 /*-------------------------------------------------------------*/
40 /* EP_NUM */
41 /* defines how many endpoints are used by the device */
42 /*-------------------------------------------------------------*/
43 
44 #define EP_NUM (4)
45 
46 /*-------------------------------------------------------------*/
47 /* -------------- Buffer Description Table -----------------*/
48 /*-------------------------------------------------------------*/
49 /* buffer table base address */
50 /* buffer table base address */
51 #define BTABLE_ADDRESS (0x00)
52 
53 /* EP0 */
54 /* rx/tx buffer base address */
55 #define ENDP0_RXADDR (0x40)
56 #define ENDP0_TXADDR (0x80)
57 
58 /* EP1 */
59 /* tx buffer base address */
60 #define ENDP1_TXADDR (0xC0)
61 #define ENDP2_TXADDR (0x100)
62 #define ENDP3_RXADDR (0x110)
63 
64 /*-------------------------------------------------------------*/
65 /* ------------------- ISTR events -------------------------*/
66 /*-------------------------------------------------------------*/
67 /* IMR_MSK */
68 /* mask defining which events has to be handled */
69 /* by the device application software */
70 // HJI #define IMR_MSK (CNTR_CTRM | CNTR_WKUPM | CNTR_SUSPM | CNTR_ERRM | CNTR_SOFM | CNTR_ESOFM | CNTR_RESETM )
71 // Disable Suspend/Resume response completely // HJI
72 #define IMR_MSK (CNTR_CTRM | CNTR_WKUPM | CNTR_ERRM | CNTR_SOFM | CNTR_RESETM ) // HJI
73 
74 /*#define CTR_CALLBACK*/
75 /*#define DOVR_CALLBACK*/
76 /*#define ERR_CALLBACK*/
77 /*#define WKUP_CALLBACK*/
78 /*#define SUSP_CALLBACK*/
79 /*#define RESET_CALLBACK*/
80 /*#define SOF_CALLBACK*/
81 /*#define ESOF_CALLBACK*/
82 /* CTR service routines */
83 /* associated to defined endpoints */
84 /*#define EP1_IN_Callback NOP_Process*/
85 #define EP2_IN_Callback NOP_Process
86 #define EP3_IN_Callback NOP_Process
87 #define EP4_IN_Callback NOP_Process
88 #define EP5_IN_Callback NOP_Process
89 #define EP6_IN_Callback NOP_Process
90 #define EP7_IN_Callback NOP_Process
91 
92 #define EP1_OUT_Callback NOP_Process
93 #define EP2_OUT_Callback NOP_Process
94 /*#define EP3_OUT_Callback NOP_Process*/
95 #define EP4_OUT_Callback NOP_Process
96 #define EP5_OUT_Callback NOP_Process
97 #define EP6_OUT_Callback NOP_Process
98 #define EP7_OUT_Callback NOP_Process
99 
100 #endif /* __USB_CONF_H */
101 
102 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/