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 */ } /** @@ -205,15 +176,6 @@ void spi_lld_start(SPIDriver *spip) { NVICEnableVector(SSP0_IRQn, 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.*/ @@ -242,15 +204,6 @@ void spi_lld_stop(SPIDriver *spip) { NVICDisableVector(SSP0_IRQn); 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;