aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/LPC13xx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-27 20:52:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-27 20:52:43 +0000
commitba10e94273f476350209e888d25350299802f5e1 (patch)
treeb993d4ff7a56e2d715aab71473878d8374786f18 /os/hal/platforms/LPC13xx
parentaf2c001a10015894ee2bb76cbe8f9ed306aaeffe (diff)
downloadChibiOS-ba10e94273f476350209e888d25350299802f5e1.tar.gz
ChibiOS-ba10e94273f476350209e888d25350299802f5e1.tar.bz2
ChibiOS-ba10e94273f476350209e888d25350299802f5e1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2298 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/LPC13xx')
-rw-r--r--os/hal/platforms/LPC13xx/spi_lld.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/os/hal/platforms/LPC13xx/spi_lld.c b/os/hal/platforms/LPC13xx/spi_lld.c
index 269b80346..65e69ce1c 100644
--- a/os/hal/platforms/LPC13xx/spi_lld.c
+++ b/os/hal/platforms/LPC13xx/spi_lld.c
@@ -39,11 +39,6 @@
SPIDriver SPID1;
#endif
-#if LPC13xx_SPI_USE_SSP1 || defined(__DOXYGEN__)
-/** @brief SPI2 driver identifier.*/
-SPIDriver SPID2;
-#endif
-
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
@@ -135,22 +130,6 @@ CH_IRQ_HANDLER(Vector90) {
}
#endif
-#if LPC13xx_SPI_USE_SSP1 || defined(__DOXYGEN__)
-/**
- * @brief SSP1 interrupt handler.
- *
- * @isr
- */
-CH_IRQ_HANDLER(Vector78) {
-
- CH_IRQ_PROLOGUE();
-
- spi_serve_interrupt(&SPID2);
-
- CH_IRQ_EPILOGUE();
-}
-#endif
-
/*===========================================================================*/
/* Driver exported functions. */
/*===========================================================================*/
@@ -161,7 +140,7 @@ CH_IRQ_HANDLER(Vector78) {
* @notapi
*/
void spi_lld_init(void) {
-
+************************************************************
#if LPC13xx_SPI_USE_SSP0
spiObjectInit(&SPID1);
SPID1.spd_ssp = LPC_SSP0;
@@ -176,14 +155,6 @@ void spi_lld_init(void) {
LPC_IOCON->PIO0_8 = 0xC1; /* MISO0 without resistors. */
LPC_IOCON->PIO0_9 = 0xC1; /* MOSI0 without resistors. */
#endif /* LPC13xx_SPI_USE_SSP0 */
-
-#if LPC13xx_SPI_USE_SSP1
- spiObjectInit(&SPID2);
- SPID2.spd_ssp = LPC_SSP1;
- LPC_IOCON->PIO2_1 = 0xC2; /* SCK1 without resistors. */
- LPC_IOCON->PIO2_2 = 0xC2; /* MISO1 without resistors. */
- LPC_IOCON->PIO2_3 = 0xC2; /* MOSI1 without resistors. */
-#endif /* LPC13xx_SPI_USE_SSP0 */
}
/**
@@ -206,15 +177,6 @@ void spi_lld_start(SPIDriver *spip) {
CORTEX_PRIORITY_MASK(LPC13xx_SPI_SSP0_IRQ_PRIORITY));
}
#endif
-#if LPC13xx_SPI_USE_SSP1
- if (&SPID2 == spip) {
- LPC_SYSCON->SSP1CLKDIV = LPC13xx_SPI_SSP1CLKDIV;
- LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 18);
- LPC_SYSCON->PRESETCTRL |= 4;
- NVICEnableVector(SSP1_IRQn,
- CORTEX_PRIORITY_MASK(LPC13xx_SPI_SSP1_IRQ_PRIORITY));
- }
-#endif
}
/* Configuration.*/
spip->spd_ssp->CR1 = 0;
@@ -243,15 +205,6 @@ void spi_lld_stop(SPIDriver *spip) {
return;
}
#endif
-#if LPC13xx_SPI_USE_SSP1
- if (&SPID2 == spip) {
- LPC_SYSCON->PRESETCTRL &= ~4;
- LPC_SYSCON->SYSAHBCLKCTRL &= ~(1 << 18);
- LPC_SYSCON->SSP1CLKDIV = 0;
- NVICDisableVector(SSP1_IRQn);
- return;
- }
-#endif
spip->spd_ssp->CR1 = 0;
spip->spd_ssp->CR0 = 0;
spip->spd_ssp->CPSR = 0;