mbed library sources change for ST sensors and ST BLE
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC43XX/PeripheralNames.h@636:83ea0d2b909b, 2016-04-14 (annotated)
- Committer:
- NickZhouARM
- Date:
- Thu Apr 14 07:07:44 2016 +0000
- Revision:
- 636:83ea0d2b909b
- Parent:
- 256:76fd9a263045
Working version for ST BLE + Sensors
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_PERIPHERALNAMES_H |
bogdanm | 20:4263a77256ae | 17 | #define MBED_PERIPHERALNAMES_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 | UART_0 = (int)LPC_USART0_BASE, |
bogdanm | 20:4263a77256ae | 27 | UART_1 = (int)LPC_UART1_BASE, |
bogdanm | 20:4263a77256ae | 28 | UART_2 = (int)LPC_USART2_BASE, |
bogdanm | 20:4263a77256ae | 29 | UART_3 = (int)LPC_USART3_BASE |
bogdanm | 20:4263a77256ae | 30 | } UARTName; |
bogdanm | 20:4263a77256ae | 31 | |
bogdanm | 20:4263a77256ae | 32 | typedef enum { |
bogdanm | 20:4263a77256ae | 33 | ADC0_0 = 0, |
bogdanm | 20:4263a77256ae | 34 | ADC0_1, |
bogdanm | 20:4263a77256ae | 35 | ADC0_2, |
bogdanm | 20:4263a77256ae | 36 | ADC0_3, |
bogdanm | 20:4263a77256ae | 37 | ADC0_4, |
bogdanm | 20:4263a77256ae | 38 | ADC0_5, |
bogdanm | 20:4263a77256ae | 39 | ADC0_6, |
bogdanm | 20:4263a77256ae | 40 | ADC0_7, |
bogdanm | 20:4263a77256ae | 41 | ADC1_0, |
bogdanm | 20:4263a77256ae | 42 | ADC1_1, |
bogdanm | 20:4263a77256ae | 43 | ADC1_2, |
bogdanm | 20:4263a77256ae | 44 | ADC1_3, |
bogdanm | 20:4263a77256ae | 45 | ADC1_4, |
bogdanm | 20:4263a77256ae | 46 | ADC1_5, |
bogdanm | 20:4263a77256ae | 47 | ADC1_6, |
bogdanm | 20:4263a77256ae | 48 | ADC1_7 |
bogdanm | 20:4263a77256ae | 49 | } ADCName; |
bogdanm | 20:4263a77256ae | 50 | |
bogdanm | 20:4263a77256ae | 51 | typedef enum { |
bogdanm | 20:4263a77256ae | 52 | DAC_0 = 0 |
bogdanm | 20:4263a77256ae | 53 | } DACName; |
bogdanm | 20:4263a77256ae | 54 | |
bogdanm | 20:4263a77256ae | 55 | typedef enum { |
bogdanm | 20:4263a77256ae | 56 | SPI_0 = (int)LPC_SSP0_BASE, |
bogdanm | 20:4263a77256ae | 57 | SPI_1 = (int)LPC_SSP1_BASE |
bogdanm | 20:4263a77256ae | 58 | } SPIName; |
bogdanm | 20:4263a77256ae | 59 | |
bogdanm | 20:4263a77256ae | 60 | typedef enum { |
bogdanm | 20:4263a77256ae | 61 | I2C_0 = (int)LPC_I2C0_BASE, |
bogdanm | 20:4263a77256ae | 62 | I2C_1 = (int)LPC_I2C1_BASE |
bogdanm | 20:4263a77256ae | 63 | } I2CName; |
bogdanm | 20:4263a77256ae | 64 | |
bogdanm | 20:4263a77256ae | 65 | typedef enum { |
mbed_official | 256:76fd9a263045 | 66 | PWM_0, |
mbed_official | 256:76fd9a263045 | 67 | PWM_1, |
mbed_official | 256:76fd9a263045 | 68 | PWM_2, |
mbed_official | 256:76fd9a263045 | 69 | PWM_3, |
mbed_official | 256:76fd9a263045 | 70 | PWM_4, |
mbed_official | 256:76fd9a263045 | 71 | PWM_5, |
mbed_official | 256:76fd9a263045 | 72 | PWM_6, |
mbed_official | 256:76fd9a263045 | 73 | PWM_7, |
mbed_official | 256:76fd9a263045 | 74 | PWM_8, |
mbed_official | 256:76fd9a263045 | 75 | PWM_9, |
mbed_official | 256:76fd9a263045 | 76 | PWM_10, |
mbed_official | 256:76fd9a263045 | 77 | PWM_11, |
mbed_official | 256:76fd9a263045 | 78 | PWM_12, |
mbed_official | 256:76fd9a263045 | 79 | PWM_13, |
mbed_official | 256:76fd9a263045 | 80 | PWM_14, |
mbed_official | 256:76fd9a263045 | 81 | PWM_15 |
bogdanm | 20:4263a77256ae | 82 | } PWMName; |
bogdanm | 20:4263a77256ae | 83 | |
bogdanm | 20:4263a77256ae | 84 | typedef enum { |
bogdanm | 20:4263a77256ae | 85 | CAN_0 = (int)LPC_C_CAN0_BASE, |
bogdanm | 20:4263a77256ae | 86 | CAN_1 = (int)LPC_C_CAN1_BASE |
bogdanm | 20:4263a77256ae | 87 | } CANName; |
bogdanm | 20:4263a77256ae | 88 | |
mbed_official | 256:76fd9a263045 | 89 | #define STDIO_UART_TX USBTX |
mbed_official | 256:76fd9a263045 | 90 | #define STDIO_UART_RX USBRX |
mbed_official | 256:76fd9a263045 | 91 | #define STDIO_UART UART_2 |
mbed_official | 256:76fd9a263045 | 92 | |
mbed_official | 256:76fd9a263045 | 93 | // Default peripherals |
mbed_official | 256:76fd9a263045 | 94 | #define MBED_SPI0 SPI0_MOSI, SPI0_MISO, SPI0_SCK, SPI0_SSEL |
mbed_official | 256:76fd9a263045 | 95 | #define MBED_SPI1 SPI1_MOSI, SPI1_MISO, SPI1_SCK, SPI1_SSEL |
mbed_official | 256:76fd9a263045 | 96 | |
mbed_official | 256:76fd9a263045 | 97 | #define MBED_UART0 UART0_TX, UART0_RX |
mbed_official | 256:76fd9a263045 | 98 | #define MBED_UART1 UART1_TX, UART1_RX |
mbed_official | 256:76fd9a263045 | 99 | #define MBED_UART2 UART2_TX, UART2_RX |
mbed_official | 256:76fd9a263045 | 100 | #define MBED_UART3 UART3_TX, UART3_RX |
mbed_official | 256:76fd9a263045 | 101 | #define MBED_UARTUSB USBTX, USBRX |
mbed_official | 256:76fd9a263045 | 102 | |
mbed_official | 256:76fd9a263045 | 103 | #define COM1 MBED_UART0 |
mbed_official | 256:76fd9a263045 | 104 | #define COM2 MBED_UART1 |
mbed_official | 256:76fd9a263045 | 105 | #define COM3 MBED_UART2 |
mbed_official | 256:76fd9a263045 | 106 | #define COM4 MBED_UART3 |
mbed_official | 256:76fd9a263045 | 107 | |
mbed_official | 256:76fd9a263045 | 108 | #define MBED_I2C0 I2C0_SDA, I2C0_SCL |
mbed_official | 256:76fd9a263045 | 109 | #define MBED_I2C1 I2C1_SDA, I2C1_SCL |
mbed_official | 256:76fd9a263045 | 110 | |
mbed_official | 256:76fd9a263045 | 111 | #define MBED_CAN0 p30, p29 |
mbed_official | 256:76fd9a263045 | 112 | |
mbed_official | 256:76fd9a263045 | 113 | #define MBED_ANALOGOUT0 DAC0 |
mbed_official | 256:76fd9a263045 | 114 | |
mbed_official | 256:76fd9a263045 | 115 | #define MBED_ANALOGIN0 ADC0 |
mbed_official | 256:76fd9a263045 | 116 | #define MBED_ANALOGIN1 ADC1 |
mbed_official | 256:76fd9a263045 | 117 | #define MBED_ANALOGIN2 ADC2 |
mbed_official | 256:76fd9a263045 | 118 | #define MBED_ANALOGIN3 ADC3 |
mbed_official | 256:76fd9a263045 | 119 | #define MBED_ANALOGIN4 ADC4 |
mbed_official | 256:76fd9a263045 | 120 | #define MBED_ANALOGIN5 ADC5 |
mbed_official | 256:76fd9a263045 | 121 | #define MBED_ANALOGIN6 ADC6 |
mbed_official | 256:76fd9a263045 | 122 | #define MBED_ANALOGIN7 ADC7 |
mbed_official | 256:76fd9a263045 | 123 | |
mbed_official | 256:76fd9a263045 | 124 | #define MBED_PWMOUT0 p26 |
mbed_official | 256:76fd9a263045 | 125 | #define MBED_PWMOUT1 p25 |
mbed_official | 256:76fd9a263045 | 126 | #define MBED_PWMOUT2 p24 |
mbed_official | 256:76fd9a263045 | 127 | #define MBED_PWMOUT3 p23 |
mbed_official | 256:76fd9a263045 | 128 | #define MBED_PWMOUT4 p22 |
mbed_official | 256:76fd9a263045 | 129 | #define MBED_PWMOUT5 p21 |
bogdanm | 20:4263a77256ae | 130 | |
bogdanm | 20:4263a77256ae | 131 | #ifdef __cplusplus |
bogdanm | 20:4263a77256ae | 132 | } |
bogdanm | 20:4263a77256ae | 133 | #endif |
bogdanm | 20:4263a77256ae | 134 | |
bogdanm | 20:4263a77256ae | 135 | #endif |