mirror of https://github.com/ARMmbed/mbed-os.git
Move spi_pinmap.h to LPC11XX_11CXX common
Merge back into spi_api.c. P0_10/SPI_0 (SWCLK) now disabled for both targetspull/79/head
parent
e9f5c8d3ca
commit
e1967755a5
|
|
@ -1,34 +0,0 @@
|
|||
// SPI pin mappings for LPC11CXX
|
||||
// This should be included ONLY from spi_api.c
|
||||
|
||||
#ifndef SPI_PINMAP_H
|
||||
#define SPI_PINMAP_H
|
||||
|
||||
static const PinMap PinMap_SPI_SCLK[] = {
|
||||
{P0_6 , SPI_0, 0x02},
|
||||
{P0_10, SPI_0, 0x02},
|
||||
{P2_11, SPI_0, 0x01},
|
||||
{P2_1 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MOSI[] = {
|
||||
{P0_9 , SPI_0, 0x01},
|
||||
{P2_3 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MISO[] = {
|
||||
{P0_8 , SPI_0, 0x01},
|
||||
{P2_2 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_SSEL[] = {
|
||||
{P0_2 , SPI_0, 0x01},
|
||||
{P2_0 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// SPI pin mappings for LPC11XX
|
||||
// This should be included ONLY from spi_api.c
|
||||
|
||||
#ifndef SPI_PINMAP_H
|
||||
#define SPI_PINMAP_H
|
||||
|
||||
static const PinMap PinMap_SPI_SCLK[] = {
|
||||
{P0_6 , SPI_0, 0x02},
|
||||
{P2_11, SPI_0, 0x01},
|
||||
{P2_1 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MOSI[] = {
|
||||
{P0_9 , SPI_0, 0x01},
|
||||
{P2_3 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MISO[] = {
|
||||
{P0_8 , SPI_0, 0x01},
|
||||
{P2_2 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_SSEL[] = {
|
||||
{P0_2 , SPI_0, 0x01},
|
||||
{P2_0 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -19,7 +19,31 @@
|
|||
#include "pinmap.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "spi_pinmap.h"
|
||||
static const PinMap PinMap_SPI_SCLK[] = {
|
||||
{P0_6 , SPI_0, 0x02},
|
||||
// {P0_10, SPI_0, 0x02}, -- should be mapped to SWCLK only
|
||||
{P2_11, SPI_0, 0x01},
|
||||
{P2_1 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MOSI[] = {
|
||||
{P0_9 , SPI_0, 0x01},
|
||||
{P2_3 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_MISO[] = {
|
||||
{P0_8 , SPI_0, 0x01},
|
||||
{P2_2 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static const PinMap PinMap_SPI_SSEL[] = {
|
||||
{P0_2 , SPI_0, 0x01},
|
||||
{P2_0 , SPI_1, 0x02},
|
||||
{NC , NC , 0}
|
||||
};
|
||||
|
||||
static inline int ssp_disable(spi_t *obj);
|
||||
static inline int ssp_enable(spi_t *obj);
|
||||
|
|
|
|||
Loading…
Reference in New Issue