USB device stack, fixes for USBSerial & KL25Z
Fork of USBDevice by
USBEndpoints_LPC17_LPC23.h
00001 /* Copyright (c) 2010-2011 mbed.org, MIT License 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 00004 * and associated documentation files (the "Software"), to deal in the Software without 00005 * restriction, including without limitation the rights to use, copy, modify, merge, publish, 00006 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 00007 * Software is furnished to do so, subject to the following conditions: 00008 * 00009 * The above copyright notice and this permission notice shall be included in all copies or 00010 * substantial portions of the Software. 00011 * 00012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 00013 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00014 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00015 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00016 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00017 */ 00018 00019 #define NUMBER_OF_LOGICAL_ENDPOINTS (16) 00020 #define NUMBER_OF_PHYSICAL_ENDPOINTS (NUMBER_OF_LOGICAL_ENDPOINTS * 2) 00021 00022 /* Define physical endpoint numbers */ 00023 00024 /* Endpoint No. Type(s) MaxPacket DoubleBuffer */ 00025 /* ---------------- ------------ ---------- --- */ 00026 #define EP0OUT (0) /* Control 64 No */ 00027 #define EP0IN (1) /* Control 64 No */ 00028 #define EP1OUT (2) /* Interrupt 64 No */ 00029 #define EP1IN (3) /* Interrupt 64 No */ 00030 #define EP2OUT (4) /* Bulk 64 Yes */ 00031 #define EP2IN (5) /* Bulk 64 Yes */ 00032 #define EP3OUT (6) /* Isochronous 1023 Yes */ 00033 #define EP3IN (7) /* Isochronous 1023 Yes */ 00034 #define EP4OUT (8) /* Interrupt 64 No */ 00035 #define EP4IN (9) /* Interrupt 64 No */ 00036 #define EP5OUT (10) /* Bulk 64 Yes */ 00037 #define EP5IN (11) /* Bulk 64 Yes */ 00038 #define EP6OUT (12) /* Isochronous 1023 Yes */ 00039 #define EP6IN (13) /* Isochronous 1023 Yes */ 00040 #define EP7OUT (14) /* Interrupt 64 No */ 00041 #define EP7IN (15) /* Interrupt 64 No */ 00042 #define EP8OUT (16) /* Bulk 64 Yes */ 00043 #define EP8IN (17) /* Bulk 64 Yes */ 00044 #define EP9OUT (18) /* Isochronous 1023 Yes */ 00045 #define EP9IN (19) /* Isochronous 1023 Yes */ 00046 #define EP10OUT (20) /* Interrupt 64 No */ 00047 #define EP10IN (21) /* Interrupt 64 No */ 00048 #define EP11OUT (22) /* Bulk 64 Yes */ 00049 #define EP11IN (23) /* Bulk 64 Yes */ 00050 #define EP12OUT (24) /* Isochronous 1023 Yes */ 00051 #define EP12IN (25) /* Isochronous 1023 Yes */ 00052 #define EP13OUT (26) /* Interrupt 64 No */ 00053 #define EP13IN (27) /* Interrupt 64 No */ 00054 #define EP14OUT (28) /* Bulk 64 Yes */ 00055 #define EP14IN (29) /* Bulk 64 Yes */ 00056 #define EP15OUT (30) /* Bulk 64 Yes */ 00057 #define EP15IN (31) /* Bulk 64 Yes */ 00058 00059 /* Maximum Packet sizes */ 00060 00061 #define MAX_PACKET_SIZE_EP0 (64) 00062 #define MAX_PACKET_SIZE_EP1 (64) 00063 #define MAX_PACKET_SIZE_EP2 (64) 00064 #define MAX_PACKET_SIZE_EP3 (1023) 00065 #define MAX_PACKET_SIZE_EP4 (64) 00066 #define MAX_PACKET_SIZE_EP5 (64) 00067 #define MAX_PACKET_SIZE_EP6 (1023) 00068 #define MAX_PACKET_SIZE_EP7 (64) 00069 #define MAX_PACKET_SIZE_EP8 (64) 00070 #define MAX_PACKET_SIZE_EP9 (1023) 00071 #define MAX_PACKET_SIZE_EP10 (64) 00072 #define MAX_PACKET_SIZE_EP11 (64) 00073 #define MAX_PACKET_SIZE_EP12 (1023) 00074 #define MAX_PACKET_SIZE_EP13 (64) 00075 #define MAX_PACKET_SIZE_EP14 (64) 00076 #define MAX_PACKET_SIZE_EP15 (64) 00077 00078 /* Generic endpoints - intended to be portable accross devices */ 00079 /* and be suitable for simple USB devices. */ 00080 00081 /* Bulk endpoints */ 00082 #define EPBULK_OUT (EP2OUT) 00083 #define EPBULK_IN (EP2IN) 00084 /* Interrupt endpoints */ 00085 #define EPINT_OUT (EP1OUT) 00086 #define EPINT_IN (EP1IN) 00087 /* Isochronous endpoints */ 00088 #define EPISO_OUT (EP3OUT) 00089 #define EPISO_IN (EP3IN) 00090 00091 #define MAX_PACKET_SIZE_EPBULK (MAX_PACKET_SIZE_EP2) 00092 #define MAX_PACKET_SIZE_EPINT (MAX_PACKET_SIZE_EP1) 00093 #define MAX_PACKET_SIZE_EPISO (MAX_PACKET_SIZE_EP3)
Generated on Wed Jul 13 2022 17:00:18 by 1.7.2