mbed library sources
Fork of mbed-src by
Revision 50:b08ceb75017d, committed 2013-11-26
- Comitter:
- mbed_official
- Date:
- Tue Nov 26 15:30:05 2013 +0000
- Parent:
- 49:a1af374b4197
- Child:
- 51:7838415c99e7
- Commit message:
- Synchronized with git revision 256f70fffc5847a435588bbe9b1b3982ce014d6e
Full URL: https://github.com/mbedmicro/mbed/commit/256f70fffc5847a435588bbe9b1b3982ce014d6e/
Changed in this revision
--- a/api/SPI.h Thu Nov 21 16:45:05 2013 +0000 +++ b/api/SPI.h Tue Nov 26 15:30:05 2013 +0000 @@ -59,7 +59,7 @@ * @param miso SPI Master In, Slave Out pin * @param sclk SPI Clock pin */ - SPI(PinName mosi, PinName miso, PinName sclk); + SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC); /** Configure the data transmission format *
--- a/common/SPI.cpp Thu Nov 21 16:45:05 2013 +0000 +++ b/common/SPI.cpp Tue Nov 26 15:30:05 2013 +0000 @@ -19,7 +19,7 @@ namespace mbed { -SPI::SPI(PinName mosi, PinName miso, PinName sclk) { +SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) { spi_init(&_spi, mosi, miso, sclk, NC); _bits = 8; _mode = 0;
--- a/targets/hal/TARGET_Freescale/TARGET_KL25Z/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ b/targets/hal/TARGET_Freescale/TARGET_KL25Z/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -82,6 +82,31 @@ SPI_1 = (int)SPI1_BASE, } SPIName; +// Default peripherals +#define MBED_SPI0 PTD2, PTD3, PTD1, PTD0 + +#define MBED_UART0 PTC4, PTC3 +#define MBED_UART1 PTD3, PTD2 +#define MBED_UARTUSB PTA2, PTA1 + +#define MBED_I2C0 PTC9, PTC8 +#define MBED_I2C1 PTE1, PTE0 + +#define MBED_ANALOGOUT0 PTE30 + +#define MBED_ANALOGIN0 PTC2 +#define MBED_ANALOGIN1 PTB3 +#define MBED_ANALOGIN2 PTB2 +#define MBED_ANALOGIN3 PTB1 +#define MBED_ANALOGIN4 PTB0 + +#define MBED_PWMOUT0 PTD4 +#define MBED_PWMOUT1 PTA12 +#define MBED_PWMOUT2 PTA4 +#define MBED_PWMOUT3 PTA5 +#define MBED_PWMOUT4 PTC8 +#define MBED_PWMOUT5 PTC9 + #ifdef __cplusplus } #endif
--- a/targets/hal/TARGET_NXP/TARGET_LPC11UXX/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11UXX/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -64,6 +64,22 @@ #define STDIO_UART_RX USBRX #define STDIO_UART UART_0 +// Default peripherals +#define MBED_SPI0 p5, p6, p7, p8 +#define MBED_SPI1 p11, p12, p13, p14 + +#define MBED_UART0 p9, p10 +#define MBED_UARTUSB USBTX, USBRX + +#define MBED_I2C0 p28, p27 + +#define MBED_ANALOGIN0 p15 +#define MBED_ANALOGIN1 p16 +#define MBED_ANALOGIN2 p17 +#define MBED_ANALOGIN3 p18 +#define MBED_ANALOGIN4 p19 +#define MBED_ANALOGIN5 p20 + #ifdef __cplusplus } #endif
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -17,6 +17,7 @@ #define MBED_PERIPHERALNAMES_H #include "cmsis.h" +#include "PinNames.h" #ifdef __cplusplus extern "C" { @@ -73,6 +74,36 @@ #define STDIO_UART_RX USBRX #define STDIO_UART UART_0 +// Default peripherals +#define MBED_SPI0 p5, p6, p7, p8 +#define MBED_SPI1 p11, p12, p13, p14 + +#define MBED_UART0 p9, p10 +#define MBED_UART1 p13, p14 +#define MBED_UART2 p28, p27 +#define MBED_UARTUSB USBTX, USBRX + +#define MBED_I2C0 p28, p27 +#define MBED_I2C1 p9, p10 + +#define MBED_CAN0 p30, p29 + +#define MBED_ANALOGOUT0 p18 + +#define MBED_ANALOGIN0 p15 +#define MBED_ANALOGIN1 p16 +#define MBED_ANALOGIN2 p17 +#define MBED_ANALOGIN3 p18 +#define MBED_ANALOGIN4 p19 +#define MBED_ANALOGIN5 p20 + +#define MBED_PWMOUT0 p26 +#define MBED_PWMOUT1 p25 +#define MBED_PWMOUT2 p24 +#define MBED_PWMOUT3 p23 +#define MBED_PWMOUT4 p22 +#define MBED_PWMOUT5 p21 + #ifdef __cplusplus } #endif
--- a/targets/hal/TARGET_NXP/TARGET_LPC23XX/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC23XX/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -73,6 +73,36 @@ #define STDIO_UART_RX USBRX #define STDIO_UART UART_0 +// Default peripherals +#define MBED_SPI0 p5, p6, p7, p8 +#define MBED_SPI1 p11, p12, p13, p14 + +#define MBED_UART0 p9, p10 +#define MBED_UART1 p13, p14 +#define MBED_UART2 p28, p27 +#define MBED_UARTUSB USBTX, USBRX + +#define MBED_I2C0 p28, p27 +#define MBED_I2C1 p9, p10 + +#define MBED_CAN0 p30, p29 + +#define MBED_ANALOGOUT0 p18 + +#define MBED_ANALOGIN0 p15 +#define MBED_ANALOGIN1 p16 +#define MBED_ANALOGIN2 p17 +#define MBED_ANALOGIN3 p18 +#define MBED_ANALOGIN4 p19 +#define MBED_ANALOGIN5 p20 + +#define MBED_PWMOUT0 p26 +#define MBED_PWMOUT1 p25 +#define MBED_PWMOUT2 p24 +#define MBED_PWMOUT3 p23 +#define MBED_PWMOUT4 p22 +#define MBED_PWMOUT5 p21 + #ifdef __cplusplus } #endif
--- a/targets/hal/TARGET_NXP/TARGET_LPC408X/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC408X/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -81,6 +81,37 @@ #define STDIO_UART_RX USBRX #define STDIO_UART UART_0 +// Default peripherals +#define MBED_SPI0 p5, p6, p7 +#define MBED_SPI1 p11, p12, p13, p14 +#define MBED_SPI2 p39, p38, p32, p31 + +#define MBED_UART3 p9, p10 +#define MBED_UART4 p37, p31 +#define MBED_UARTUSB USBTX, USBRX + +#define MBED_I2C0 p32, p31 +#define MBED_I2C1 p9, p10 + +#define MBED_CAN1 p9, p10 +#define MBED_CAN2 p34, p33 + +#define MBED_ANALOGOUT0 p18 + +#define MBED_ANALOGIN0 p15 +#define MBED_ANALOGIN1 p16 +#define MBED_ANALOGIN2 p17 +#define MBED_ANALOGIN3 p18 +#define MBED_ANALOGIN4 p19 +#define MBED_ANALOGIN5 p20 + +#define MBED_PWMOUT0 p30 +#define MBED_PWMOUT1 p29 +#define MBED_PWMOUT2 p28 +#define MBED_PWMOUT3 p27 +#define MBED_PWMOUT4 p26 +#define MBED_PWMOUT5 p25 + #ifdef __cplusplus } #endif
--- a/targets/hal/TARGET_NXP/TARGET_LPC81X/PeripheralNames.h Thu Nov 21 16:45:05 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef MBED_PERIPHERALNAMES_H -#define MBED_PERIPHERALNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} -#endif - -#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC81X/TARGET_LPC810/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -0,0 +1,30 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_PERIPHERALNAMES_H +#define MBED_PERIPHERALNAMES_H + +#include "cmsis.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} +#endif + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC81X/TARGET_LPC812/PeripheralNames.h Tue Nov 26 15:30:05 2013 +0000 @@ -0,0 +1,37 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef MBED_PERIPHERALNAMES_H +#define MBED_PERIPHERALNAMES_H + +#include "cmsis.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Default peripherals +#define MBED_SPI0 P0_14, P0_15, P0_12, P0_13 + +#define MBED_UART0 P0_4, P0_0 +#define MBED_UARTUSB USBTX, USBRX + +#define MBED_I2C0 P0_10, P0_11 + +#ifdef __cplusplus +} +#endif + +#endif