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_LPC812/TOOLCHAIN_IAR/PinNames.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Child:
- 172:65be27845400
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 171:3a7713b1edbc | 1 | /* mbed Microcontroller Library |
AnnaBridge | 171:3a7713b1edbc | 2 | * Copyright (c) 2006-2013 ARM Limited |
AnnaBridge | 171:3a7713b1edbc | 3 | * |
AnnaBridge | 171:3a7713b1edbc | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 171:3a7713b1edbc | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 171:3a7713b1edbc | 6 | * You may obtain a copy of the License at |
AnnaBridge | 171:3a7713b1edbc | 7 | * |
AnnaBridge | 171:3a7713b1edbc | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 171:3a7713b1edbc | 9 | * |
AnnaBridge | 171:3a7713b1edbc | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 171:3a7713b1edbc | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 171:3a7713b1edbc | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 171:3a7713b1edbc | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 171:3a7713b1edbc | 14 | * limitations under the License. |
AnnaBridge | 171:3a7713b1edbc | 15 | */ |
AnnaBridge | 171:3a7713b1edbc | 16 | #ifndef MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 17 | #define MBED_PINNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 18 | |
AnnaBridge | 171:3a7713b1edbc | 19 | #include "cmsis.h" |
AnnaBridge | 171:3a7713b1edbc | 20 | |
AnnaBridge | 171:3a7713b1edbc | 21 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 22 | extern "C" { |
AnnaBridge | 171:3a7713b1edbc | 23 | #endif |
AnnaBridge | 171:3a7713b1edbc | 24 | |
AnnaBridge | 171:3a7713b1edbc | 25 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 26 | PIN_INPUT, |
AnnaBridge | 171:3a7713b1edbc | 27 | PIN_OUTPUT |
AnnaBridge | 171:3a7713b1edbc | 28 | } PinDirection; |
AnnaBridge | 171:3a7713b1edbc | 29 | |
AnnaBridge | 171:3a7713b1edbc | 30 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 31 | P0_0 = 0, |
AnnaBridge | 171:3a7713b1edbc | 32 | P0_1 = 1, |
AnnaBridge | 171:3a7713b1edbc | 33 | P0_2 = 2, |
AnnaBridge | 171:3a7713b1edbc | 34 | P0_3 = 3, |
AnnaBridge | 171:3a7713b1edbc | 35 | P0_4 = 4, |
AnnaBridge | 171:3a7713b1edbc | 36 | P0_5 = 5, |
AnnaBridge | 171:3a7713b1edbc | 37 | P0_6 = 6, |
AnnaBridge | 171:3a7713b1edbc | 38 | P0_7 = 7, |
AnnaBridge | 171:3a7713b1edbc | 39 | P0_8 = 8, |
AnnaBridge | 171:3a7713b1edbc | 40 | P0_9 = 9, |
AnnaBridge | 171:3a7713b1edbc | 41 | P0_10 = 10, |
AnnaBridge | 171:3a7713b1edbc | 42 | P0_11 = 11, |
AnnaBridge | 171:3a7713b1edbc | 43 | P0_12 = 12, |
AnnaBridge | 171:3a7713b1edbc | 44 | P0_13 = 13, |
AnnaBridge | 171:3a7713b1edbc | 45 | P0_14 = 14, |
AnnaBridge | 171:3a7713b1edbc | 46 | P0_15 = 15, |
AnnaBridge | 171:3a7713b1edbc | 47 | P0_16 = 16, |
AnnaBridge | 171:3a7713b1edbc | 48 | P0_17 = 17, |
AnnaBridge | 171:3a7713b1edbc | 49 | |
AnnaBridge | 171:3a7713b1edbc | 50 | D0 = P0_0, |
AnnaBridge | 171:3a7713b1edbc | 51 | D1 = P0_4, |
AnnaBridge | 171:3a7713b1edbc | 52 | D2 = P0_6, |
AnnaBridge | 171:3a7713b1edbc | 53 | D3 = P0_8, |
AnnaBridge | 171:3a7713b1edbc | 54 | D4 = P0_9, |
AnnaBridge | 171:3a7713b1edbc | 55 | |
AnnaBridge | 171:3a7713b1edbc | 56 | D7 = P0_7, |
AnnaBridge | 171:3a7713b1edbc | 57 | D8 = P0_17, |
AnnaBridge | 171:3a7713b1edbc | 58 | D9 = P0_16, |
AnnaBridge | 171:3a7713b1edbc | 59 | D10 = P0_13, |
AnnaBridge | 171:3a7713b1edbc | 60 | D11 = P0_14, |
AnnaBridge | 171:3a7713b1edbc | 61 | D12 = P0_15, |
AnnaBridge | 171:3a7713b1edbc | 62 | D13 = P0_12, |
AnnaBridge | 171:3a7713b1edbc | 63 | D14 = P0_10, |
AnnaBridge | 171:3a7713b1edbc | 64 | D15 = P0_11, |
AnnaBridge | 171:3a7713b1edbc | 65 | |
AnnaBridge | 171:3a7713b1edbc | 66 | A4 = P0_10, |
AnnaBridge | 171:3a7713b1edbc | 67 | A5 = P0_11, |
AnnaBridge | 171:3a7713b1edbc | 68 | |
AnnaBridge | 171:3a7713b1edbc | 69 | // LPC800-MAX board |
AnnaBridge | 171:3a7713b1edbc | 70 | LED_RED = P0_7, |
AnnaBridge | 171:3a7713b1edbc | 71 | LED_GREEN = P0_17, |
AnnaBridge | 171:3a7713b1edbc | 72 | LED_BLUE = P0_16, |
AnnaBridge | 171:3a7713b1edbc | 73 | |
AnnaBridge | 171:3a7713b1edbc | 74 | // mbed original LED naming |
AnnaBridge | 171:3a7713b1edbc | 75 | LED1 = LED_BLUE, |
AnnaBridge | 171:3a7713b1edbc | 76 | LED2 = LED_GREEN, |
AnnaBridge | 171:3a7713b1edbc | 77 | LED3 = LED_RED, |
AnnaBridge | 171:3a7713b1edbc | 78 | LED4 = LED_RED, |
AnnaBridge | 171:3a7713b1edbc | 79 | |
AnnaBridge | 171:3a7713b1edbc | 80 | // Serial to USB pins |
AnnaBridge | 171:3a7713b1edbc | 81 | USBTX = P0_6, |
AnnaBridge | 171:3a7713b1edbc | 82 | USBRX = P0_1, |
AnnaBridge | 171:3a7713b1edbc | 83 | |
AnnaBridge | 171:3a7713b1edbc | 84 | // Not connected |
AnnaBridge | 171:3a7713b1edbc | 85 | NC = (int)0xFFFFFFFF, |
AnnaBridge | 171:3a7713b1edbc | 86 | } PinName; |
AnnaBridge | 171:3a7713b1edbc | 87 | |
AnnaBridge | 171:3a7713b1edbc | 88 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 89 | PullUp = 2, |
AnnaBridge | 171:3a7713b1edbc | 90 | PullDown = 1, |
AnnaBridge | 171:3a7713b1edbc | 91 | PullNone = 0, |
AnnaBridge | 171:3a7713b1edbc | 92 | Repeater = 3, |
AnnaBridge | 171:3a7713b1edbc | 93 | OpenDrain = 4, |
AnnaBridge | 171:3a7713b1edbc | 94 | PullDefault = PullDown |
AnnaBridge | 171:3a7713b1edbc | 95 | } PinMode; |
AnnaBridge | 171:3a7713b1edbc | 96 | |
AnnaBridge | 171:3a7713b1edbc | 97 | #define STDIO_UART_TX USBTX |
AnnaBridge | 171:3a7713b1edbc | 98 | #define STDIO_UART_RX USBRX |
AnnaBridge | 171:3a7713b1edbc | 99 | |
AnnaBridge | 171:3a7713b1edbc | 100 | typedef struct { |
AnnaBridge | 171:3a7713b1edbc | 101 | unsigned char n; |
AnnaBridge | 171:3a7713b1edbc | 102 | unsigned char offset; |
AnnaBridge | 171:3a7713b1edbc | 103 | } SWM_Map; |
AnnaBridge | 171:3a7713b1edbc | 104 | |
AnnaBridge | 171:3a7713b1edbc | 105 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 106 | } |
AnnaBridge | 171:3a7713b1edbc | 107 | #endif |
AnnaBridge | 171:3a7713b1edbc | 108 | |
AnnaBridge | 171:3a7713b1edbc | 109 | #endif |