USB Serial application

Fork of USBSerial_HelloWorld by Samuel Mokrani

Committer:
Zaitsev
Date:
Tue Jan 10 20:42:26 2017 +0000
Revision:
10:41552d038a69
USB Serial bi-directional bridge

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Zaitsev 10:41552d038a69 1 /*******************************************************************************
Zaitsev 10:41552d038a69 2 * Copyright (c) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
Zaitsev 10:41552d038a69 3 *
Zaitsev 10:41552d038a69 4 * Permission is hereby granted, free of charge, to any person obtaining a
Zaitsev 10:41552d038a69 5 * copy of this software and associated documentation files (the "Software"),
Zaitsev 10:41552d038a69 6 * to deal in the Software without restriction, including without limitation
Zaitsev 10:41552d038a69 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Zaitsev 10:41552d038a69 8 * and/or sell copies of the Software, and to permit persons to whom the
Zaitsev 10:41552d038a69 9 * Software is furnished to do so, subject to the following conditions:
Zaitsev 10:41552d038a69 10 *
Zaitsev 10:41552d038a69 11 * The above copyright notice and this permission notice shall be included
Zaitsev 10:41552d038a69 12 * in all copies or substantial portions of the Software.
Zaitsev 10:41552d038a69 13 *
Zaitsev 10:41552d038a69 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Zaitsev 10:41552d038a69 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Zaitsev 10:41552d038a69 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Zaitsev 10:41552d038a69 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Zaitsev 10:41552d038a69 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Zaitsev 10:41552d038a69 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Zaitsev 10:41552d038a69 20 * OTHER DEALINGS IN THE SOFTWARE.
Zaitsev 10:41552d038a69 21 *
Zaitsev 10:41552d038a69 22 * Except as contained in this notice, the name of Maxim Integrated
Zaitsev 10:41552d038a69 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Zaitsev 10:41552d038a69 24 * Products, Inc. Branding Policy.
Zaitsev 10:41552d038a69 25 *
Zaitsev 10:41552d038a69 26 * The mere transfer of this software does not imply any licenses
Zaitsev 10:41552d038a69 27 * of trade secrets, proprietary technology, copyrights, patents,
Zaitsev 10:41552d038a69 28 * trademarks, maskwork rights, or any other form of intellectual
Zaitsev 10:41552d038a69 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Zaitsev 10:41552d038a69 30 * ownership rights.
Zaitsev 10:41552d038a69 31 *******************************************************************************
Zaitsev 10:41552d038a69 32 */
Zaitsev 10:41552d038a69 33
Zaitsev 10:41552d038a69 34 #include "device.h"
Zaitsev 10:41552d038a69 35 #include "PeripheralPins.h"
Zaitsev 10:41552d038a69 36 #include "ioman_regs.h"
Zaitsev 10:41552d038a69 37 #include "ioman.h"
Zaitsev 10:41552d038a69 38 #include "adc.h"
Zaitsev 10:41552d038a69 39
Zaitsev 10:41552d038a69 40 /*
Zaitsev 10:41552d038a69 41 * To select a peripheral function on Maxim microcontrollers, multiple
Zaitsev 10:41552d038a69 42 * configurations must be made. The mbed PinMap structure only includes one
Zaitsev 10:41552d038a69 43 * data member to hold this information. To extend the configuration storage,
Zaitsev 10:41552d038a69 44 * the "function" data member is used as a pointer to a pin_function_t
Zaitsev 10:41552d038a69 45 * structure. This structure is defined in objects.h. The definitions below
Zaitsev 10:41552d038a69 46 * include the creation of the pin_function_t structures and the assignment of
Zaitsev 10:41552d038a69 47 * the pointers to the "function" data members.
Zaitsev 10:41552d038a69 48 */
Zaitsev 10:41552d038a69 49
Zaitsev 10:41552d038a69 50 #ifdef TOOLCHAIN_ARM_STD
Zaitsev 10:41552d038a69 51 #pragma diag_suppress 1296
Zaitsev 10:41552d038a69 52 #endif
Zaitsev 10:41552d038a69 53
Zaitsev 10:41552d038a69 54 /************I2C***************/
Zaitsev 10:41552d038a69 55 const PinMap PinMap_I2C_SDA[] = {
Zaitsev 10:41552d038a69 56 { P1_6, I2C_0, (int)&((pin_function_t){&MXC_IOMAN->i2cm0_req, &MXC_IOMAN->i2cm0_ack, MXC_F_IOMAN_I2CM0_REQ_MAPPING_REQ, MXC_F_IOMAN_I2CM0_ACK_MAPPING_ACK}) },
Zaitsev 10:41552d038a69 57 { P3_4, I2C_1, (int)&((pin_function_t){&MXC_IOMAN->i2cm1_req, &MXC_IOMAN->i2cm1_ack, MXC_F_IOMAN_I2CM1_REQ_MAPPING_REQ, MXC_F_IOMAN_I2CM1_ACK_MAPPING_ACK}) },
Zaitsev 10:41552d038a69 58 { NC, NC, 0 }
Zaitsev 10:41552d038a69 59 };
Zaitsev 10:41552d038a69 60
Zaitsev 10:41552d038a69 61 const PinMap PinMap_I2C_SCL[] = {
Zaitsev 10:41552d038a69 62 { P1_7, I2C_0, (int)&((pin_function_t){&MXC_IOMAN->i2cm0_req, &MXC_IOMAN->i2cm0_ack, MXC_F_IOMAN_I2CM0_REQ_MAPPING_REQ, MXC_F_IOMAN_I2CM0_ACK_MAPPING_ACK}) },
Zaitsev 10:41552d038a69 63 { P3_5, I2C_1, (int)&((pin_function_t){&MXC_IOMAN->i2cm1_req, &MXC_IOMAN->i2cm1_ack, MXC_F_IOMAN_I2CM1_REQ_MAPPING_REQ, MXC_F_IOMAN_I2CM1_ACK_MAPPING_ACK}) },
Zaitsev 10:41552d038a69 64 { NC, NC, 0 }
Zaitsev 10:41552d038a69 65 };
Zaitsev 10:41552d038a69 66
Zaitsev 10:41552d038a69 67 /************UART***************/
Zaitsev 10:41552d038a69 68 const PinMap PinMap_UART_TX[] = {
Zaitsev 10:41552d038a69 69 { P0_1, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART0_REQ_IO_REQ), (MXC_F_IOMAN_UART0_ACK_IO_MAP | MXC_F_IOMAN_UART0_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 70 { P2_1, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART1_REQ_IO_REQ), (MXC_F_IOMAN_UART1_ACK_IO_MAP | MXC_F_IOMAN_UART1_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 71 { P3_1, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART2_REQ_IO_REQ), (MXC_F_IOMAN_UART2_ACK_IO_MAP | MXC_F_IOMAN_UART2_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 72 { P0_0, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART0_REQ_IO_REQ), (MXC_F_IOMAN_UART0_ACK_IO_MAP | MXC_F_IOMAN_UART0_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 73 { P2_0, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART1_REQ_IO_REQ), (MXC_F_IOMAN_UART1_ACK_IO_MAP | MXC_F_IOMAN_UART1_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 74 { P3_0, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART2_REQ_IO_REQ), (MXC_F_IOMAN_UART2_ACK_IO_MAP | MXC_F_IOMAN_UART2_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 75 { NC, NC, 0 }
Zaitsev 10:41552d038a69 76 };
Zaitsev 10:41552d038a69 77
Zaitsev 10:41552d038a69 78 const PinMap PinMap_UART_RX[] = {
Zaitsev 10:41552d038a69 79 { P0_0, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART0_REQ_IO_REQ), (MXC_F_IOMAN_UART0_ACK_IO_MAP | MXC_F_IOMAN_UART0_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 80 { P2_0, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART1_REQ_IO_REQ), (MXC_F_IOMAN_UART1_ACK_IO_MAP | MXC_F_IOMAN_UART1_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 81 { P3_0, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART2_REQ_IO_REQ), (MXC_F_IOMAN_UART2_ACK_IO_MAP | MXC_F_IOMAN_UART2_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 82 { P0_1, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART0_REQ_IO_REQ), (MXC_F_IOMAN_UART0_ACK_IO_MAP | MXC_F_IOMAN_UART0_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 83 { P2_1, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART1_REQ_IO_REQ), (MXC_F_IOMAN_UART1_ACK_IO_MAP | MXC_F_IOMAN_UART1_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 84 { P3_1, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART2_REQ_IO_REQ), (MXC_F_IOMAN_UART2_ACK_IO_MAP | MXC_F_IOMAN_UART2_ACK_IO_ACK)}) },
Zaitsev 10:41552d038a69 85 { NC, NC, 0 }
Zaitsev 10:41552d038a69 86 };
Zaitsev 10:41552d038a69 87
Zaitsev 10:41552d038a69 88 const PinMap PinMap_UART_CTS[] = {
Zaitsev 10:41552d038a69 89 { P0_2, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART0_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART0_ACK_CTS_MAP | MXC_F_IOMAN_UART0_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 90 { P2_2, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART1_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART1_ACK_CTS_MAP | MXC_F_IOMAN_UART1_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 91 { P3_2, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART2_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART2_ACK_CTS_MAP | MXC_F_IOMAN_UART2_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 92 { P0_3, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART0_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART0_ACK_CTS_MAP | MXC_F_IOMAN_UART0_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 93 { P2_3, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART1_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART1_ACK_CTS_MAP | MXC_F_IOMAN_UART1_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 94 { P3_3, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART2_REQ_CTS_IO_REQ), (MXC_F_IOMAN_UART2_ACK_CTS_MAP | MXC_F_IOMAN_UART2_ACK_CTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 95 { NC, NC, 0 }
Zaitsev 10:41552d038a69 96 };
Zaitsev 10:41552d038a69 97
Zaitsev 10:41552d038a69 98 const PinMap PinMap_UART_RTS[] = {
Zaitsev 10:41552d038a69 99 { P0_3, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART0_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART0_ACK_RTS_MAP | MXC_F_IOMAN_UART0_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 100 { P2_3, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART1_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART1_ACK_RTS_MAP | MXC_F_IOMAN_UART1_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 101 { P3_3, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_A | MXC_F_IOMAN_UART2_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART2_ACK_RTS_MAP | MXC_F_IOMAN_UART2_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 102 { P0_2, UART_0, (int)&((pin_function_t){&MXC_IOMAN->uart0_req, &MXC_IOMAN->uart0_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART0_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART0_ACK_RTS_MAP | MXC_F_IOMAN_UART0_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 103 { P2_2, UART_1, (int)&((pin_function_t){&MXC_IOMAN->uart1_req, &MXC_IOMAN->uart1_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART1_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART1_ACK_RTS_MAP | MXC_F_IOMAN_UART1_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 104 { P3_2, UART_2, (int)&((pin_function_t){&MXC_IOMAN->uart2_req, &MXC_IOMAN->uart2_ack, ((uint32_t)IOMAN_MAP_B | MXC_F_IOMAN_UART2_REQ_RTS_IO_REQ), (MXC_F_IOMAN_UART2_ACK_RTS_MAP | MXC_F_IOMAN_UART2_ACK_RTS_IO_ACK)}) },
Zaitsev 10:41552d038a69 105 { NC, NC, 0 }
Zaitsev 10:41552d038a69 106 };
Zaitsev 10:41552d038a69 107
Zaitsev 10:41552d038a69 108 /************SPI***************/
Zaitsev 10:41552d038a69 109 const PinMap PinMap_SPI_SCLK[] = {
Zaitsev 10:41552d038a69 110 { P0_4, SPI_0, (int)&((pin_function_t){&MXC_IOMAN->spim0_req, &MXC_IOMAN->spim0_ack, MXC_F_IOMAN_SPIM0_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM0_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 111 { P1_0, SPI_1, (int)&((pin_function_t){&MXC_IOMAN->spim1_req, &MXC_IOMAN->spim1_ack, MXC_F_IOMAN_SPIM1_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM1_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 112 { P2_4, SPI_2, (int)&((pin_function_t){&MXC_IOMAN->spim2_req, &MXC_IOMAN->spim2_ack, MXC_F_IOMAN_SPIM2_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM2_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 113 { NC, NC, 0 }
Zaitsev 10:41552d038a69 114 };
Zaitsev 10:41552d038a69 115
Zaitsev 10:41552d038a69 116 const PinMap PinMap_SPI_MOSI[] = {
Zaitsev 10:41552d038a69 117 { P0_5, SPI_0, (int)&((pin_function_t){&MXC_IOMAN->spim0_req, &MXC_IOMAN->spim0_ack, MXC_F_IOMAN_SPIM0_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM0_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 118 { P1_1, SPI_1, (int)&((pin_function_t){&MXC_IOMAN->spim1_req, &MXC_IOMAN->spim1_ack, MXC_F_IOMAN_SPIM1_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM1_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 119 { P2_5, SPI_2, (int)&((pin_function_t){&MXC_IOMAN->spim2_req, &MXC_IOMAN->spim2_ack, MXC_F_IOMAN_SPIM2_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM2_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 120 { NC, NC, 0 }
Zaitsev 10:41552d038a69 121 };
Zaitsev 10:41552d038a69 122
Zaitsev 10:41552d038a69 123 const PinMap PinMap_SPI_MISO[] = {
Zaitsev 10:41552d038a69 124 { P0_6, SPI_0, (int)&((pin_function_t){&MXC_IOMAN->spim0_req, &MXC_IOMAN->spim0_ack, MXC_F_IOMAN_SPIM0_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM0_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 125 { P1_2, SPI_1, (int)&((pin_function_t){&MXC_IOMAN->spim1_req, &MXC_IOMAN->spim1_ack, MXC_F_IOMAN_SPIM1_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM1_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 126 { P2_6, SPI_2, (int)&((pin_function_t){&MXC_IOMAN->spim2_req, &MXC_IOMAN->spim2_ack, MXC_F_IOMAN_SPIM2_REQ_CORE_IO_REQ, MXC_F_IOMAN_SPIM2_ACK_CORE_IO_ACK}) },
Zaitsev 10:41552d038a69 127 { NC, NC, 0 }
Zaitsev 10:41552d038a69 128 };
Zaitsev 10:41552d038a69 129
Zaitsev 10:41552d038a69 130 const PinMap PinMap_SPI_SSEL[] = {
Zaitsev 10:41552d038a69 131 { P0_7, SPI_0, (int)&((pin_function_t){&MXC_IOMAN->spim0_req, &MXC_IOMAN->spim0_ack, MXC_F_IOMAN_SPIM0_REQ_SS0_IO_REQ, MXC_F_IOMAN_SPIM0_ACK_SS0_IO_ACK}) },
Zaitsev 10:41552d038a69 132 { P1_3, SPI_1, (int)&((pin_function_t){&MXC_IOMAN->spim1_req, &MXC_IOMAN->spim1_ack, MXC_F_IOMAN_SPIM1_REQ_SS0_IO_REQ, MXC_F_IOMAN_SPIM1_ACK_SS0_IO_ACK}) },
Zaitsev 10:41552d038a69 133 { P2_7, SPI_2, (int)&((pin_function_t){&MXC_IOMAN->spim2_req, &MXC_IOMAN->spim2_ack, MXC_F_IOMAN_SPIM2_REQ_SS0_IO_REQ, MXC_F_IOMAN_SPIM2_ACK_SS0_IO_ACK}) },
Zaitsev 10:41552d038a69 134 { NC, NC, 0 }
Zaitsev 10:41552d038a69 135 };
Zaitsev 10:41552d038a69 136
Zaitsev 10:41552d038a69 137 /************PWM***************/
Zaitsev 10:41552d038a69 138 const PinMap PinMap_PWM[] = {
Zaitsev 10:41552d038a69 139 { P0_0, PWM_0, 1 }, { P2_0, PWM_0, 1 }, { P4_0, PWM_0, 1 },
Zaitsev 10:41552d038a69 140 { P0_1, PWM_1, 1 }, { P2_1, PWM_1, 1 }, { P4_1, PWM_1, 1 },
Zaitsev 10:41552d038a69 141 { P0_2, PWM_2, 1 }, { P2_2, PWM_2, 1 }, { P4_2, PWM_2, 1 },
Zaitsev 10:41552d038a69 142 { P0_3, PWM_3, 1 }, { P2_3, PWM_3, 1 }, { P4_3, PWM_3, 1 },
Zaitsev 10:41552d038a69 143 { P0_4, PWM_4, 1 }, { P2_4, PWM_4, 1 }, { P4_4, PWM_4, 1 },
Zaitsev 10:41552d038a69 144 { P0_5, PWM_5, 1 }, { P2_5, PWM_5, 1 }, { P4_5, PWM_5, 1 },
Zaitsev 10:41552d038a69 145 { P0_6, PWM_6, 1 }, { P2_6, PWM_6, 1 }, { P4_6, PWM_6, 1 },
Zaitsev 10:41552d038a69 146 { P0_7, PWM_7, 1 }, { P2_7, PWM_7, 1 }, { P4_7, PWM_7, 1 },
Zaitsev 10:41552d038a69 147 { P1_0, PWM_8, 1 }, { P3_0, PWM_8, 1 },
Zaitsev 10:41552d038a69 148 { P1_1, PWM_9, 1 }, { P3_1, PWM_9, 1 },
Zaitsev 10:41552d038a69 149 { P1_2, PWM_10, 1 }, { P3_2, PWM_10, 1 },
Zaitsev 10:41552d038a69 150 { P1_3, PWM_11, 1 }, { P3_3, PWM_11, 1 },
Zaitsev 10:41552d038a69 151 { P1_4, PWM_12, 1 }, { P3_4, PWM_12, 1 },
Zaitsev 10:41552d038a69 152 { P1_5, PWM_13, 1 }, { P3_5, PWM_13, 1 },
Zaitsev 10:41552d038a69 153 { P1_6, PWM_14, 1 }, { P3_6, PWM_14, 1 },
Zaitsev 10:41552d038a69 154 { P1_7, PWM_15, 1 }, { P3_7, PWM_15, 1 },
Zaitsev 10:41552d038a69 155 { NC, NC, 0 }
Zaitsev 10:41552d038a69 156 };
Zaitsev 10:41552d038a69 157
Zaitsev 10:41552d038a69 158 /************ADC***************/
Zaitsev 10:41552d038a69 159 const PinMap PinMap_ADC[] = {
Zaitsev 10:41552d038a69 160 { AIN_0, ADC, ADC_CH_0 },
Zaitsev 10:41552d038a69 161 { AIN_1, ADC, ADC_CH_1 },
Zaitsev 10:41552d038a69 162 { AIN_2, ADC, ADC_CH_2 },
Zaitsev 10:41552d038a69 163 { AIN_3, ADC, ADC_CH_3 },
Zaitsev 10:41552d038a69 164 { AIN_4, ADC, ADC_CH_0_DIV_5 },
Zaitsev 10:41552d038a69 165 { AIN_5, ADC, ADC_CH_1_DIV_5 },
Zaitsev 10:41552d038a69 166 { NC, NC, 0 }
Zaitsev 10:41552d038a69 167 };
Zaitsev 10:41552d038a69 168