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