Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBDevice by
USBEndpoints_Maxim.h
00001 /******************************************************************************* 00002 * Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Maxim Integrated 00023 * Products, Inc. shall not be used except as stated in the Maxim Integrated 00024 * Products, Inc. Branding Policy. 00025 * 00026 * The mere transfer of this software does not imply any licenses 00027 * of trade secrets, proprietary technology, copyrights, patents, 00028 * trademarks, maskwork rights, or any other form of intellectual 00029 * property whatsoever. Maxim Integrated Products, Inc. retains all 00030 * ownership rights. 00031 ******************************************************************************* 00032 */ 00033 00034 #define NUMBER_OF_LOGICAL_ENDPOINTS (8) 00035 #define NUMBER_OF_PHYSICAL_ENDPOINTS (NUMBER_OF_LOGICAL_ENDPOINTS * 2) 00036 00037 #define DIR_OUT 0x00 00038 #define DIR_IN 0x01 00039 #define EP_NUM(ep) (ep >> 1) 00040 #define IN_EP(ep) (ep & DIR_IN) 00041 #define OUT_EP(ep) (!(ep & DIR_IN)) 00042 00043 /* Define physical endpoint numbers */ 00044 00045 /* Endpoint No. */ 00046 /* ---------------- */ 00047 #define EP0OUT ((0 << 1) | DIR_OUT) 00048 #define EP0IN ((0 << 1) | DIR_IN) 00049 #define EP1OUT ((1 << 1) | DIR_OUT) 00050 #define EP1IN ((1 << 1) | DIR_IN) 00051 #define EP2OUT ((2 << 1) | DIR_OUT) 00052 #define EP2IN ((2 << 1) | DIR_IN) 00053 #define EP3OUT ((3 << 1) | DIR_OUT) 00054 #define EP3IN ((3 << 1) | DIR_IN) 00055 #define EP4OUT ((4 << 1) | DIR_OUT) 00056 #define EP4IN ((4 << 1) | DIR_IN) 00057 #define EP5OUT ((5 << 1) | DIR_OUT) 00058 #define EP5IN ((5 << 1) | DIR_IN) 00059 #define EP6OUT ((6 << 1) | DIR_OUT) 00060 #define EP6IN ((6 << 1) | DIR_IN) 00061 #define EP7OUT ((7 << 1) | DIR_OUT) 00062 #define EP7IN ((7 << 1) | DIR_IN) 00063 00064 /* Maximum Packet sizes */ 00065 00066 #define MAX_PACKET_SIZE_EP0 (64) 00067 #define MAX_PACKET_SIZE_EP1 (64) 00068 #define MAX_PACKET_SIZE_EP2 (64) 00069 #define MAX_PACKET_SIZE_EP3 (64) 00070 #define MAX_PACKET_SIZE_EP4 (64) 00071 #define MAX_PACKET_SIZE_EP5 (64) 00072 #define MAX_PACKET_SIZE_EP6 (64) 00073 #define MAX_PACKET_SIZE_EP7 (64) 00074 00075 /* Generic endpoints - intended to be portable accross devices */ 00076 /* and be suitable for simple USB devices. */ 00077 00078 /* Bulk endpoints */ 00079 #define EPBULK_OUT (EP1OUT) 00080 #define EPBULK_IN (EP2IN) 00081 #define EPBULK_OUT_callback EP1_OUT_callback 00082 #define EPBULK_IN_callback EP2_IN_callback 00083 /* Interrupt endpoints */ 00084 #define EPINT_OUT (EP3OUT) 00085 #define EPINT_IN (EP4IN) 00086 #define EPINT_OUT_callback EP3_OUT_callback 00087 #define EPINT_IN_callback EP4_IN_callback 00088 /* Isochronous endpoints */ 00089 /* NOT SUPPORTED - use invalid endpoint number to prevent built errors */ 00090 #define EPISO_OUT (EP0OUT) 00091 #define EPISO_IN (EP0IN) 00092 00093 #define MAX_PACKET_SIZE_EPBULK (64) 00094 #define MAX_PACKET_SIZE_EPINT (64)
Generated on Tue Jul 12 2022 14:14:02 by
