Move spi_pinmap.h to LPC11XX_11CXX common

Merge back into spi_api.c. P0_10/SPI_0 (SWCLK) now disabled for both targets
pull/79/head
Joris Aerts 2013-09-27 19:10:08 -07:00
parent e9f5c8d3ca
commit e1967755a5
3 changed files with 25 additions and 68 deletions

View File

@ -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

View File

@ -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

View File

@ -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);