USB device stack
Dependents: blinky_max32630fthr FTHR_USB_serial FTHR_OLED HSP_RPC_GUI_3_0_1 ... more
Fork of USBDevice by
USBEndpoints_EFM32.h
00001 00002 #ifndef TARGET_EFM32HG_STK3400 00003 # define NUMBER_OF_LOGICAL_ENDPOINTS (6) 00004 #else 00005 # define NUMBER_OF_LOGICAL_ENDPOINTS (3) 00006 #endif 00007 00008 #define NUMBER_OF_PHYSICAL_ENDPOINTS (NUMBER_OF_LOGICAL_ENDPOINTS * 2) 00009 #define NUMBER_OF_ENDPOINTS (NUMBER_OF_PHYSICAL_ENDPOINTS + 2) /* Includes EP0 */ 00010 00011 #define EP0OUT (0) 00012 #define EP0IN (1) 00013 #define EP1OUT (2) 00014 #define EP1IN (3) 00015 #define EP2OUT (4) 00016 #define EP2IN (5) 00017 #define EP3OUT (6) 00018 #define EP3IN (7) 00019 #ifndef TARGET_EFM32HG_STK3400 00020 # define EP4OUT (8) 00021 # define EP4IN (9) 00022 # define EP5OUT (10) 00023 # define EP5IN (11) 00024 # define EP6OUT (12) 00025 # define EP6IN (13) 00026 #endif 00027 00028 #define USB_EP_TO_INDEX(ep) (ep) 00029 #define USB_EP_TO_ADDR(ep) (((ep)>>1) | (((ep) & 1 ) ? 0x80 : 0x00)) 00030 #define USB_ADDR_TO_EP(ep) (((ep)<<1) | (((ep) & 0x80) ? 0x01 : 0x00)) 00031 00032 /* Maximum Packet sizes */ 00033 00034 #define MAX_PACKET_SIZE_EP0 64 00035 #define MAX_PACKET_SIZE_EP1 64 00036 #define MAX_PACKET_SIZE_EP2 64 00037 #define MAX_PACKET_SIZE_EP3 64 00038 #ifndef TARGET_EFM32HG_STK3400 00039 # define MAX_PACKET_SIZE_EP4 64 00040 # define MAX_PACKET_SIZE_EP5 64 00041 # define MAX_PACKET_SIZE_EP6 64 00042 #endif 00043 00044 /* Generic endpoints - intended to be portable accross devices */ 00045 /* and be suitable for simple USB devices. */ 00046 00047 /* Bulk endpoints */ 00048 #define EPBULK_OUT EP2OUT 00049 #define EPBULK_IN EP2IN 00050 #define EPBULK_OUT_callback EP2_OUT_callback 00051 #define EPBULK_IN_callback EP2_IN_callback 00052 /* Interrupt endpoints */ 00053 #define EPINT_OUT EP1OUT 00054 #define EPINT_IN EP1IN 00055 #define EPINT_OUT_callback EP1_OUT_callback 00056 #define EPINT_IN_callback EP1_IN_callback 00057 /* Isochronous endpoints */ 00058 #define EPISO_OUT EP3OUT 00059 #define EPISO_IN EP3IN 00060 #define EPISO_OUT_callback EP3_OUT_callback 00061 #define EPISO_IN_callback EP3_IN_callback 00062 00063 #define MAX_PACKET_SIZE_EPBULK 64 00064 #define MAX_PACKET_SIZE_EPINT 64 00065 #define MAX_PACKET_SIZE_EPISO 1023
Generated on Wed Jul 13 2022 12:44:03 by 1.7.2