mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC81X/TARGET_LPC810/PinNames.h@310:6188e0254baa, 2014-09-16 (annotated)
- Committer:
- janekm
- Date:
- Tue Sep 16 22:42:01 2014 +0000
- Revision:
- 310:6188e0254baa
- Parent:
- 113:65a335a675de
N/A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 20:4263a77256ae | 1 | /* mbed Microcontroller Library |
bogdanm | 20:4263a77256ae | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 20:4263a77256ae | 3 | * |
bogdanm | 20:4263a77256ae | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 20:4263a77256ae | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 20:4263a77256ae | 6 | * You may obtain a copy of the License at |
bogdanm | 20:4263a77256ae | 7 | * |
bogdanm | 20:4263a77256ae | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 20:4263a77256ae | 9 | * |
bogdanm | 20:4263a77256ae | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 20:4263a77256ae | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 20:4263a77256ae | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 20:4263a77256ae | 13 | * See the License for the specific language governing permissions and |
bogdanm | 20:4263a77256ae | 14 | * limitations under the License. |
bogdanm | 20:4263a77256ae | 15 | */ |
bogdanm | 20:4263a77256ae | 16 | #ifndef MBED_PINNAMES_H |
bogdanm | 20:4263a77256ae | 17 | #define MBED_PINNAMES_H |
bogdanm | 20:4263a77256ae | 18 | |
bogdanm | 20:4263a77256ae | 19 | #include "cmsis.h" |
bogdanm | 20:4263a77256ae | 20 | |
bogdanm | 20:4263a77256ae | 21 | #ifdef __cplusplus |
bogdanm | 20:4263a77256ae | 22 | extern "C" { |
bogdanm | 20:4263a77256ae | 23 | #endif |
bogdanm | 20:4263a77256ae | 24 | |
bogdanm | 20:4263a77256ae | 25 | typedef enum { |
bogdanm | 20:4263a77256ae | 26 | PIN_INPUT, |
bogdanm | 20:4263a77256ae | 27 | PIN_OUTPUT |
bogdanm | 20:4263a77256ae | 28 | } PinDirection; |
bogdanm | 20:4263a77256ae | 29 | |
bogdanm | 20:4263a77256ae | 30 | typedef enum { |
bogdanm | 20:4263a77256ae | 31 | P0_0 = 0, |
bogdanm | 20:4263a77256ae | 32 | P0_1 = 1, |
bogdanm | 20:4263a77256ae | 33 | P0_2 = 2, |
bogdanm | 20:4263a77256ae | 34 | P0_3 = 3, |
bogdanm | 20:4263a77256ae | 35 | P0_4 = 4, |
bogdanm | 20:4263a77256ae | 36 | P0_5 = 5, |
bogdanm | 20:4263a77256ae | 37 | |
bogdanm | 20:4263a77256ae | 38 | dp1 = P0_5, |
bogdanm | 20:4263a77256ae | 39 | dp2 = P0_4, |
bogdanm | 20:4263a77256ae | 40 | dp3 = P0_3, |
bogdanm | 20:4263a77256ae | 41 | dp4 = P0_2, |
bogdanm | 20:4263a77256ae | 42 | dp5 = P0_1, |
bogdanm | 20:4263a77256ae | 43 | dp8 = P0_0, |
bogdanm | 20:4263a77256ae | 44 | |
bogdanm | 20:4263a77256ae | 45 | // mbed original LED naming |
bogdanm | 20:4263a77256ae | 46 | LED1 = P0_2, |
bogdanm | 20:4263a77256ae | 47 | LED2 = P0_2, |
bogdanm | 20:4263a77256ae | 48 | LED3 = P0_2, |
bogdanm | 20:4263a77256ae | 49 | LED4 = P0_2, |
bogdanm | 20:4263a77256ae | 50 | LED_RED = P0_2, |
bogdanm | 20:4263a77256ae | 51 | |
bogdanm | 20:4263a77256ae | 52 | // Serial to USB pins |
bogdanm | 20:4263a77256ae | 53 | USBTX = P0_4, |
bogdanm | 20:4263a77256ae | 54 | USBRX = P0_0, |
bogdanm | 20:4263a77256ae | 55 | |
bogdanm | 20:4263a77256ae | 56 | // Not connected |
bogdanm | 20:4263a77256ae | 57 | NC = (int)0xFFFFFFFF, |
bogdanm | 20:4263a77256ae | 58 | } PinName; |
bogdanm | 20:4263a77256ae | 59 | |
bogdanm | 20:4263a77256ae | 60 | typedef enum { |
bogdanm | 20:4263a77256ae | 61 | PullUp = 2, |
bogdanm | 20:4263a77256ae | 62 | PullDown = 1, |
bogdanm | 20:4263a77256ae | 63 | PullNone = 0, |
bogdanm | 20:4263a77256ae | 64 | Repeater = 3, |
mbed_official | 113:65a335a675de | 65 | OpenDrain = 4, |
mbed_official | 113:65a335a675de | 66 | PullDefault = PullDown |
bogdanm | 20:4263a77256ae | 67 | } PinMode; |
bogdanm | 20:4263a77256ae | 68 | |
bogdanm | 20:4263a77256ae | 69 | #define STDIO_UART_TX USBTX |
bogdanm | 20:4263a77256ae | 70 | #define STDIO_UART_RX USBRX |
bogdanm | 20:4263a77256ae | 71 | |
bogdanm | 20:4263a77256ae | 72 | typedef struct { |
bogdanm | 20:4263a77256ae | 73 | unsigned char n; |
bogdanm | 20:4263a77256ae | 74 | unsigned char offset; |
bogdanm | 20:4263a77256ae | 75 | } SWM_Map; |
bogdanm | 20:4263a77256ae | 76 | |
bogdanm | 20:4263a77256ae | 77 | #ifdef __cplusplus |
bogdanm | 20:4263a77256ae | 78 | } |
bogdanm | 20:4263a77256ae | 79 | #endif |
bogdanm | 20:4263a77256ae | 80 | |
bogdanm | 20:4263a77256ae | 81 | #endif |