Fork of https://developer.mbed.org/users/bscott/code/STM32_USBDevice/
Fork of STM32_USBDevice by
USBEndpoints_STM32L1.h
00001 /* Copyright (c) 2010-2015 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 (4) 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) /* Int/Bulk/Iso 64/64/1023 Yes */ 00029 #define EP1IN (3) /* Int/Bulk/Iso 64/64/1023 Yes */ 00030 #define EP2OUT (4) /* Int/Bulk/Iso 64/64/1023 Yes */ 00031 #define EP2IN (5) /* Int/Bulk/Iso 64/64/1023 Yes */ 00032 #define EP3OUT (6) /* Int/Bulk/Iso 64/64/1023 Yes */ 00033 #define EP3IN (7) /* Int/Bulk/Iso 64/64/1023 Yes */ 00034 00035 /* Maximum Packet sizes */ 00036 00037 #define MAX_PACKET_SIZE_EP0 (64) 00038 #define MAX_PACKET_SIZE_EP1 (64) /* Int/Bulk */ 00039 #define MAX_PACKET_SIZE_EP2 (64) /* Int/Bulk */ 00040 #define MAX_PACKET_SIZE_EP3 (64) /* Int/Bulk */ 00041 00042 #define MAX_PACKET_SIZE_EP1_ISO (192) /* Isochronous */ 00043 #define MAX_PACKET_SIZE_EP2_ISO (192) /* Isochronous */ 00044 #define MAX_PACKET_SIZE_EP3_ISO (192) /* Isochronous */ 00045 00046 /* Generic endpoints - intended to be portable accross devices */ 00047 /* and be suitable for simple USB devices. */ 00048 00049 /* Bulk/CDC endpoint */ 00050 #define EPBULK_OUT (EP2OUT) 00051 #define EPBULK_IN (EP2IN) 00052 #define EPBULK_OUT_callback EP2_OUT_callback 00053 #define EPBULK_IN_callback EP2_IN_callback 00054 #define EPCDC_OUT (EP2OUT) 00055 #define EPCDC_IN (EP2IN) 00056 #define EPCDC_OUT_callback EP2_OUT_callback 00057 #define EPCDC_IN_callback EP2_IN_callback 00058 /* Interrupt endpoint */ 00059 #define EPINT_OUT (EP1OUT) 00060 #define EPINT_IN (EP1IN) 00061 #define EPINT_OUT_callback EP1_OUT_callback 00062 #define EPINT_IN_callback EP1_IN_callback 00063 /* Isochronous endpoint - not used, replaced by WebUSB endpoint */ 00064 /*#define EPISO_OUT (EP3OUT) 00065 #define EPISO_IN (EP3IN) 00066 #define EPISO_OUT_callback EP3_OUT_callback 00067 #define EPISO_IN_callback EP3_IN_callback*/ 00068 00069 /* WebUSB endpoint (bulk) */ 00070 #define EPWEBUSB_OUT (EP3OUT) 00071 #define EPWEBUSB_IN (EP3IN) 00072 #define EPWEBUSB_OUT_callback EP3_OUT_callback 00073 #define EPWEBUSB_IN_callback EP3_IN_callback 00074 00075 #define MAX_PACKET_SIZE_EPBULK (MAX_PACKET_SIZE_EP2) 00076 #define MAX_PACKET_SIZE_EPCDC (MAX_PACKET_SIZE_EP2) 00077 #define MAX_PACKET_SIZE_EPINT (MAX_PACKET_SIZE_EP1) 00078 #define MAX_PACKET_SIZE_EPISO (MAX_PACKET_SIZE_EP3_ISO) 00079 #define MAX_PACKET_SIZE_EPWEBUSB (MAX_PACKET_SIZE_EP3)
Generated on Wed Jul 13 2022 00:18:45 by 1.7.2