mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
Anna Bridge
Date:
Wed May 10 12:06:41 2017 +0100
Revision:
164:289d4deac6e4
Parent:
154:37f96f9d4de2
Child:
189:f392fc9709a3
This updates the lib to the mbed lib v142

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 154:37f96f9d4de2 1 /* mbed Microcontroller Library
<> 154:37f96f9d4de2 2 * Copyright (c) 2006-2013 ARM Limited
<> 154:37f96f9d4de2 3 *
<> 154:37f96f9d4de2 4 * Licensed under the Apache License, Version 2.0 (the "License");
<> 154:37f96f9d4de2 5 * you may not use this file except in compliance with the License.
<> 154:37f96f9d4de2 6 * You may obtain a copy of the License at
<> 154:37f96f9d4de2 7 *
<> 154:37f96f9d4de2 8 * http://www.apache.org/licenses/LICENSE-2.0
<> 154:37f96f9d4de2 9 *
<> 154:37f96f9d4de2 10 * Unless required by applicable law or agreed to in writing, software
<> 154:37f96f9d4de2 11 * distributed under the License is distributed on an "AS IS" BASIS,
<> 154:37f96f9d4de2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 154:37f96f9d4de2 13 * See the License for the specific language governing permissions and
<> 154:37f96f9d4de2 14 * limitations under the License.
<> 154:37f96f9d4de2 15 */
<> 154:37f96f9d4de2 16 #ifndef MBED_PINNAMES_H
<> 154:37f96f9d4de2 17 #define MBED_PINNAMES_H
<> 154:37f96f9d4de2 18
<> 154:37f96f9d4de2 19 #include "cmsis.h"
<> 154:37f96f9d4de2 20
<> 154:37f96f9d4de2 21 #ifdef __cplusplus
<> 154:37f96f9d4de2 22 extern "C" {
<> 154:37f96f9d4de2 23 #endif
<> 154:37f96f9d4de2 24
<> 154:37f96f9d4de2 25 typedef enum {
<> 154:37f96f9d4de2 26 PIN_INPUT,
<> 154:37f96f9d4de2 27 PIN_OUTPUT
<> 154:37f96f9d4de2 28 } PinDirection;
<> 154:37f96f9d4de2 29
<> 154:37f96f9d4de2 30 #define GPIO_PORT_SHIFT 12
<> 154:37f96f9d4de2 31
<> 154:37f96f9d4de2 32 typedef enum {
<> 154:37f96f9d4de2 33 PTA0 = (0 << GPIO_PORT_SHIFT | 0),
<> 154:37f96f9d4de2 34 PTA1 = (0 << GPIO_PORT_SHIFT | 1),
<> 154:37f96f9d4de2 35 PTA2 = (0 << GPIO_PORT_SHIFT | 2),
<> 154:37f96f9d4de2 36 PTA16 = (0 << GPIO_PORT_SHIFT | 16),
<> 154:37f96f9d4de2 37 PTA17 = (0 << GPIO_PORT_SHIFT | 17),
<> 154:37f96f9d4de2 38 PTA18 = (0 << GPIO_PORT_SHIFT | 18),
<> 154:37f96f9d4de2 39 PTA19 = (0 << GPIO_PORT_SHIFT | 19),
<> 154:37f96f9d4de2 40 PTB0 = (1 << GPIO_PORT_SHIFT | 0),
<> 154:37f96f9d4de2 41 PTB1 = (1 << GPIO_PORT_SHIFT | 1),
<> 154:37f96f9d4de2 42 PTB2 = (1 << GPIO_PORT_SHIFT | 2),
<> 154:37f96f9d4de2 43 PTB3 = (1 << GPIO_PORT_SHIFT | 3),
<> 154:37f96f9d4de2 44 PTB16 = (1 << GPIO_PORT_SHIFT | 16),
<> 154:37f96f9d4de2 45 PTB17 = (1 << GPIO_PORT_SHIFT | 17),
<> 154:37f96f9d4de2 46 PTB18 = (1 << GPIO_PORT_SHIFT | 18),
<> 154:37f96f9d4de2 47 PTC1 = (2 << GPIO_PORT_SHIFT | 1),
<> 154:37f96f9d4de2 48 PTC2 = (2 << GPIO_PORT_SHIFT | 2),
<> 154:37f96f9d4de2 49 PTC3 = (2 << GPIO_PORT_SHIFT | 3),
<> 154:37f96f9d4de2 50 PTC4 = (2 << GPIO_PORT_SHIFT | 4),
<> 154:37f96f9d4de2 51 PTC5 = (2 << GPIO_PORT_SHIFT | 5),
<> 154:37f96f9d4de2 52 PTC6 = (2 << GPIO_PORT_SHIFT | 6),
<> 154:37f96f9d4de2 53 PTC7 = (2 << GPIO_PORT_SHIFT | 7),
<> 154:37f96f9d4de2 54 PTC16 = (2 << GPIO_PORT_SHIFT | 16),
<> 154:37f96f9d4de2 55 PTC17 = (2 << GPIO_PORT_SHIFT | 17),
<> 154:37f96f9d4de2 56 PTC18 = (2 << GPIO_PORT_SHIFT | 18),
<> 154:37f96f9d4de2 57 PTC19 = (2 << GPIO_PORT_SHIFT | 19),
<> 154:37f96f9d4de2 58
<> 154:37f96f9d4de2 59 LED_RED = PTC1,
<> 154:37f96f9d4de2 60 LED_GREEN = PTA19,
<> 154:37f96f9d4de2 61 LED_BLUE = PTA18,
<> 154:37f96f9d4de2 62
<> 154:37f96f9d4de2 63 // mbed original LED naming
<> 154:37f96f9d4de2 64 LED1 = LED_RED,
<> 154:37f96f9d4de2 65 LED2 = LED_GREEN,
<> 154:37f96f9d4de2 66 LED3 = LED_BLUE,
<> 154:37f96f9d4de2 67 LED4 = LED_RED,
<> 154:37f96f9d4de2 68
<> 154:37f96f9d4de2 69 //Push buttons
<> 154:37f96f9d4de2 70 SW3 = PTC4,
<> 154:37f96f9d4de2 71 SW4 = PTC5,
Anna Bridge 164:289d4deac6e4 72 // Standardized button names
Anna Bridge 164:289d4deac6e4 73 BUTTON1 = SW3,
Anna Bridge 164:289d4deac6e4 74 BUTTON2 = SW4,
<> 154:37f96f9d4de2 75
<> 154:37f96f9d4de2 76 // USB Pins
<> 154:37f96f9d4de2 77 USBTX = PTC7,
<> 154:37f96f9d4de2 78 USBRX = PTC6,
<> 154:37f96f9d4de2 79
<> 154:37f96f9d4de2 80 // Arduino Headers
<> 154:37f96f9d4de2 81 D0 = PTC6,
<> 154:37f96f9d4de2 82 D1 = PTC7,
<> 154:37f96f9d4de2 83 D2 = PTC19,
<> 154:37f96f9d4de2 84 D3 = PTC16,
<> 154:37f96f9d4de2 85 D4 = PTC4,
<> 154:37f96f9d4de2 86 D5 = PTC17,
<> 154:37f96f9d4de2 87 D6 = PTC18,
<> 154:37f96f9d4de2 88 D7 = PTA1,
<> 154:37f96f9d4de2 89 D8 = PTA0,
<> 154:37f96f9d4de2 90 D9 = PTC1,
<> 154:37f96f9d4de2 91 D10 = PTA19,
<> 154:37f96f9d4de2 92 D11 = PTA16,
<> 154:37f96f9d4de2 93 D12 = PTA17,
<> 154:37f96f9d4de2 94 D13 = PTA18,
<> 154:37f96f9d4de2 95 D14 = PTC3,
<> 154:37f96f9d4de2 96 D15 = PTC2,
<> 154:37f96f9d4de2 97
<> 154:37f96f9d4de2 98 I2C_SCL = D15,
<> 154:37f96f9d4de2 99 I2C_SDA = D14,
<> 154:37f96f9d4de2 100
<> 154:37f96f9d4de2 101 DAC0_OUT = PTB18,
<> 154:37f96f9d4de2 102
<> 154:37f96f9d4de2 103 A1 = DAC0_OUT,
<> 154:37f96f9d4de2 104 A2 = PTB2,
<> 154:37f96f9d4de2 105 A3 = PTB3,
<> 154:37f96f9d4de2 106 A4 = PTB1,
<> 154:37f96f9d4de2 107 A5 = PTB0,
<> 154:37f96f9d4de2 108
<> 154:37f96f9d4de2 109 // Not connected
<> 154:37f96f9d4de2 110 NC = (int)0xFFFFFFFF
<> 154:37f96f9d4de2 111 } PinName;
<> 154:37f96f9d4de2 112
<> 154:37f96f9d4de2 113
<> 154:37f96f9d4de2 114 typedef enum {
<> 154:37f96f9d4de2 115 PullNone = 0,
<> 154:37f96f9d4de2 116 PullDown = 1,
<> 154:37f96f9d4de2 117 PullUp = 2,
<> 154:37f96f9d4de2 118 PullDefault = PullUp
<> 154:37f96f9d4de2 119 } PinMode;
<> 154:37f96f9d4de2 120
<> 154:37f96f9d4de2 121 #ifdef __cplusplus
<> 154:37f96f9d4de2 122 }
<> 154:37f96f9d4de2 123 #endif
<> 154:37f96f9d4de2 124
<> 154:37f96f9d4de2 125 #endif