mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Tue Dec 09 14:15:07 2014 +0000
Revision:
429:cc5da43e7bf6
Synchronized with git revision 75673df767b901eda5c6ea6c737b58deb390c955

Full URL: https://github.com/mbedmicro/mbed/commit/75673df767b901eda5c6ea6c737b58deb390c955/

Add support for mDot with STM32F411RE processor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 429:cc5da43e7bf6 1 /* mbed Microcontroller Library
mbed_official 429:cc5da43e7bf6 2 *******************************************************************************
mbed_official 429:cc5da43e7bf6 3 * Copyright (c) 2014, STMicroelectronics
mbed_official 429:cc5da43e7bf6 4 * All rights reserved.
mbed_official 429:cc5da43e7bf6 5 *
mbed_official 429:cc5da43e7bf6 6 * Redistribution and use in source and binary forms, with or without
mbed_official 429:cc5da43e7bf6 7 * modification, are permitted provided that the following conditions are met:
mbed_official 429:cc5da43e7bf6 8 *
mbed_official 429:cc5da43e7bf6 9 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 429:cc5da43e7bf6 10 * this list of conditions and the following disclaimer.
mbed_official 429:cc5da43e7bf6 11 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 429:cc5da43e7bf6 12 * this list of conditions and the following disclaimer in the documentation
mbed_official 429:cc5da43e7bf6 13 * and/or other materials provided with the distribution.
mbed_official 429:cc5da43e7bf6 14 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 429:cc5da43e7bf6 15 * may be used to endorse or promote products derived from this software
mbed_official 429:cc5da43e7bf6 16 * without specific prior written permission.
mbed_official 429:cc5da43e7bf6 17 *
mbed_official 429:cc5da43e7bf6 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 429:cc5da43e7bf6 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 429:cc5da43e7bf6 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 429:cc5da43e7bf6 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 429:cc5da43e7bf6 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 429:cc5da43e7bf6 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 429:cc5da43e7bf6 24 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 429:cc5da43e7bf6 25 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 429:cc5da43e7bf6 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 429:cc5da43e7bf6 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 429:cc5da43e7bf6 28 *******************************************************************************
mbed_official 429:cc5da43e7bf6 29 */
mbed_official 429:cc5da43e7bf6 30 #ifndef MBED_PINNAMES_H
mbed_official 429:cc5da43e7bf6 31 #define MBED_PINNAMES_H
mbed_official 429:cc5da43e7bf6 32
mbed_official 429:cc5da43e7bf6 33 #include "cmsis.h"
mbed_official 429:cc5da43e7bf6 34
mbed_official 429:cc5da43e7bf6 35 #ifdef __cplusplus
mbed_official 429:cc5da43e7bf6 36 extern "C" {
mbed_official 429:cc5da43e7bf6 37 #endif
mbed_official 429:cc5da43e7bf6 38
mbed_official 429:cc5da43e7bf6 39 // See stm32f4xx_hal_gpio.h and stm32f4xx_hal_gpio_ex.h for values of MODE, PUPD and AFNUM
mbed_official 429:cc5da43e7bf6 40 #define STM_PIN_DATA(MODE, PUPD, AFNUM) ((int)(((AFNUM) << 7) | ((PUPD) << 4) | ((MODE) << 0)))
mbed_official 429:cc5da43e7bf6 41 #define STM_PIN_MODE(X) (((X) >> 0) & 0x0F)
mbed_official 429:cc5da43e7bf6 42 #define STM_PIN_PUPD(X) (((X) >> 4) & 0x07)
mbed_official 429:cc5da43e7bf6 43 #define STM_PIN_AFNUM(X) (((X) >> 7) & 0x0F)
mbed_official 429:cc5da43e7bf6 44 #define STM_MODE_INPUT (0)
mbed_official 429:cc5da43e7bf6 45 #define STM_MODE_OUTPUT_PP (1)
mbed_official 429:cc5da43e7bf6 46 #define STM_MODE_OUTPUT_OD (2)
mbed_official 429:cc5da43e7bf6 47 #define STM_MODE_AF_PP (3)
mbed_official 429:cc5da43e7bf6 48 #define STM_MODE_AF_OD (4)
mbed_official 429:cc5da43e7bf6 49 #define STM_MODE_ANALOG (5)
mbed_official 429:cc5da43e7bf6 50 #define STM_MODE_IT_RISING (6)
mbed_official 429:cc5da43e7bf6 51 #define STM_MODE_IT_FALLING (7)
mbed_official 429:cc5da43e7bf6 52 #define STM_MODE_IT_RISING_FALLING (8)
mbed_official 429:cc5da43e7bf6 53 #define STM_MODE_EVT_RISING (9)
mbed_official 429:cc5da43e7bf6 54 #define STM_MODE_EVT_FALLING (10)
mbed_official 429:cc5da43e7bf6 55 #define STM_MODE_EVT_RISING_FALLING (11)
mbed_official 429:cc5da43e7bf6 56 #define STM_MODE_IT_EVT_RESET (12)
mbed_official 429:cc5da43e7bf6 57
mbed_official 429:cc5da43e7bf6 58 // High nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, 7=H)
mbed_official 429:cc5da43e7bf6 59 // Low nibble = pin number
mbed_official 429:cc5da43e7bf6 60 #define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF)
mbed_official 429:cc5da43e7bf6 61 #define STM_PIN(X) ((uint32_t)(X) & 0xF)
mbed_official 429:cc5da43e7bf6 62
mbed_official 429:cc5da43e7bf6 63 typedef enum {
mbed_official 429:cc5da43e7bf6 64 PIN_INPUT,
mbed_official 429:cc5da43e7bf6 65 PIN_OUTPUT
mbed_official 429:cc5da43e7bf6 66 } PinDirection;
mbed_official 429:cc5da43e7bf6 67
mbed_official 429:cc5da43e7bf6 68 typedef enum {
mbed_official 429:cc5da43e7bf6 69 PA_0 = 0x00,
mbed_official 429:cc5da43e7bf6 70 PA_1 = 0x01,
mbed_official 429:cc5da43e7bf6 71 PA_2 = 0x02,
mbed_official 429:cc5da43e7bf6 72 PA_3 = 0x03,
mbed_official 429:cc5da43e7bf6 73 PA_4 = 0x04,
mbed_official 429:cc5da43e7bf6 74 PA_5 = 0x05,
mbed_official 429:cc5da43e7bf6 75 PA_6 = 0x06,
mbed_official 429:cc5da43e7bf6 76 PA_7 = 0x07,
mbed_official 429:cc5da43e7bf6 77 PA_8 = 0x08,
mbed_official 429:cc5da43e7bf6 78 PA_9 = 0x09,
mbed_official 429:cc5da43e7bf6 79 PA_10 = 0x0A,
mbed_official 429:cc5da43e7bf6 80 PA_11 = 0x0B,
mbed_official 429:cc5da43e7bf6 81 PA_12 = 0x0C,
mbed_official 429:cc5da43e7bf6 82 PA_13 = 0x0D,
mbed_official 429:cc5da43e7bf6 83 PA_14 = 0x0E,
mbed_official 429:cc5da43e7bf6 84 PA_15 = 0x0F,
mbed_official 429:cc5da43e7bf6 85
mbed_official 429:cc5da43e7bf6 86 PB_0 = 0x10,
mbed_official 429:cc5da43e7bf6 87 PB_1 = 0x11,
mbed_official 429:cc5da43e7bf6 88 PB_2 = 0x12,
mbed_official 429:cc5da43e7bf6 89 PB_3 = 0x13,
mbed_official 429:cc5da43e7bf6 90 PB_4 = 0x14,
mbed_official 429:cc5da43e7bf6 91 PB_5 = 0x15,
mbed_official 429:cc5da43e7bf6 92 PB_6 = 0x16,
mbed_official 429:cc5da43e7bf6 93 PB_7 = 0x17,
mbed_official 429:cc5da43e7bf6 94 PB_8 = 0x18,
mbed_official 429:cc5da43e7bf6 95 PB_9 = 0x19,
mbed_official 429:cc5da43e7bf6 96 PB_10 = 0x1A,
mbed_official 429:cc5da43e7bf6 97 PB_12 = 0x1C,
mbed_official 429:cc5da43e7bf6 98 PB_13 = 0x1D,
mbed_official 429:cc5da43e7bf6 99 PB_14 = 0x1E,
mbed_official 429:cc5da43e7bf6 100 PB_15 = 0x1F,
mbed_official 429:cc5da43e7bf6 101
mbed_official 429:cc5da43e7bf6 102 PC_0 = 0x20,
mbed_official 429:cc5da43e7bf6 103 PC_1 = 0x21,
mbed_official 429:cc5da43e7bf6 104 PC_2 = 0x22,
mbed_official 429:cc5da43e7bf6 105 PC_3 = 0x23,
mbed_official 429:cc5da43e7bf6 106 PC_4 = 0x24,
mbed_official 429:cc5da43e7bf6 107 PC_5 = 0x25,
mbed_official 429:cc5da43e7bf6 108 PC_6 = 0x26,
mbed_official 429:cc5da43e7bf6 109 PC_7 = 0x27,
mbed_official 429:cc5da43e7bf6 110 PC_8 = 0x28,
mbed_official 429:cc5da43e7bf6 111 PC_9 = 0x29,
mbed_official 429:cc5da43e7bf6 112 PC_10 = 0x2A,
mbed_official 429:cc5da43e7bf6 113 PC_11 = 0x2B,
mbed_official 429:cc5da43e7bf6 114 PC_12 = 0x2C,
mbed_official 429:cc5da43e7bf6 115 PC_13 = 0x2D,
mbed_official 429:cc5da43e7bf6 116 PC_14 = 0x2E,
mbed_official 429:cc5da43e7bf6 117 PC_15 = 0x2F,
mbed_official 429:cc5da43e7bf6 118
mbed_official 429:cc5da43e7bf6 119 PD_2 = 0x32,
mbed_official 429:cc5da43e7bf6 120
mbed_official 429:cc5da43e7bf6 121 PH_0 = 0x70,
mbed_official 429:cc5da43e7bf6 122 PH_1 = 0x71,
mbed_official 429:cc5da43e7bf6 123
mbed_official 429:cc5da43e7bf6 124 // Generic signals namings
mbed_official 429:cc5da43e7bf6 125 DOUT = PA_2,
mbed_official 429:cc5da43e7bf6 126 DIN = PA_3,
mbed_official 429:cc5da43e7bf6 127 AD0 = PB_1,
mbed_official 429:cc5da43e7bf6 128 AD1 = PB_0,
mbed_official 429:cc5da43e7bf6 129 AD2 = PA_5,
mbed_official 429:cc5da43e7bf6 130 AD3 = PA_4,
mbed_official 429:cc5da43e7bf6 131 AD4 = PA_7,
mbed_official 429:cc5da43e7bf6 132 AD5 = PC_1,
mbed_official 429:cc5da43e7bf6 133 AD6 = PA_1,
mbed_official 429:cc5da43e7bf6 134 DIO0 = PB_1,
mbed_official 429:cc5da43e7bf6 135 DIO1 = PB_0,
mbed_official 429:cc5da43e7bf6 136 DIO2 = PA_5,
mbed_official 429:cc5da43e7bf6 137 DIO3 = PA_4,
mbed_official 429:cc5da43e7bf6 138 DIO4 = PA_7,
mbed_official 429:cc5da43e7bf6 139 DIO5 = PC_1,
mbed_official 429:cc5da43e7bf6 140 DIO6 = PA_1,
mbed_official 429:cc5da43e7bf6 141 DO8 = PA_6,
mbed_official 429:cc5da43e7bf6 142 DI8 = PA_11,
mbed_official 429:cc5da43e7bf6 143 PWM0 = PA_8,
mbed_official 429:cc5da43e7bf6 144 PWM1 = PC_9,
mbed_official 429:cc5da43e7bf6 145 NCTS = PA_0,
mbed_official 429:cc5da43e7bf6 146 RTS = PA_1,
mbed_official 429:cc5da43e7bf6 147 NDTR = PA_11,
mbed_official 429:cc5da43e7bf6 148 RSSI = PA_8,
mbed_official 429:cc5da43e7bf6 149 SLEEPRQ = PA_11,
mbed_official 429:cc5da43e7bf6 150 ON_SLEEP = PA_12,
mbed_official 429:cc5da43e7bf6 151 ASSOCIATE = PC_1,
mbed_official 429:cc5da43e7bf6 152
mbed_official 429:cc5da43e7bf6 153 LED1 = PA_2,
mbed_official 429:cc5da43e7bf6 154 LED2 = PA_2,
mbed_official 429:cc5da43e7bf6 155 LED3 = PA_2,
mbed_official 429:cc5da43e7bf6 156 LED4 = PA_2,
mbed_official 429:cc5da43e7bf6 157 SERIAL_TX = PA_9,
mbed_official 429:cc5da43e7bf6 158 SERIAL_RX = PA_10,
mbed_official 429:cc5da43e7bf6 159 USBTX = PA_2,
mbed_official 429:cc5da43e7bf6 160 USBRX = PA_3,
mbed_official 429:cc5da43e7bf6 161 I2C_SCL = PA_8,
mbed_official 429:cc5da43e7bf6 162 I2C_SDA = PC_9,
mbed_official 429:cc5da43e7bf6 163 SPI_MOSI = PA_7,
mbed_official 429:cc5da43e7bf6 164 SPI_MISO = PA_6,
mbed_official 429:cc5da43e7bf6 165 SPI_SCK = PA_5,
mbed_official 429:cc5da43e7bf6 166 SPI_CS = PA_4,
mbed_official 429:cc5da43e7bf6 167
mbed_official 429:cc5da43e7bf6 168 // Not connected
mbed_official 429:cc5da43e7bf6 169 NC = (int)0xFFFFFFFF
mbed_official 429:cc5da43e7bf6 170 } PinName;
mbed_official 429:cc5da43e7bf6 171
mbed_official 429:cc5da43e7bf6 172 typedef enum {
mbed_official 429:cc5da43e7bf6 173 PullNone = 0,
mbed_official 429:cc5da43e7bf6 174 PullUp = 1,
mbed_official 429:cc5da43e7bf6 175 PullDown = 2,
mbed_official 429:cc5da43e7bf6 176 OpenDrain = 3,
mbed_official 429:cc5da43e7bf6 177 PullDefault = PullNone
mbed_official 429:cc5da43e7bf6 178 } PinMode;
mbed_official 429:cc5da43e7bf6 179
mbed_official 429:cc5da43e7bf6 180 #ifdef __cplusplus
mbed_official 429:cc5da43e7bf6 181 }
mbed_official 429:cc5da43e7bf6 182 #endif
mbed_official 429:cc5da43e7bf6 183
mbed_official 429:cc5da43e7bf6 184 #endif