fix for mbed lib issue 3 (i2c problem) see also https://mbed.org/users/mbed_official/code/mbed/issues/3 affected implementations: LPC812, LPC11U24, LPC1768, LPC2368, LPC4088

Fork of mbed-src by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PeripheralNames.h Source File

PeripheralNames.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef MBED_PERIPHERALNAMES_H
00017 #define MBED_PERIPHERALNAMES_H
00018 
00019 #include "cmsis.h"
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 typedef enum {
00026     UART_0 = (int)LPC_UART0_BASE,
00027     UART_1 = (int)LPC_UART1_BASE,
00028     UART_2 = (int)LPC_UART2_BASE,
00029     UART_3 = (int)LPC_UART3_BASE,
00030     UART_4 = (int)LPC_UART4_BASE
00031 } UARTName;
00032 
00033 typedef enum {
00034     ADC0_0 = 0,
00035     ADC0_1,
00036     ADC0_2,
00037     ADC0_3,
00038     ADC0_4,
00039     ADC0_5,
00040     ADC0_6,
00041     ADC0_7
00042 } ADCName;
00043 
00044 typedef enum {
00045     DAC_0 = 0
00046 } DACName;
00047 
00048 typedef enum {
00049     SPI_0 = (int)LPC_SSP0_BASE,
00050     SPI_1 = (int)LPC_SSP1_BASE,
00051     SPI_2 = (int)LPC_SSP2_BASE
00052 } SPIName;
00053 
00054 typedef enum {
00055     I2C_0 = (int)LPC_I2C0_BASE,
00056     I2C_1 = (int)LPC_I2C1_BASE,
00057     I2C_2 = (int)LPC_I2C2_BASE
00058 } I2CName;
00059 
00060 typedef enum {
00061     PWM0_1 = 1,
00062     PWM0_2,
00063     PWM0_3,
00064     PWM0_4,
00065     PWM0_5,
00066     PWM0_6,
00067     PWM1_1,
00068     PWM1_2,
00069     PWM1_3,
00070     PWM1_4,
00071     PWM1_5,
00072     PWM1_6
00073 } PWMName;
00074 
00075 typedef enum {
00076      CAN_1 = (int)LPC_CAN1_BASE,
00077      CAN_2 = (int)LPC_CAN2_BASE
00078 } CANName;
00079 
00080 #define STDIO_UART_TX     USBTX
00081 #define STDIO_UART_RX     USBRX
00082 #define STDIO_UART        UART_0
00083 
00084 #ifdef __cplusplus
00085 }
00086 #endif
00087 
00088 #endif