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

This commit is contained in:
gdisirio 2010-10-24 14:29:19 +00:00
parent 737df89c45
commit 9e3a47bcf0
1 changed files with 4 additions and 4 deletions

View File

@ -171,7 +171,7 @@ void spi_lld_start(SPIDriver *spip) {
#endif
}
/* Configuration.*/
SSPBase->SSP_CR1 = 0;
spip->spd_ssp->SSP_CR1 = 0;
/* Emptying the receive FIFO, it happens to not be empty while debugging.*/
while (spip->spd_ssp->SSP_SR & SR_RNE)
(void) spip->spd_ssp->SSP_DR;
@ -197,9 +197,9 @@ void spi_lld_stop(SPIDriver *spip) {
VICIntEnClear = INTMASK(SOURCE_SPI1);
}
#endif
SSPBase->SSP_CR1 = 0;
SSPBase->SSP_CR0 = 0;
SSPBase->SSP_CPSR = 0;
spip->spd_ssp->SSP_CR1 = 0;
spip->spd_ssp->SSP_CR0 = 0;
spip->spd_ssp->SSP_CPSR = 0;
PCONP &= ~PCSPI1;
}
}