Skip to content

Commit e196775

Browse files
committed
Move spi_pinmap.h to LPC11XX_11CXX common
Merge back into spi_api.c. P0_10/SPI_0 (SWCLK) now disabled for both targets
1 parent e9f5c8d commit e196775

File tree

3 files changed

+25
-68
lines changed

3 files changed

+25
-68
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11CXX/spi_pinmap.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11XX/spi_pinmap.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/spi_api.c

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,31 @@
1919
#include "pinmap.h"
2020
#include "error.h"
2121

22-
#include "spi_pinmap.h"
22+
static const PinMap PinMap_SPI_SCLK[] = {
23+
{P0_6 , SPI_0, 0x02},
24+
// {P0_10, SPI_0, 0x02}, -- should be mapped to SWCLK only
25+
{P2_11, SPI_0, 0x01},
26+
{P2_1 , SPI_1, 0x02},
27+
{NC , NC , 0}
28+
};
29+
30+
static const PinMap PinMap_SPI_MOSI[] = {
31+
{P0_9 , SPI_0, 0x01},
32+
{P2_3 , SPI_1, 0x02},
33+
{NC , NC , 0}
34+
};
35+
36+
static const PinMap PinMap_SPI_MISO[] = {
37+
{P0_8 , SPI_0, 0x01},
38+
{P2_2 , SPI_1, 0x02},
39+
{NC , NC , 0}
40+
};
41+
42+
static const PinMap PinMap_SPI_SSEL[] = {
43+
{P0_2 , SPI_0, 0x01},
44+
{P2_0 , SPI_1, 0x02},
45+
{NC , NC , 0}
46+
};
2347

2448
static inline int ssp_disable(spi_t *obj);
2549
static inline int ssp_enable(spi_t *obj);

0 commit comments

Comments
 (0)