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:
162:e13f6fdb2ac4
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 PTA3 = (0 << GPIO_PORT_SHIFT | 3 ),
<> 154:37f96f9d4de2 37 PTA4 = (0 << GPIO_PORT_SHIFT | 4 ),
<> 154:37f96f9d4de2 38 PTA18 = (0 << GPIO_PORT_SHIFT | 18),
<> 154:37f96f9d4de2 39 PTA19 = (0 << GPIO_PORT_SHIFT | 19),
<> 154:37f96f9d4de2 40 PTB3 = (1 << GPIO_PORT_SHIFT | 3),
<> 154:37f96f9d4de2 41 PTB10 = (1 << GPIO_PORT_SHIFT | 10),
<> 154:37f96f9d4de2 42 PTB11 = (1 << GPIO_PORT_SHIFT | 11),
<> 154:37f96f9d4de2 43 PTB16 = (1 << GPIO_PORT_SHIFT | 16),
<> 154:37f96f9d4de2 44 PTB17 = (1 << GPIO_PORT_SHIFT | 17),
<> 154:37f96f9d4de2 45 PTB19 = (1 << GPIO_PORT_SHIFT | 19),
<> 154:37f96f9d4de2 46 PTC0 = (2 << GPIO_PORT_SHIFT | 0 ),
<> 154:37f96f9d4de2 47 PTC1 = (2 << GPIO_PORT_SHIFT | 1 ),
<> 154:37f96f9d4de2 48 PTC3 = (2 << GPIO_PORT_SHIFT | 3 ),
<> 154:37f96f9d4de2 49 PTC4 = (2 << GPIO_PORT_SHIFT | 4 ),
<> 154:37f96f9d4de2 50 PTC5 = (2 << GPIO_PORT_SHIFT | 5 ),
<> 154:37f96f9d4de2 51 PTC6 = (2 << GPIO_PORT_SHIFT | 6 ),
<> 154:37f96f9d4de2 52 PTC7 = (2 << GPIO_PORT_SHIFT | 7 ),
<> 154:37f96f9d4de2 53 PTD1 = (3 << GPIO_PORT_SHIFT | 1 ),
<> 154:37f96f9d4de2 54 PTD2 = (3 << GPIO_PORT_SHIFT | 2 ),
<> 154:37f96f9d4de2 55 PTD3 = (3 << GPIO_PORT_SHIFT | 3 ),
<> 154:37f96f9d4de2 56 PTD4 = (3 << GPIO_PORT_SHIFT | 4 ),
<> 154:37f96f9d4de2 57 PTD5 = (3 << GPIO_PORT_SHIFT | 5 ),
<> 154:37f96f9d4de2 58 PTD6 = (3 << GPIO_PORT_SHIFT | 6 ),
<> 154:37f96f9d4de2 59 PTD7 = (3 << GPIO_PORT_SHIFT | 7 ),
<> 154:37f96f9d4de2 60 PTE0 = (4 << GPIO_PORT_SHIFT | 0 ),
<> 154:37f96f9d4de2 61 PTE1 = (4 << GPIO_PORT_SHIFT | 1 ),
<> 154:37f96f9d4de2 62 PTE2 = (4 << GPIO_PORT_SHIFT | 2 ),
<> 154:37f96f9d4de2 63 PTE3 = (4 << GPIO_PORT_SHIFT | 3 ),
<> 154:37f96f9d4de2 64 PTE4 = (4 << GPIO_PORT_SHIFT | 4 ),
<> 154:37f96f9d4de2 65 PTE16 = (4 << GPIO_PORT_SHIFT | 16),
<> 154:37f96f9d4de2 66 PTE17 = (4 << GPIO_PORT_SHIFT | 17),
<> 154:37f96f9d4de2 67 PTE18 = (4 << GPIO_PORT_SHIFT | 18),
<> 154:37f96f9d4de2 68 PTE19 = (4 << GPIO_PORT_SHIFT | 19),
<> 154:37f96f9d4de2 69
<> 154:37f96f9d4de2 70 LED_RED = PTD4,
<> 154:37f96f9d4de2 71 LED_GREEN = PTD5,
<> 154:37f96f9d4de2 72 LED_BLUE = PTD6,
<> 154:37f96f9d4de2 73
<> 154:37f96f9d4de2 74 // mbed original LED naming
<> 154:37f96f9d4de2 75 LED1 = LED_RED,
<> 154:37f96f9d4de2 76 LED2 = LED_GREEN,
<> 154:37f96f9d4de2 77 LED3 = LED_BLUE,
<> 154:37f96f9d4de2 78 LED4 = PTD7,
<> 154:37f96f9d4de2 79
<> 154:37f96f9d4de2 80 //Push buttons
<> 154:37f96f9d4de2 81 SW1 = PTE4,
<> 154:37f96f9d4de2 82 SW2 = PTE3,
<> 154:37f96f9d4de2 83 SW3 = PTD1,
<> 154:37f96f9d4de2 84 SW4 = PTA19,
Anna Bridge 164:289d4deac6e4 85 // Standardized button names
Anna Bridge 164:289d4deac6e4 86 BUTTON1 = SW1,
Anna Bridge 164:289d4deac6e4 87 BUTTON2 = SW2,
Anna Bridge 164:289d4deac6e4 88 BUTTON3 = SW3,
Anna Bridge 164:289d4deac6e4 89 BUTTON4 = SW4,
<> 154:37f96f9d4de2 90
<> 154:37f96f9d4de2 91 // USB Pins
<> 154:37f96f9d4de2 92 USBTX = PTE0,
<> 154:37f96f9d4de2 93 USBRX = PTE1,
<> 154:37f96f9d4de2 94
<> 162:e13f6fdb2ac4 95 // Not connected
<> 162:e13f6fdb2ac4 96 NC = (int)0xFFFFFFFF,
<> 162:e13f6fdb2ac4 97
<> 154:37f96f9d4de2 98 // Arduino Headers
<> 154:37f96f9d4de2 99 D0 = PTD7,
<> 154:37f96f9d4de2 100 D1 = PTD6,
<> 154:37f96f9d4de2 101 D2 = PTD5,
<> 154:37f96f9d4de2 102 D3 = PTD4,
<> 162:e13f6fdb2ac4 103 D4 = NC,
<> 162:e13f6fdb2ac4 104 D5 = NC,
<> 154:37f96f9d4de2 105 D6 = PTE4,
<> 154:37f96f9d4de2 106 D7 = PTD1,
<> 154:37f96f9d4de2 107 D8 = PTA19,
<> 154:37f96f9d4de2 108 D9 = PTA18,
<> 154:37f96f9d4de2 109 D10 = PTC4,
<> 154:37f96f9d4de2 110 D11 = PTC6,
<> 154:37f96f9d4de2 111 D12 = PTC7,
<> 154:37f96f9d4de2 112 D13 = PTC5,
<> 154:37f96f9d4de2 113 D14 = PTD3,
<> 154:37f96f9d4de2 114 D15 = PTD2,
<> 154:37f96f9d4de2 115
<> 154:37f96f9d4de2 116 I2C_SCL = D15,
<> 154:37f96f9d4de2 117 I2C_SDA = D14,
<> 154:37f96f9d4de2 118
<> 162:e13f6fdb2ac4 119 A0 = NC,
<> 162:e13f6fdb2ac4 120 A1 = NC,
<> 162:e13f6fdb2ac4 121 A2 = NC,
<> 162:e13f6fdb2ac4 122 A3 = NC,
<> 162:e13f6fdb2ac4 123 A4 = NC,
<> 162:e13f6fdb2ac4 124 A5 = NC
<> 154:37f96f9d4de2 125 } PinName;
<> 154:37f96f9d4de2 126
<> 154:37f96f9d4de2 127
<> 154:37f96f9d4de2 128 typedef enum {
<> 154:37f96f9d4de2 129 PullNone = 0,
<> 154:37f96f9d4de2 130 PullDown = 1,
<> 154:37f96f9d4de2 131 PullUp = 2,
<> 154:37f96f9d4de2 132 PullDefault = PullUp
<> 154:37f96f9d4de2 133 } PinMode;
<> 154:37f96f9d4de2 134
<> 154:37f96f9d4de2 135 #ifdef __cplusplus
<> 154:37f96f9d4de2 136 }
<> 154:37f96f9d4de2 137 #endif
<> 154:37f96f9d4de2 138
<> 154:37f96f9d4de2 139 #endif