mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_LPC11U24_401/PeripheralPins.c@274:6937b19af361, 2014-08-06 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Aug 06 08:15:07 2014 +0100
- Revision:
- 274:6937b19af361
Synchronized with git revision 5b145e4f6c509376173c3ea2aa35a6da879a2124
Full URL: https://github.com/mbedmicro/mbed/commit/5b145e4f6c509376173c3ea2aa35a6da879a2124/
[TARGET_LPC11UXX] PeripheralNames.h and PinMap definitions separation for LPC11UXX platforms
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 274:6937b19af361 | 1 | |
mbed_official | 274:6937b19af361 | 2 | /* mbed Microcontroller Library |
mbed_official | 274:6937b19af361 | 3 | * Copyright (c) 2006-2013 ARM Limited |
mbed_official | 274:6937b19af361 | 4 | * |
mbed_official | 274:6937b19af361 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mbed_official | 274:6937b19af361 | 6 | * you may not use this file except in compliance with the License. |
mbed_official | 274:6937b19af361 | 7 | * You may obtain a copy of the License at |
mbed_official | 274:6937b19af361 | 8 | * |
mbed_official | 274:6937b19af361 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 274:6937b19af361 | 10 | * |
mbed_official | 274:6937b19af361 | 11 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 274:6937b19af361 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
mbed_official | 274:6937b19af361 | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 274:6937b19af361 | 14 | * See the License for the specific language governing permissions and |
mbed_official | 274:6937b19af361 | 15 | * limitations under the License. |
mbed_official | 274:6937b19af361 | 16 | */ |
mbed_official | 274:6937b19af361 | 17 | |
mbed_official | 274:6937b19af361 | 18 | #include "PeripheralPins.h" |
mbed_official | 274:6937b19af361 | 19 | |
mbed_official | 274:6937b19af361 | 20 | /************ADC***************/ |
mbed_official | 274:6937b19af361 | 21 | const PinMap PinMap_ADC[] = { |
mbed_official | 274:6937b19af361 | 22 | {P0_11, ADC0_0, 0x02}, |
mbed_official | 274:6937b19af361 | 23 | {P0_12, ADC0_1, 0x02}, |
mbed_official | 274:6937b19af361 | 24 | {P0_13, ADC0_2, 0x02}, |
mbed_official | 274:6937b19af361 | 25 | {P0_14, ADC0_3, 0x02}, |
mbed_official | 274:6937b19af361 | 26 | {P0_15, ADC0_4, 0x02}, |
mbed_official | 274:6937b19af361 | 27 | {P0_16, ADC0_5, 0x01}, |
mbed_official | 274:6937b19af361 | 28 | {P0_22, ADC0_6, 0x01}, |
mbed_official | 274:6937b19af361 | 29 | {P0_23, ADC0_7, 0x01}, |
mbed_official | 274:6937b19af361 | 30 | {NC , NC , 0 } |
mbed_official | 274:6937b19af361 | 31 | }; |
mbed_official | 274:6937b19af361 | 32 | |
mbed_official | 274:6937b19af361 | 33 | /************I2C***************/ |
mbed_official | 274:6937b19af361 | 34 | const PinMap PinMap_I2C_SDA[] = { |
mbed_official | 274:6937b19af361 | 35 | {P0_5, I2C_0, 1}, |
mbed_official | 274:6937b19af361 | 36 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 37 | }; |
mbed_official | 274:6937b19af361 | 38 | |
mbed_official | 274:6937b19af361 | 39 | const PinMap PinMap_I2C_SCL[] = { |
mbed_official | 274:6937b19af361 | 40 | {P0_4, I2C_0, 1}, |
mbed_official | 274:6937b19af361 | 41 | {NC , NC, 0} |
mbed_official | 274:6937b19af361 | 42 | }; |
mbed_official | 274:6937b19af361 | 43 | |
mbed_official | 274:6937b19af361 | 44 | /************UART***************/ |
mbed_official | 274:6937b19af361 | 45 | const PinMap PinMap_UART_TX[] = { |
mbed_official | 274:6937b19af361 | 46 | {P0_19, UART_0, 1}, |
mbed_official | 274:6937b19af361 | 47 | {P1_13, UART_0, 3}, |
mbed_official | 274:6937b19af361 | 48 | {P1_27, UART_0, 2}, |
mbed_official | 274:6937b19af361 | 49 | { NC , NC , 0} |
mbed_official | 274:6937b19af361 | 50 | }; |
mbed_official | 274:6937b19af361 | 51 | |
mbed_official | 274:6937b19af361 | 52 | const PinMap PinMap_UART_RX[] = { |
mbed_official | 274:6937b19af361 | 53 | {P0_18, UART_0, 1}, |
mbed_official | 274:6937b19af361 | 54 | {P1_14, UART_0, 3}, |
mbed_official | 274:6937b19af361 | 55 | {P1_26, UART_0, 2}, |
mbed_official | 274:6937b19af361 | 56 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 57 | }; |
mbed_official | 274:6937b19af361 | 58 | |
mbed_official | 274:6937b19af361 | 59 | /************SPI***************/ |
mbed_official | 274:6937b19af361 | 60 | const PinMap PinMap_SPI_SCLK[] = { |
mbed_official | 274:6937b19af361 | 61 | {P0_6 , SPI_0, 0x02}, |
mbed_official | 274:6937b19af361 | 62 | {P0_10, SPI_0, 0x02}, |
mbed_official | 274:6937b19af361 | 63 | {P1_29, SPI_0, 0x01}, |
mbed_official | 274:6937b19af361 | 64 | {P1_15, SPI_1, 0x03}, |
mbed_official | 274:6937b19af361 | 65 | {P1_20, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 66 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 67 | }; |
mbed_official | 274:6937b19af361 | 68 | |
mbed_official | 274:6937b19af361 | 69 | const PinMap PinMap_SPI_MOSI[] = { |
mbed_official | 274:6937b19af361 | 70 | {P0_9 , SPI_0, 0x01}, |
mbed_official | 274:6937b19af361 | 71 | {P0_21, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 72 | {P1_22, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 73 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 74 | }; |
mbed_official | 274:6937b19af361 | 75 | |
mbed_official | 274:6937b19af361 | 76 | const PinMap PinMap_SPI_MISO[] = { |
mbed_official | 274:6937b19af361 | 77 | {P0_8 , SPI_0, 0x01}, |
mbed_official | 274:6937b19af361 | 78 | {P0_22, SPI_1, 0x03}, |
mbed_official | 274:6937b19af361 | 79 | {P1_21, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 80 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 81 | }; |
mbed_official | 274:6937b19af361 | 82 | |
mbed_official | 274:6937b19af361 | 83 | const PinMap PinMap_SPI_SSEL[] = { |
mbed_official | 274:6937b19af361 | 84 | {P0_2 , SPI_0, 0x01}, |
mbed_official | 274:6937b19af361 | 85 | {P1_19, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 86 | {P1_23, SPI_1, 0x02}, |
mbed_official | 274:6937b19af361 | 87 | {NC , NC , 0} |
mbed_official | 274:6937b19af361 | 88 | }; |
mbed_official | 274:6937b19af361 | 89 | |
mbed_official | 274:6937b19af361 | 90 | /************PWM***************/ |
mbed_official | 274:6937b19af361 | 91 | /* To have a PWM where we can change both the period and the duty cycle, |
mbed_official | 274:6937b19af361 | 92 | * we need an entire timer. With the following conventions: |
mbed_official | 274:6937b19af361 | 93 | * * MR3 is used for the PWM period |
mbed_official | 274:6937b19af361 | 94 | * * MR0, MR1, MR2 are used for the duty cycle |
mbed_official | 274:6937b19af361 | 95 | */ |
mbed_official | 274:6937b19af361 | 96 | const PinMap PinMap_PWM[] = { |
mbed_official | 274:6937b19af361 | 97 | /* CT16B0 */ |
mbed_official | 274:6937b19af361 | 98 | {P0_8 , PWM_1, 2}, {P1_13, PWM_1, 2}, /* MR0 */ |
mbed_official | 274:6937b19af361 | 99 | {P0_9 , PWM_2, 2}, {P1_14, PWM_2, 2}, /* MR1 */ |
mbed_official | 274:6937b19af361 | 100 | {P0_10, PWM_3, 3}, {P1_15, PWM_3, 2}, /* MR2 */ |
mbed_official | 274:6937b19af361 | 101 | |
mbed_official | 274:6937b19af361 | 102 | /* CT16B1 */ |
mbed_official | 274:6937b19af361 | 103 | {P0_21, PWM_4, 1}, /* MR0 */ |
mbed_official | 274:6937b19af361 | 104 | {P0_22, PWM_5, 2}, {P1_23, PWM_5, 1}, /* MR1 */ |
mbed_official | 274:6937b19af361 | 105 | |
mbed_official | 274:6937b19af361 | 106 | /* CT32B0 */ |
mbed_official | 274:6937b19af361 | 107 | {P0_18, PWM_6, 2}, {P1_24, PWM_6, 1}, /* MR0 */ |
mbed_official | 274:6937b19af361 | 108 | {P0_19, PWM_7, 2}, {P1_25, PWM_7, 1}, /* MR1 */ |
mbed_official | 274:6937b19af361 | 109 | {P0_1 , PWM_8, 2}, {P1_26, PWM_8, 1}, /* MR2 */ |
mbed_official | 274:6937b19af361 | 110 | |
mbed_official | 274:6937b19af361 | 111 | /* CT32B1 */ |
mbed_official | 274:6937b19af361 | 112 | {P0_13, PWM_9 , 3}, {P1_0, PWM_9 , 1}, /* MR0 */ |
mbed_official | 274:6937b19af361 | 113 | {P0_14, PWM_10, 3}, {P1_1, PWM_10, 1}, /* MR1 */ |
mbed_official | 274:6937b19af361 | 114 | {P0_15, PWM_11, 3}, {P1_2, PWM_11, 1}, /* MR2 */ |
mbed_official | 274:6937b19af361 | 115 | |
mbed_official | 274:6937b19af361 | 116 | {NC, NC, 0} |
mbed_official | 274:6937b19af361 | 117 | }; |