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_LPC1769/TOOLCHAIN_ARM_STD/PeripheralNames.h@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
mbed library release version 165
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_PERIPHERALNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 17 | #define MBED_PERIPHERALNAMES_H |
AnnaBridge | 171:3a7713b1edbc | 18 | |
AnnaBridge | 171:3a7713b1edbc | 19 | #include "cmsis.h" |
AnnaBridge | 171:3a7713b1edbc | 20 | #include "PinNames.h" |
AnnaBridge | 171:3a7713b1edbc | 21 | |
AnnaBridge | 171:3a7713b1edbc | 22 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 23 | extern "C" { |
AnnaBridge | 171:3a7713b1edbc | 24 | #endif |
AnnaBridge | 171:3a7713b1edbc | 25 | |
AnnaBridge | 171:3a7713b1edbc | 26 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 27 | UART_0 = (int)LPC_UART0_BASE, |
AnnaBridge | 171:3a7713b1edbc | 28 | UART_1 = (int)LPC_UART1_BASE, |
AnnaBridge | 171:3a7713b1edbc | 29 | UART_2 = (int)LPC_UART2_BASE, |
AnnaBridge | 171:3a7713b1edbc | 30 | UART_3 = (int)LPC_UART3_BASE |
AnnaBridge | 171:3a7713b1edbc | 31 | } UARTName; |
AnnaBridge | 171:3a7713b1edbc | 32 | |
AnnaBridge | 171:3a7713b1edbc | 33 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 34 | ADC0_0 = 0, |
AnnaBridge | 171:3a7713b1edbc | 35 | ADC0_1, |
AnnaBridge | 171:3a7713b1edbc | 36 | ADC0_2, |
AnnaBridge | 171:3a7713b1edbc | 37 | ADC0_3, |
AnnaBridge | 171:3a7713b1edbc | 38 | ADC0_4, |
AnnaBridge | 171:3a7713b1edbc | 39 | ADC0_5, |
AnnaBridge | 171:3a7713b1edbc | 40 | ADC0_6, |
AnnaBridge | 171:3a7713b1edbc | 41 | ADC0_7 |
AnnaBridge | 171:3a7713b1edbc | 42 | } ADCName; |
AnnaBridge | 171:3a7713b1edbc | 43 | |
AnnaBridge | 171:3a7713b1edbc | 44 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 45 | DAC_0 = 0 |
AnnaBridge | 171:3a7713b1edbc | 46 | } DACName; |
AnnaBridge | 171:3a7713b1edbc | 47 | |
AnnaBridge | 171:3a7713b1edbc | 48 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 49 | SPI_0 = (int)LPC_SSP0_BASE, |
AnnaBridge | 171:3a7713b1edbc | 50 | SPI_1 = (int)LPC_SSP1_BASE |
AnnaBridge | 171:3a7713b1edbc | 51 | } SPIName; |
AnnaBridge | 171:3a7713b1edbc | 52 | |
AnnaBridge | 171:3a7713b1edbc | 53 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 54 | I2C_0 = (int)LPC_I2C0_BASE, |
AnnaBridge | 171:3a7713b1edbc | 55 | I2C_1 = (int)LPC_I2C1_BASE, |
AnnaBridge | 171:3a7713b1edbc | 56 | I2C_2 = (int)LPC_I2C2_BASE |
AnnaBridge | 171:3a7713b1edbc | 57 | } I2CName; |
AnnaBridge | 171:3a7713b1edbc | 58 | |
AnnaBridge | 171:3a7713b1edbc | 59 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 60 | PWM_1 = 1, |
AnnaBridge | 171:3a7713b1edbc | 61 | PWM_2, |
AnnaBridge | 171:3a7713b1edbc | 62 | PWM_3, |
AnnaBridge | 171:3a7713b1edbc | 63 | PWM_4, |
AnnaBridge | 171:3a7713b1edbc | 64 | PWM_5, |
AnnaBridge | 171:3a7713b1edbc | 65 | PWM_6 |
AnnaBridge | 171:3a7713b1edbc | 66 | } PWMName; |
AnnaBridge | 171:3a7713b1edbc | 67 | |
AnnaBridge | 171:3a7713b1edbc | 68 | typedef enum { |
AnnaBridge | 171:3a7713b1edbc | 69 | CAN_1 = (int)LPC_CAN1_BASE, |
AnnaBridge | 171:3a7713b1edbc | 70 | CAN_2 = (int)LPC_CAN2_BASE |
AnnaBridge | 171:3a7713b1edbc | 71 | } CANName; |
AnnaBridge | 171:3a7713b1edbc | 72 | |
AnnaBridge | 171:3a7713b1edbc | 73 | #define STDIO_UART_TX USBTX |
AnnaBridge | 171:3a7713b1edbc | 74 | #define STDIO_UART_RX USBRX |
AnnaBridge | 171:3a7713b1edbc | 75 | #define STDIO_UART UART_0 |
AnnaBridge | 171:3a7713b1edbc | 76 | |
AnnaBridge | 171:3a7713b1edbc | 77 | // Default peripherals |
AnnaBridge | 171:3a7713b1edbc | 78 | #define MBED_SPI0 p5, p6, p7, p8 |
AnnaBridge | 171:3a7713b1edbc | 79 | #define MBED_SPI1 p11, p12, p13, p14 |
AnnaBridge | 171:3a7713b1edbc | 80 | |
AnnaBridge | 171:3a7713b1edbc | 81 | #define MBED_UART0 p9, p10 |
AnnaBridge | 171:3a7713b1edbc | 82 | #define MBED_UART1 p13, p14 |
AnnaBridge | 171:3a7713b1edbc | 83 | #define MBED_UART2 p28, p27 |
AnnaBridge | 171:3a7713b1edbc | 84 | #define MBED_UARTUSB USBTX, USBRX |
AnnaBridge | 171:3a7713b1edbc | 85 | |
AnnaBridge | 171:3a7713b1edbc | 86 | #define MBED_I2C0 p28, p27 |
AnnaBridge | 171:3a7713b1edbc | 87 | #define MBED_I2C1 p9, p10 |
AnnaBridge | 171:3a7713b1edbc | 88 | |
AnnaBridge | 171:3a7713b1edbc | 89 | #define MBED_CAN0 p30, p29 |
AnnaBridge | 171:3a7713b1edbc | 90 | |
AnnaBridge | 171:3a7713b1edbc | 91 | #define MBED_ANALOGOUT0 p18 |
AnnaBridge | 171:3a7713b1edbc | 92 | |
AnnaBridge | 171:3a7713b1edbc | 93 | #define MBED_ANALOGIN0 p15 |
AnnaBridge | 171:3a7713b1edbc | 94 | #define MBED_ANALOGIN1 p16 |
AnnaBridge | 171:3a7713b1edbc | 95 | #define MBED_ANALOGIN2 p17 |
AnnaBridge | 171:3a7713b1edbc | 96 | #define MBED_ANALOGIN3 p18 |
AnnaBridge | 171:3a7713b1edbc | 97 | #define MBED_ANALOGIN4 p19 |
AnnaBridge | 171:3a7713b1edbc | 98 | #define MBED_ANALOGIN5 p20 |
AnnaBridge | 171:3a7713b1edbc | 99 | |
AnnaBridge | 171:3a7713b1edbc | 100 | #define MBED_PWMOUT0 p26 |
AnnaBridge | 171:3a7713b1edbc | 101 | #define MBED_PWMOUT1 p25 |
AnnaBridge | 171:3a7713b1edbc | 102 | #define MBED_PWMOUT2 p24 |
AnnaBridge | 171:3a7713b1edbc | 103 | #define MBED_PWMOUT3 p23 |
AnnaBridge | 171:3a7713b1edbc | 104 | #define MBED_PWMOUT4 p22 |
AnnaBridge | 171:3a7713b1edbc | 105 | #define MBED_PWMOUT5 p21 |
AnnaBridge | 171:3a7713b1edbc | 106 | |
AnnaBridge | 171:3a7713b1edbc | 107 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 108 | } |
AnnaBridge | 171:3a7713b1edbc | 109 | #endif |
AnnaBridge | 171:3a7713b1edbc | 110 | |
AnnaBridge | 171:3a7713b1edbc | 111 | #endif |