STM32F103C8_Plantilla_USB Plantilla para configuración del Puerto USB y la Terminal Serial

Dependencies:   mbed-STM32F103C8T6 USBDevice_STM32F103 mbed-src

Committer:
Antulius
Date:
Wed Jun 26 18:48:46 2019 +0000
Revision:
0:16b83f767a7e
STM32-103C8T6_Plantilla  Plantilla para la Tarjeta "Blue Pill"

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Antulius 0:16b83f767a7e 1 /* mbed Microcontroller Library
Antulius 0:16b83f767a7e 2 *******************************************************************************
Antulius 0:16b83f767a7e 3 * Copyright (c) 2014, STMicroelectronics
Antulius 0:16b83f767a7e 4 * All rights reserved.
Antulius 0:16b83f767a7e 5 *
Antulius 0:16b83f767a7e 6 * Redistribution and use in source and binary forms, with or without
Antulius 0:16b83f767a7e 7 * modification, are permitted provided that the following conditions are met:
Antulius 0:16b83f767a7e 8 *
Antulius 0:16b83f767a7e 9 * 1. Redistributions of source code must retain the above copyright notice,
Antulius 0:16b83f767a7e 10 * this list of conditions and the following disclaimer.
Antulius 0:16b83f767a7e 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
Antulius 0:16b83f767a7e 12 * this list of conditions and the following disclaimer in the documentation
Antulius 0:16b83f767a7e 13 * and/or other materials provided with the distribution.
Antulius 0:16b83f767a7e 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Antulius 0:16b83f767a7e 15 * may be used to endorse or promote products derived from this software
Antulius 0:16b83f767a7e 16 * without specific prior written permission.
Antulius 0:16b83f767a7e 17 *
Antulius 0:16b83f767a7e 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Antulius 0:16b83f767a7e 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Antulius 0:16b83f767a7e 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Antulius 0:16b83f767a7e 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Antulius 0:16b83f767a7e 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Antulius 0:16b83f767a7e 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Antulius 0:16b83f767a7e 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Antulius 0:16b83f767a7e 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Antulius 0:16b83f767a7e 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Antulius 0:16b83f767a7e 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Antulius 0:16b83f767a7e 28 *******************************************************************************
Antulius 0:16b83f767a7e 29
Antulius 0:16b83f767a7e 30 */
Antulius 0:16b83f767a7e 31 #ifndef MBED_PINNAMES_H
Antulius 0:16b83f767a7e 32 #define MBED_PINNAMES_H
Antulius 0:16b83f767a7e 33
Antulius 0:16b83f767a7e 34 #include "cmsis.h"
Antulius 0:16b83f767a7e 35 #include "PinNamesTypes.h"
Antulius 0:16b83f767a7e 36
Antulius 0:16b83f767a7e 37 #ifdef __cplusplus
Antulius 0:16b83f767a7e 38 extern "C" {
Antulius 0:16b83f767a7e 39 #endif
Antulius 0:16b83f767a7e 40
Antulius 0:16b83f767a7e 41 typedef enum {
Antulius 0:16b83f767a7e 42 // Not connected
Antulius 0:16b83f767a7e 43 NC = (int)0xFFFFFFFF,
Antulius 0:16b83f767a7e 44
Antulius 0:16b83f767a7e 45 // Ports
Antulius 0:16b83f767a7e 46 PA_0 = 0x00,
Antulius 0:16b83f767a7e 47 PA_1 = 0x01,
Antulius 0:16b83f767a7e 48 PA_2 = 0x02,
Antulius 0:16b83f767a7e 49 PA_3 = 0x03,
Antulius 0:16b83f767a7e 50 PA_4 = 0x04,
Antulius 0:16b83f767a7e 51 PA_5 = 0x05,
Antulius 0:16b83f767a7e 52 PA_6 = 0x06,
Antulius 0:16b83f767a7e 53 PA_7 = 0x07,
Antulius 0:16b83f767a7e 54 PA_8 = 0x08,
Antulius 0:16b83f767a7e 55 PA_9 = 0x09,
Antulius 0:16b83f767a7e 56 PA_10 = 0x0A,
Antulius 0:16b83f767a7e 57 PA_11 = 0x0B,
Antulius 0:16b83f767a7e 58 PA_12 = 0x0C,
Antulius 0:16b83f767a7e 59 PA_13 = NC,
Antulius 0:16b83f767a7e 60 PA_14 = NC,
Antulius 0:16b83f767a7e 61 PA_15 = 0x0F,
Antulius 0:16b83f767a7e 62
Antulius 0:16b83f767a7e 63 PB_0 = 0x10,
Antulius 0:16b83f767a7e 64 PB_1 = 0x11,
Antulius 0:16b83f767a7e 65 PB_2 = NC,
Antulius 0:16b83f767a7e 66 PB_3 = 0x13,
Antulius 0:16b83f767a7e 67 PB_4 = 0x14,
Antulius 0:16b83f767a7e 68 PB_5 = 0x15,
Antulius 0:16b83f767a7e 69 PB_6 = 0x16,
Antulius 0:16b83f767a7e 70 PB_7 = 0x17,
Antulius 0:16b83f767a7e 71 PB_8 = 0x18,
Antulius 0:16b83f767a7e 72 PB_9 = 0x19,
Antulius 0:16b83f767a7e 73 PB_10 = 0x1A,
Antulius 0:16b83f767a7e 74 PB_11 = 0x1B,
Antulius 0:16b83f767a7e 75 PB_12 = 0x1C,
Antulius 0:16b83f767a7e 76 PB_13 = 0x1D,
Antulius 0:16b83f767a7e 77 PB_14 = 0x1E,
Antulius 0:16b83f767a7e 78 PB_15 = 0x1F,
Antulius 0:16b83f767a7e 79
Antulius 0:16b83f767a7e 80 PC_0 = NC,
Antulius 0:16b83f767a7e 81 PC_1 = NC,
Antulius 0:16b83f767a7e 82 PC_2 = NC,
Antulius 0:16b83f767a7e 83 PC_3 = NC,
Antulius 0:16b83f767a7e 84 PC_4 = NC,
Antulius 0:16b83f767a7e 85 PC_5 = NC,
Antulius 0:16b83f767a7e 86 PC_6 = NC,
Antulius 0:16b83f767a7e 87 PC_7 = NC,
Antulius 0:16b83f767a7e 88 PC_8 = NC,
Antulius 0:16b83f767a7e 89 PC_9 = NC,
Antulius 0:16b83f767a7e 90 PC_10 = NC,
Antulius 0:16b83f767a7e 91 PC_11 = NC,
Antulius 0:16b83f767a7e 92 PC_12 = NC,
Antulius 0:16b83f767a7e 93 PC_13 = 0x2D,
Antulius 0:16b83f767a7e 94 PC_14 = 0x2E,
Antulius 0:16b83f767a7e 95 PC_15 = 0x2F,
Antulius 0:16b83f767a7e 96
Antulius 0:16b83f767a7e 97 PD_2 = NC,
Antulius 0:16b83f767a7e 98
Antulius 0:16b83f767a7e 99 // ADC internal channels
Antulius 0:16b83f767a7e 100 ADC_TEMP = 0xF0,
Antulius 0:16b83f767a7e 101 ADC_VREF = 0xF1,
Antulius 0:16b83f767a7e 102
Antulius 0:16b83f767a7e 103 // Arduino connector namings
Antulius 0:16b83f767a7e 104 A0 = PA_0,
Antulius 0:16b83f767a7e 105 A1 = PA_1,
Antulius 0:16b83f767a7e 106 A2 = PA_4,
Antulius 0:16b83f767a7e 107 A3 = PB_0,
Antulius 0:16b83f767a7e 108 A4 = NC,
Antulius 0:16b83f767a7e 109 A5 = NC,
Antulius 0:16b83f767a7e 110 D0 = PA_3,
Antulius 0:16b83f767a7e 111 D1 = PA_2,
Antulius 0:16b83f767a7e 112 D2 = PA_10,
Antulius 0:16b83f767a7e 113 D3 = PB_3,
Antulius 0:16b83f767a7e 114 D4 = PB_5,
Antulius 0:16b83f767a7e 115 D5 = PB_4,
Antulius 0:16b83f767a7e 116 D6 = PB_10,
Antulius 0:16b83f767a7e 117 D7 = PA_8,
Antulius 0:16b83f767a7e 118 D8 = PA_9,
Antulius 0:16b83f767a7e 119 D9 = NC,
Antulius 0:16b83f767a7e 120 D10 = PB_6,
Antulius 0:16b83f767a7e 121 D11 = PA_7,
Antulius 0:16b83f767a7e 122 D12 = PA_6,
Antulius 0:16b83f767a7e 123 D13 = PA_5,
Antulius 0:16b83f767a7e 124 D14 = PB_9,
Antulius 0:16b83f767a7e 125 D15 = PB_8,
Antulius 0:16b83f767a7e 126
Antulius 0:16b83f767a7e 127 // Generic signals namings
Antulius 0:16b83f767a7e 128 Red_Led = NC,
Antulius 0:16b83f767a7e 129 Green_Led = PC_13,
Antulius 0:16b83f767a7e 130 Blue_Led = NC,
Antulius 0:16b83f767a7e 131 LED1 = PC_13,
Antulius 0:16b83f767a7e 132 LED2 = NC,
Antulius 0:16b83f767a7e 133 LED3 = NC,
Antulius 0:16b83f767a7e 134 LED4 = NC,
Antulius 0:16b83f767a7e 135 USER_BUTTON = NC,
Antulius 0:16b83f767a7e 136 SERIAL_TX = PA_2,
Antulius 0:16b83f767a7e 137 SERIAL_RX = PA_3,
Antulius 0:16b83f767a7e 138 USBTX = PA_2,
Antulius 0:16b83f767a7e 139 USBRX = PB_3,
Antulius 0:16b83f767a7e 140 CANRX = PB_8,
Antulius 0:16b83f767a7e 141 CANTX = PB_9,
Antulius 0:16b83f767a7e 142 I2C_SCL = PB_8,
Antulius 0:16b83f767a7e 143 I2C_SDA = PB_9,
Antulius 0:16b83f767a7e 144 SPI_MOSI = PA_7,
Antulius 0:16b83f767a7e 145 SPI_MISO = PA_6,
Antulius 0:16b83f767a7e 146 SPI_SCK = PA_5,
Antulius 0:16b83f767a7e 147 SPI_CS = PB_6,
Antulius 0:16b83f767a7e 148 PWM_OUT = PB_3
Antulius 0:16b83f767a7e 149 } PinName;
Antulius 0:16b83f767a7e 150
Antulius 0:16b83f767a7e 151 #ifdef __cplusplus
Antulius 0:16b83f767a7e 152 }
Antulius 0:16b83f767a7e 153 #endif
Antulius 0:16b83f767a7e 154
Antulius 0:16b83f767a7e 155 #endif