CHECK
Dependents: Bob_Curtain_Sample_0506
PinNames.h@8:2582ee8cc84c, 2017-05-27 (annotated)
- Committer:
- hudakz
- Date:
- Sat May 27 09:31:15 2017 +0000
- Revision:
- 8:2582ee8cc84c
- Parent:
- 1:0bf5385bbf21
- Child:
- 9:0340d6204caf
Updated.
Who changed what in which revision?
User | Revision | Line number | New 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 | 0:1d18653e7c94 | 29 | * |
hudakz | 8:2582ee8cc84c | 30 | * Modified by Zoltan Hudak 2017 |
hudakz | 0:1d18653e7c94 | 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 | 8:2582ee8cc84c | 43 | typedef enum { |
hudakz | 8:2582ee8cc84c | 44 | // Not connected |
hudakz | 8:2582ee8cc84c | 45 | NC = (int)0xFFFFFFFF, |
hudakz | 0:1d18653e7c94 | 46 | |
hudakz | 8:2582ee8cc84c | 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 | 8:2582ee8cc84c | 61 | PA_13 = NC, |
hudakz | 8:2582ee8cc84c | 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 | 8:2582ee8cc84c | 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 | 8:2582ee8cc84c | 82 | PC_0 = NC, |
hudakz | 8:2582ee8cc84c | 83 | PC_1 = NC, |
hudakz | 8:2582ee8cc84c | 84 | PC_2 = NC, |
hudakz | 8:2582ee8cc84c | 85 | PC_3 = NC, |
hudakz | 8:2582ee8cc84c | 86 | PC_4 = NC, |
hudakz | 8:2582ee8cc84c | 87 | PC_5 = NC, |
hudakz | 8:2582ee8cc84c | 88 | PC_6 = NC, |
hudakz | 8:2582ee8cc84c | 89 | PC_7 = NC, |
hudakz | 8:2582ee8cc84c | 90 | PC_8 = NC, |
hudakz | 8:2582ee8cc84c | 91 | PC_9 = NC, |
hudakz | 8:2582ee8cc84c | 92 | PC_10 = NC, |
hudakz | 8:2582ee8cc84c | 93 | PC_11 = NC, |
hudakz | 8:2582ee8cc84c | 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 | 8:2582ee8cc84c | 99 | PD_2 = NC, |
hudakz | 8:2582ee8cc84c | 100 | |
hudakz | 8:2582ee8cc84c | 101 | // ADC internal channels |
hudakz | 8:2582ee8cc84c | 102 | ADC_TEMP = 0xF0, |
hudakz | 8:2582ee8cc84c | 103 | ADC_VREF = 0xF1, |
hudakz | 0:1d18653e7c94 | 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 | 8:2582ee8cc84c | 110 | A4 = NC, |
hudakz | 8:2582ee8cc84c | 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 | 8:2582ee8cc84c | 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 |
hudakz | 0:1d18653e7c94 | 130 | LED1 = PC_13, |
hudakz | 8:2582ee8cc84c | 131 | LED2 = NC, |
hudakz | 8:2582ee8cc84c | 132 | LED3 = NC, |
hudakz | 8:2582ee8cc84c | 133 | LED4 = NC, |
hudakz | 8:2582ee8cc84c | 134 | USER_BUTTON = NC, |
hudakz | 0:1d18653e7c94 | 135 | SERIAL_TX = PA_2, |
hudakz | 0:1d18653e7c94 | 136 | SERIAL_RX = PA_3, |
hudakz | 0:1d18653e7c94 | 137 | USBTX = PA_2, |
hudakz | 0:1d18653e7c94 | 138 | USBRX = PA_3, |
hudakz | 0:1d18653e7c94 | 139 | I2C_SCL = PB_8, |
hudakz | 0:1d18653e7c94 | 140 | I2C_SDA = PB_9, |
hudakz | 0:1d18653e7c94 | 141 | SPI_MOSI = PA_7, |
hudakz | 0:1d18653e7c94 | 142 | SPI_MISO = PA_6, |
hudakz | 0:1d18653e7c94 | 143 | SPI_SCK = PA_5, |
hudakz | 0:1d18653e7c94 | 144 | SPI_CS = PB_6, |
hudakz | 8:2582ee8cc84c | 145 | PWM_OUT = PB_3 |
hudakz | 0:1d18653e7c94 | 146 | } PinName; |
hudakz | 0:1d18653e7c94 | 147 | |
hudakz | 0:1d18653e7c94 | 148 | #ifdef __cplusplus |
hudakz | 0:1d18653e7c94 | 149 | } |
hudakz | 0:1d18653e7c94 | 150 | #endif |
hudakz | 0:1d18653e7c94 | 151 | |
hudakz | 0:1d18653e7c94 | 152 | #endif |
hudakz | 8:2582ee8cc84c | 153 | |
hudakz | 8:2582ee8cc84c | 154 |