programa de torreta
Dependencies: mbed
PinNames.h
00001 /* mbed Microcontroller Library 00002 ******************************************************************************* 00003 * Copyright (c) 2014, STMicroelectronics 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions are met: 00008 * 00009 * 1. Redistributions of source code must retain the above copyright notice, 00010 * this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright notice, 00012 * this list of conditions and the following disclaimer in the documentation 00013 * and/or other materials provided with the distribution. 00014 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00015 * may be used to endorse or promote products derived from this software 00016 * without specific prior written permission. 00017 * 00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00021 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00022 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00023 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00024 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00025 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00026 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00027 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00028 ******************************************************************************* 00029 00030 */ 00031 #ifndef MBED_PINNAMES_H 00032 #define MBED_PINNAMES_H 00033 00034 #include "cmsis.h" 00035 #include "PinNamesTypes.h" 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 //UART to AMB8826 00042 #define TXD1 PA_9 00043 #define RXD1 PA_10 00044 #define CTS1 PA_11 00045 int baudRate = 115200; 00046 00047 //UART to Silicon Labs CP210x 00048 #define TXD2 PA_2 00049 #define RXD2 PA_3 00050 00051 //UART to FTDI 00052 #define TXD3 PB_10 00053 #define RXD3 PB_11 00054 00055 //I2C 00056 #define I2C1_SCL PB_6 00057 #define I2C1_SDA PB_7 00058 00059 #define I2C2_SCL PB_10 00060 #define I2C2_SDA PB_11 00061 00062 //SPI 00063 #define SPI1_MOSI PA_7 00064 #define SPI1_MISO PA_6 00065 #define SPI1_SCLK PA_5 00066 #define SPI1_NSS1 PA_4 00067 #define SDsel PA_4 00068 00069 #define SPI2_MOSI PB_15 00070 #define SPI2_MISO PB_14 00071 #define SPI2_SCLK PB_13 00072 #define SPI2_NSS2 PB_12 00073 00074 //CAN 00075 #define CAN1_RX PA_11 00076 #define CAN1_TX PA_12 00077 00078 //USB CDC 00079 #define USB_POS PA_12 00080 #define USB_NEG PA_11 00081 00082 //ADC 00083 #define Uin PA_1 00084 #define Ubatt PA_0 00085 00086 typedef enum { 00087 // Not connected 00088 NC = (int)0xFFFFFFFF, 00089 00090 // Ports 00091 PA_0 = 0x00, 00092 PA_1 = 0x01, 00093 PA_2 = 0x02, 00094 PA_3 = 0x03, 00095 PA_4 = 0x04, 00096 PA_5 = 0x05, 00097 PA_6 = 0x06, 00098 PA_7 = 0x07, 00099 PA_8 = 0x08, 00100 PA_9 = 0x09, 00101 PA_10 = 0x0A, 00102 PA_11 = 0x0B, 00103 PA_12 = 0x0C, 00104 PA_13 = NC, 00105 PA_14 = NC, 00106 PA_15 = 0x0F, 00107 00108 PB_0 = 0x10, 00109 PB_1 = 0x11, 00110 PB_2 = NC, 00111 PB_3 = 0x13, 00112 PB_4 = 0x14, 00113 PB_5 = 0x15, 00114 PB_6 = 0x16, 00115 PB_7 = 0x17, 00116 PB_8 = 0x18, 00117 PB_9 = 0x19, 00118 PB_10 = 0x1A, 00119 PB_11 = 0x1B, 00120 PB_12 = 0x1C, 00121 PB_13 = 0x1D, 00122 PB_14 = 0x1E, 00123 PB_15 = 0x1F, 00124 00125 PC_0 = NC, 00126 PC_1 = NC, 00127 PC_2 = NC, 00128 PC_3 = NC, 00129 PC_4 = NC, 00130 PC_5 = NC, 00131 PC_6 = NC, 00132 PC_7 = NC, 00133 PC_8 = NC, 00134 PC_9 = NC, 00135 PC_10 = NC, 00136 PC_11 = NC, 00137 PC_12 = NC, 00138 PC_13 = 0x2D, 00139 PC_14 = 0x2E, 00140 PC_15 = 0x2F, 00141 00142 PD_2 = NC, 00143 00144 // ADC internal channels 00145 ADC_TEMP = 0xF0, 00146 ADC_VREF = 0xF1, 00147 00148 // Arduino connector namings 00149 A0 = PA_0, 00150 A1 = PA_1, 00151 A2 = PA_4, 00152 A3 = PB_0, 00153 A4 = NC, 00154 A5 = NC, 00155 D0 = PA_3, 00156 D1 = PA_2, 00157 D2 = PA_10, 00158 D3 = PB_3, 00159 D4 = PB_5, 00160 D5 = PB_4, 00161 D6 = PB_10, 00162 D7 = PA_8, 00163 D8 = PA_9, 00164 D9 = NC, 00165 D10 = PB_6, 00166 D11 = PA_7, 00167 D12 = PA_6, 00168 D13 = PA_5, 00169 D14 = PB_9, 00170 D15 = PB_8, 00171 00172 // Generic signals namings 00173 Red_Led = NC, 00174 Green_Led = PC_13, 00175 Blue_Led = NC, 00176 LED1 = PC_13, 00177 LED2 = NC, 00178 LED3 = NC, 00179 LED4 = NC, 00180 USER_BUTTON = NC, 00181 SERIAL_TX = PA_2, 00182 SERIAL_RX = PA_3, 00183 USBTX = PA_12, 00184 USBRX = PA_11, 00185 CANRX = PB_8, 00186 CANTX = PB_9, 00187 I2C_SCL = PB_6, 00188 I2C_SDA = PB_7, 00189 SPI_MOSI = PA_7, 00190 SPI_MISO = PA_6, 00191 SPI_SCK = PA_5, 00192 SPI_CS = PA_4, 00193 TRACE_SWO = PB_3, 00194 SWO = PB_3 00195 } PinName; 00196 00197 #ifdef __cplusplus 00198 } 00199 #endif 00200 00201 #endif
Generated on Sat Jul 30 2022 20:17:21 by 1.7.2