max4146x_comp

Dependencies:   MAX14690

Committer:
sdivarci
Date:
Sun Oct 25 20:10:02 2020 +0000
Revision:
0:0061165683ee
sdivarci

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sdivarci 0:0061165683ee 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
sdivarci 0:0061165683ee 2 *
sdivarci 0:0061165683ee 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
sdivarci 0:0061165683ee 4 * and associated documentation files (the "Software"), to deal in the Software without
sdivarci 0:0061165683ee 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
sdivarci 0:0061165683ee 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
sdivarci 0:0061165683ee 7 * Software is furnished to do so, subject to the following conditions:
sdivarci 0:0061165683ee 8 *
sdivarci 0:0061165683ee 9 * The above copyright notice and this permission notice shall be included in all copies or
sdivarci 0:0061165683ee 10 * substantial portions of the Software.
sdivarci 0:0061165683ee 11 *
sdivarci 0:0061165683ee 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
sdivarci 0:0061165683ee 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
sdivarci 0:0061165683ee 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
sdivarci 0:0061165683ee 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
sdivarci 0:0061165683ee 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
sdivarci 0:0061165683ee 17 */
sdivarci 0:0061165683ee 18
sdivarci 0:0061165683ee 19 #define NUMBER_OF_LOGICAL_ENDPOINTS (4)
sdivarci 0:0061165683ee 20 #define NUMBER_OF_PHYSICAL_ENDPOINTS (NUMBER_OF_LOGICAL_ENDPOINTS * 2)
sdivarci 0:0061165683ee 21
sdivarci 0:0061165683ee 22 /* Define physical endpoint numbers */
sdivarci 0:0061165683ee 23
sdivarci 0:0061165683ee 24 /* Endpoint No. Type(s) MaxPacket DoubleBuffer */
sdivarci 0:0061165683ee 25 /* ---------------- ------------ ---------- --- */
sdivarci 0:0061165683ee 26 #define EP0OUT (0) /* Control 64 No */
sdivarci 0:0061165683ee 27 #define EP0IN (1) /* Control 64 No */
sdivarci 0:0061165683ee 28 #define EP1OUT (2) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 29 #define EP1IN (3) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 30 #define EP2OUT (4) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 31 #define EP2IN (5) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 32 #define EP3OUT (6) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 33 #define EP3IN (7) /* Int/Bulk/Iso 64/64/1023 Yes */
sdivarci 0:0061165683ee 34
sdivarci 0:0061165683ee 35 /* Maximum Packet sizes */
sdivarci 0:0061165683ee 36
sdivarci 0:0061165683ee 37 #define MAX_PACKET_SIZE_EP0 (64)
sdivarci 0:0061165683ee 38 #define MAX_PACKET_SIZE_EP1 (64) /* Int/Bulk */
sdivarci 0:0061165683ee 39 #define MAX_PACKET_SIZE_EP2 (64) /* Int/Bulk */
sdivarci 0:0061165683ee 40 #define MAX_PACKET_SIZE_EP3 (64) /* Int/Bulk */
sdivarci 0:0061165683ee 41
sdivarci 0:0061165683ee 42 #define MAX_PACKET_SIZE_EP1_ISO (1023) /* Isochronous */
sdivarci 0:0061165683ee 43 #define MAX_PACKET_SIZE_EP2_ISO (1023) /* Isochronous */
sdivarci 0:0061165683ee 44 #define MAX_PACKET_SIZE_EP3_ISO (1023) /* Isochronous */
sdivarci 0:0061165683ee 45
sdivarci 0:0061165683ee 46 /* Generic endpoints - intended to be portable accross devices */
sdivarci 0:0061165683ee 47 /* and be suitable for simple USB devices. */
sdivarci 0:0061165683ee 48
sdivarci 0:0061165683ee 49 /* Bulk endpoint */
sdivarci 0:0061165683ee 50 #define EPBULK_OUT (EP2OUT)
sdivarci 0:0061165683ee 51 #define EPBULK_IN (EP2IN)
sdivarci 0:0061165683ee 52 #define EPBULK_OUT_callback EP2_OUT_callback
sdivarci 0:0061165683ee 53 #define EPBULK_IN_callback EP2_IN_callback
sdivarci 0:0061165683ee 54 /* Interrupt endpoint */
sdivarci 0:0061165683ee 55 #define EPINT_OUT (EP1OUT)
sdivarci 0:0061165683ee 56 #define EPINT_IN (EP1IN)
sdivarci 0:0061165683ee 57 #define EPINT_OUT_callback EP1_OUT_callback
sdivarci 0:0061165683ee 58 #define EPINT_IN_callback EP1_IN_callback
sdivarci 0:0061165683ee 59 /* Isochronous endpoint */
sdivarci 0:0061165683ee 60 #define EPISO_OUT (EP3OUT)
sdivarci 0:0061165683ee 61 #define EPISO_IN (EP3IN)
sdivarci 0:0061165683ee 62 #define EPISO_OUT_callback EP3_OUT_callback
sdivarci 0:0061165683ee 63 #define EPISO_IN_callback EP3_IN_callback
sdivarci 0:0061165683ee 64
sdivarci 0:0061165683ee 65 #define MAX_PACKET_SIZE_EPBULK (MAX_PACKET_SIZE_EP2)
sdivarci 0:0061165683ee 66 #define MAX_PACKET_SIZE_EPINT (MAX_PACKET_SIZE_EP1)
sdivarci 0:0061165683ee 67 #define MAX_PACKET_SIZE_EPISO (MAX_PACKET_SIZE_EP3_ISO)