git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2298 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2010-10-27 20:52:43 +00:00
parent af2c001a10
commit ba10e94273
1 changed files with 1 additions and 48 deletions

View File

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