LIbreria de soporte para la STM32F103C8T6 "Blue Pill" by Antuliu's Team

Dependents:   STM32-103C8_Plantilla_USB

Committer:
Antulius
Date:
Thu Sep 05 19:28:09 2019 +0000
Revision:
13:6b69d45b4700
Parent:
9:0340d6204caf
STM32F103C8_Plantilla_USB

Who changed what in which revision?

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