The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F030R8/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/PinNames.h@127:25aea2a3f4e3, 2016-09-30 (annotated)
- Committer:
- <>
- Date:
- Fri Sep 30 16:49:46 2016 +0100
- Revision:
- 127:25aea2a3f4e3
- Parent:
- 124:2241e3a39974
- Child:
- 135:176b8275d35d
Release 127 of the mbed library
Ports for Upcoming Targets
2669: Added u-blox C029 target https://github.com/ARMmbed/mbed-os/pull/2669
2707: [EFM32] Add IAR support for remaining Silicon Labs targets https://github.com/ARMmbed/mbed-os/pull/2707
2819: MultiTech xDot platform support - 09.26.2016 https://github.com/ARMmbed/mbed-os/pull/2819
2827: include MultiTech xDot in mbed 5 releases https://github.com/ARMmbed/mbed-os/pull/2827
Fixes and Changes
2522: Add CThunk for CM7 https://github.com/ARMmbed/mbed-os/pull/2522
2518: Enable uvisor on Beetle https://github.com/ARMmbed/mbed-os/pull/2518
2571: STM32F7 - Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2571
2616: STM32F3xx - Add Serial Flow Control pins + enable it https://github.com/ARMmbed/mbed-os/pull/2616
2619: NUCLEO_L152RE - Add Serial Flow Control https://github.com/ARMmbed/mbed-os/pull/2619
2620: NUCLEO_F429ZI - Add SERIAL_FC macro https://github.com/ARMmbed/mbed-os/pull/2620
2666: [EFM32] Microsecond ticker optimization https://github.com/ARMmbed/mbed-os/pull/2666
2681: STM32F0xx - Add support of ADC internal channels https://github.com/ARMmbed/mbed-os/pull/2681
2687: [NRF5] Add fs_data symbol in data secton for gcc https://github.com/ARMmbed/mbed-os/pull/2687
2696: Add device_has to all nrf51 devices https://github.com/ARMmbed/mbed-os/pull/2696
2703: TARGET_NRF5: Changed 'serial_baud' implementation to support special baud rates. https://github.com/ARMmbed/mbed-os/pull/2703
2704: DISCO_L476VG: add SPI nicknames https://github.com/ARMmbed/mbed-os/pull/2704
2723: KSDK serial_api.c: Fix assertion error for ParityEven https://github.com/ARMmbed/mbed-os/pull/2723
2463: [STM32L0] Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2463
2572: Fix STM32F407VG target name and LPC11U6X linker errors https://github.com/ARMmbed/mbed-os/pull/2572
2698: DELTA_DFBM_NQ620 target https://github.com/ARMmbed/mbed-os/pull/2698
2542: Dev spi asynch stm32f4 https://github.com/ARMmbed/mbed-os/pull/2542
2650: STM32F3 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2650
2415: [STM32F0] Add asynchronous serial https://github.com/ARMmbed/mbed-os/pull/2415
2585: Added support for ADC only pins in LPC43xx https://github.com/ARMmbed/mbed-os/pull/2585
2622: [STM32F4] Add asynchronous I2C https://github.com/ARMmbed/mbed-os/pull/2622
2719: Updated ARM linker scripts for Kinetis platforms that use SDK 2.0 https://github.com/ARMmbed/mbed-os/pull/2719
2728: Added ethernet and enabled IPV4 feature for the EVK-ODIN-W2/C029 target https://github.com/ARMmbed/mbed-os/pull/2728
2747: [LPC11U68] Fix pin interrupt select offset https://github.com/ARMmbed/mbed-os/pull/2747
2751: STM32L0xx - Add Serial Flow Control https://github.com/ARMmbed/mbed-os/pull/2751
2753: [NUCLEO_F767ZI] Add CAN capability https://github.com/ARMmbed/mbed-os/pull/2753
2759: STM32F0 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2759
2763: STM32L1 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2763
2764: STM32L4 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2764
2771: STM32L4 - Update deepsleep implementation https://github.com/ARMmbed/mbed-os/pull/2771
2775: Update KSDK SDHC driver for K64F & K66F https://github.com/ARMmbed/mbed-os/pull/2775
2792: [NUCLEO_F303ZE] MBED-OS5 capability https://github.com/ARMmbed/mbed-os/pull/2792
2762: STM32L0 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2762
2761: STM32F7 - Add low power timer https://github.com/ARMmbed/mbed-os/pull/2761
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 94:9ad691361fac | 1 | /* mbed Microcontroller Library |
Kojto | 94:9ad691361fac | 2 | ******************************************************************************* |
Kojto | 94:9ad691361fac | 3 | * Copyright (c) 2014, STMicroelectronics |
Kojto | 94:9ad691361fac | 4 | * All rights reserved. |
Kojto | 94:9ad691361fac | 5 | * |
Kojto | 94:9ad691361fac | 6 | * Redistribution and use in source and binary forms, with or without |
Kojto | 94:9ad691361fac | 7 | * modification, are permitted provided that the following conditions are met: |
Kojto | 94:9ad691361fac | 8 | * |
Kojto | 94:9ad691361fac | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 94:9ad691361fac | 10 | * this list of conditions and the following disclaimer. |
Kojto | 94:9ad691361fac | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 94:9ad691361fac | 12 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 94:9ad691361fac | 13 | * and/or other materials provided with the distribution. |
Kojto | 94:9ad691361fac | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 94:9ad691361fac | 15 | * may be used to endorse or promote products derived from this software |
Kojto | 94:9ad691361fac | 16 | * without specific prior written permission. |
Kojto | 94:9ad691361fac | 17 | * |
Kojto | 94:9ad691361fac | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 94:9ad691361fac | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 94:9ad691361fac | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 94:9ad691361fac | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 94:9ad691361fac | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 94:9ad691361fac | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 94:9ad691361fac | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 94:9ad691361fac | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 94:9ad691361fac | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 94:9ad691361fac | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 94:9ad691361fac | 28 | ******************************************************************************* |
Kojto | 94:9ad691361fac | 29 | */ |
Kojto | 94:9ad691361fac | 30 | #ifndef MBED_PINNAMES_H |
Kojto | 94:9ad691361fac | 31 | #define MBED_PINNAMES_H |
Kojto | 94:9ad691361fac | 32 | |
Kojto | 94:9ad691361fac | 33 | #include "cmsis.h" |
Kojto | 94:9ad691361fac | 34 | |
Kojto | 94:9ad691361fac | 35 | #ifdef __cplusplus |
Kojto | 94:9ad691361fac | 36 | extern "C" { |
Kojto | 94:9ad691361fac | 37 | #endif |
Kojto | 94:9ad691361fac | 38 | |
Kojto | 124:2241e3a39974 | 39 | #define STM_PIN_DATA(MODE, PUPD, AFNUM) ((int)(((MODE & 0x0F) << 0) |\ |
Kojto | 124:2241e3a39974 | 40 | ((PUPD & 0x07) << 4) |\ |
Kojto | 124:2241e3a39974 | 41 | ((AFNUM & 0x0F) << 7))) |
Kojto | 124:2241e3a39974 | 42 | |
Kojto | 124:2241e3a39974 | 43 | #define STM_PIN_DATA_EXT(MODE, PUPD, AFNUM, CHANNEL, INVERTED) ((int)(((MODE & 0x0F) << 0) |\ |
Kojto | 124:2241e3a39974 | 44 | ((PUPD & 0x07) << 4) |\ |
Kojto | 124:2241e3a39974 | 45 | ((AFNUM & 0x0F) << 7) |\ |
<> | 127:25aea2a3f4e3 | 46 | ((CHANNEL & 0x1F) << 11) |\ |
<> | 127:25aea2a3f4e3 | 47 | ((INVERTED & 0x01) << 16))) |
Kojto | 124:2241e3a39974 | 48 | |
Kojto | 94:9ad691361fac | 49 | #define STM_PIN_MODE(X) (((X) >> 0) & 0x0F) |
Kojto | 94:9ad691361fac | 50 | #define STM_PIN_PUPD(X) (((X) >> 4) & 0x07) |
Kojto | 94:9ad691361fac | 51 | #define STM_PIN_AFNUM(X) (((X) >> 7) & 0x0F) |
<> | 127:25aea2a3f4e3 | 52 | #define STM_PIN_CHANNEL(X) (((X) >> 11) & 0x1F) |
<> | 127:25aea2a3f4e3 | 53 | #define STM_PIN_INVERTED(X) (((X) >> 16) & 0x01) |
Kojto | 124:2241e3a39974 | 54 | |
Kojto | 94:9ad691361fac | 55 | #define STM_MODE_INPUT (0) |
Kojto | 94:9ad691361fac | 56 | #define STM_MODE_OUTPUT_PP (1) |
Kojto | 94:9ad691361fac | 57 | #define STM_MODE_OUTPUT_OD (2) |
Kojto | 94:9ad691361fac | 58 | #define STM_MODE_AF_PP (3) |
Kojto | 94:9ad691361fac | 59 | #define STM_MODE_AF_OD (4) |
Kojto | 94:9ad691361fac | 60 | #define STM_MODE_ANALOG (5) |
Kojto | 94:9ad691361fac | 61 | #define STM_MODE_IT_RISING (6) |
Kojto | 94:9ad691361fac | 62 | #define STM_MODE_IT_FALLING (7) |
Kojto | 94:9ad691361fac | 63 | #define STM_MODE_IT_RISING_FALLING (8) |
Kojto | 94:9ad691361fac | 64 | #define STM_MODE_EVT_RISING (9) |
Kojto | 94:9ad691361fac | 65 | #define STM_MODE_EVT_FALLING (10) |
Kojto | 94:9ad691361fac | 66 | #define STM_MODE_EVT_RISING_FALLING (11) |
Kojto | 94:9ad691361fac | 67 | #define STM_MODE_IT_EVT_RESET (12) |
Kojto | 94:9ad691361fac | 68 | |
Kojto | 94:9ad691361fac | 69 | // High nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, 7=H) |
Kojto | 94:9ad691361fac | 70 | // Low nibble = pin number |
Kojto | 94:9ad691361fac | 71 | #define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF) |
Kojto | 94:9ad691361fac | 72 | #define STM_PIN(X) ((uint32_t)(X) & 0xF) |
Kojto | 94:9ad691361fac | 73 | |
Kojto | 94:9ad691361fac | 74 | typedef enum { |
Kojto | 94:9ad691361fac | 75 | PIN_INPUT, |
Kojto | 94:9ad691361fac | 76 | PIN_OUTPUT |
Kojto | 94:9ad691361fac | 77 | } PinDirection; |
Kojto | 94:9ad691361fac | 78 | |
Kojto | 94:9ad691361fac | 79 | typedef enum { |
Kojto | 94:9ad691361fac | 80 | PA_0 = 0x00, |
Kojto | 94:9ad691361fac | 81 | PA_1 = 0x01, |
Kojto | 94:9ad691361fac | 82 | PA_2 = 0x02, |
Kojto | 94:9ad691361fac | 83 | PA_3 = 0x03, |
Kojto | 94:9ad691361fac | 84 | PA_4 = 0x04, |
Kojto | 94:9ad691361fac | 85 | PA_5 = 0x05, |
Kojto | 94:9ad691361fac | 86 | PA_6 = 0x06, |
Kojto | 94:9ad691361fac | 87 | PA_7 = 0x07, |
Kojto | 94:9ad691361fac | 88 | PA_8 = 0x08, |
Kojto | 94:9ad691361fac | 89 | PA_9 = 0x09, |
Kojto | 94:9ad691361fac | 90 | PA_10 = 0x0A, |
Kojto | 94:9ad691361fac | 91 | PA_11 = 0x0B, |
Kojto | 94:9ad691361fac | 92 | PA_12 = 0x0C, |
Kojto | 94:9ad691361fac | 93 | PA_13 = 0x0D, |
Kojto | 94:9ad691361fac | 94 | PA_14 = 0x0E, |
Kojto | 94:9ad691361fac | 95 | PA_15 = 0x0F, |
Kojto | 94:9ad691361fac | 96 | |
Kojto | 94:9ad691361fac | 97 | PB_0 = 0x10, |
Kojto | 94:9ad691361fac | 98 | PB_1 = 0x11, |
Kojto | 94:9ad691361fac | 99 | PB_2 = 0x12, |
Kojto | 94:9ad691361fac | 100 | PB_3 = 0x13, |
Kojto | 94:9ad691361fac | 101 | PB_4 = 0x14, |
Kojto | 94:9ad691361fac | 102 | PB_5 = 0x15, |
Kojto | 94:9ad691361fac | 103 | PB_6 = 0x16, |
Kojto | 94:9ad691361fac | 104 | PB_7 = 0x17, |
Kojto | 94:9ad691361fac | 105 | PB_8 = 0x18, |
Kojto | 94:9ad691361fac | 106 | PB_9 = 0x19, |
Kojto | 94:9ad691361fac | 107 | PB_10 = 0x1A, |
Kojto | 94:9ad691361fac | 108 | PB_11 = 0x1B, |
Kojto | 94:9ad691361fac | 109 | PB_12 = 0x1C, |
Kojto | 94:9ad691361fac | 110 | PB_13 = 0x1D, |
Kojto | 94:9ad691361fac | 111 | PB_14 = 0x1E, |
Kojto | 94:9ad691361fac | 112 | PB_15 = 0x1F, |
Kojto | 94:9ad691361fac | 113 | |
Kojto | 94:9ad691361fac | 114 | PC_0 = 0x20, |
Kojto | 94:9ad691361fac | 115 | PC_1 = 0x21, |
Kojto | 94:9ad691361fac | 116 | PC_2 = 0x22, |
Kojto | 94:9ad691361fac | 117 | PC_3 = 0x23, |
Kojto | 94:9ad691361fac | 118 | PC_4 = 0x24, |
Kojto | 94:9ad691361fac | 119 | PC_5 = 0x25, |
Kojto | 94:9ad691361fac | 120 | PC_6 = 0x26, |
Kojto | 94:9ad691361fac | 121 | PC_7 = 0x27, |
Kojto | 94:9ad691361fac | 122 | PC_8 = 0x28, |
Kojto | 94:9ad691361fac | 123 | PC_9 = 0x29, |
Kojto | 94:9ad691361fac | 124 | PC_10 = 0x2A, |
Kojto | 94:9ad691361fac | 125 | PC_11 = 0x2B, |
Kojto | 94:9ad691361fac | 126 | PC_12 = 0x2C, |
Kojto | 94:9ad691361fac | 127 | PC_13 = 0x2D, |
Kojto | 94:9ad691361fac | 128 | PC_14 = 0x2E, |
Kojto | 94:9ad691361fac | 129 | PC_15 = 0x2F, |
Kojto | 94:9ad691361fac | 130 | |
Kojto | 94:9ad691361fac | 131 | PD_2 = 0x32, |
Kojto | 94:9ad691361fac | 132 | |
Kojto | 94:9ad691361fac | 133 | PF_0 = 0x50, |
Kojto | 94:9ad691361fac | 134 | PF_1 = 0x51, |
Kojto | 94:9ad691361fac | 135 | PF_4 = 0x54, |
Kojto | 94:9ad691361fac | 136 | PF_5 = 0x55, |
Kojto | 94:9ad691361fac | 137 | PF_6 = 0x56, |
Kojto | 94:9ad691361fac | 138 | PF_7 = 0x57, |
Kojto | 94:9ad691361fac | 139 | |
<> | 127:25aea2a3f4e3 | 140 | // ADC internal channels |
<> | 127:25aea2a3f4e3 | 141 | ADC_TEMP = 0xF0, |
<> | 127:25aea2a3f4e3 | 142 | ADC_VREF = 0xF1, |
<> | 127:25aea2a3f4e3 | 143 | ADC_VBAT = 0xF2, |
Kojto | 94:9ad691361fac | 144 | |
Kojto | 94:9ad691361fac | 145 | // Arduino connector namings |
Kojto | 94:9ad691361fac | 146 | A0 = PA_0, |
Kojto | 94:9ad691361fac | 147 | A1 = PA_1, |
Kojto | 94:9ad691361fac | 148 | A2 = PA_4, |
Kojto | 94:9ad691361fac | 149 | A3 = PB_0, |
Kojto | 94:9ad691361fac | 150 | A4 = PC_1, |
Kojto | 94:9ad691361fac | 151 | A5 = PC_0, |
Kojto | 94:9ad691361fac | 152 | D0 = PA_3, |
Kojto | 94:9ad691361fac | 153 | D1 = PA_2, |
Kojto | 94:9ad691361fac | 154 | D2 = PA_10, |
Kojto | 94:9ad691361fac | 155 | D3 = PB_3, |
Kojto | 94:9ad691361fac | 156 | D4 = PB_5, |
Kojto | 94:9ad691361fac | 157 | D5 = PB_4, |
Kojto | 94:9ad691361fac | 158 | D6 = PB_10, |
Kojto | 94:9ad691361fac | 159 | D7 = PA_8, |
Kojto | 94:9ad691361fac | 160 | D8 = PA_9, |
Kojto | 94:9ad691361fac | 161 | D9 = PC_7, |
Kojto | 94:9ad691361fac | 162 | D10 = PB_6, |
Kojto | 94:9ad691361fac | 163 | D11 = PA_7, |
Kojto | 94:9ad691361fac | 164 | D12 = PA_6, |
Kojto | 94:9ad691361fac | 165 | D13 = PA_5, |
Kojto | 94:9ad691361fac | 166 | D14 = PB_9, |
Kojto | 94:9ad691361fac | 167 | D15 = PB_8, |
Kojto | 94:9ad691361fac | 168 | |
Kojto | 94:9ad691361fac | 169 | // Generic signals namings |
Kojto | 94:9ad691361fac | 170 | LED1 = PA_5, |
Kojto | 94:9ad691361fac | 171 | LED2 = PA_5, |
Kojto | 94:9ad691361fac | 172 | LED3 = PA_5, |
Kojto | 94:9ad691361fac | 173 | LED4 = PA_5, |
Kojto | 94:9ad691361fac | 174 | USER_BUTTON = PC_13, |
Kojto | 94:9ad691361fac | 175 | SERIAL_TX = PA_2, |
Kojto | 94:9ad691361fac | 176 | SERIAL_RX = PA_3, |
Kojto | 94:9ad691361fac | 177 | USBTX = PA_2, |
Kojto | 94:9ad691361fac | 178 | USBRX = PA_3, |
Kojto | 94:9ad691361fac | 179 | I2C_SCL = PB_8, |
Kojto | 94:9ad691361fac | 180 | I2C_SDA = PB_9, |
Kojto | 94:9ad691361fac | 181 | SPI_MOSI = PA_7, |
Kojto | 94:9ad691361fac | 182 | SPI_MISO = PA_6, |
Kojto | 94:9ad691361fac | 183 | SPI_SCK = PA_5, |
Kojto | 94:9ad691361fac | 184 | SPI_CS = PB_6, |
Kojto | 94:9ad691361fac | 185 | PWM_OUT = PC_7, |
Kojto | 94:9ad691361fac | 186 | |
Kojto | 94:9ad691361fac | 187 | // Not connected |
Kojto | 94:9ad691361fac | 188 | NC = (int)0xFFFFFFFF |
Kojto | 94:9ad691361fac | 189 | } PinName; |
Kojto | 94:9ad691361fac | 190 | |
Kojto | 94:9ad691361fac | 191 | typedef enum { |
Kojto | 94:9ad691361fac | 192 | PullNone = 0, |
Kojto | 94:9ad691361fac | 193 | PullUp = 1, |
Kojto | 94:9ad691361fac | 194 | PullDown = 2, |
Kojto | 94:9ad691361fac | 195 | OpenDrain = 3, |
Kojto | 94:9ad691361fac | 196 | PullDefault = PullNone |
Kojto | 94:9ad691361fac | 197 | } PinMode; |
Kojto | 94:9ad691361fac | 198 | |
Kojto | 94:9ad691361fac | 199 | #ifdef __cplusplus |
Kojto | 94:9ad691361fac | 200 | } |
Kojto | 94:9ad691361fac | 201 | #endif |
Kojto | 94:9ad691361fac | 202 | |
Kojto | 94:9ad691361fac | 203 | #endif |