aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-24 17:50:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-24 17:50:55 +0000
commitd39721a6c2f050afe76421cf7409fc3e1803d154 (patch)
tree604de1a12a70102f8f9aef177dc7e261c12299ce /os
parent02caf0b18749c1780c787fad81ad08f8c4ec5a79 (diff)
downloadChibiOS-d39721a6c2f050afe76421cf7409fc3e1803d154.tar.gz
ChibiOS-d39721a6c2f050afe76421cf7409fc3e1803d154.tar.bz2
ChibiOS-d39721a6c2f050afe76421cf7409fc3e1803d154.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2284 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/LPC11xx/spi_lld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/platforms/LPC11xx/spi_lld.c b/os/hal/platforms/LPC11xx/spi_lld.c
index 50cd0c1ef..50f9903ae 100644
--- a/os/hal/platforms/LPC11xx/spi_lld.c
+++ b/os/hal/platforms/LPC11xx/spi_lld.c
@@ -199,16 +199,16 @@ void spi_lld_start(SPIDriver *spip) {
/* Clock activation.*/
#if LPC11xx_SPI_USE_SSP0
if (&SPID1 == spip) {
- LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 11);
LPC_SYSCON->SSP0CLKDIV = LPC11xx_SPI_SSP0CLKDIV;
+ LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 11);
NVICEnableVector(SSP0_IRQn,
CORTEX_PRIORITY_MASK(LPC11xx_SPI_SSP0_IRQ_PRIORITY));
}
#endif
#if LPC11xx_SPI_USE_SSP1
if (&SPID2 == spip) {
- LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 18);
LPC_SYSCON->SSP1CLKDIV = LPC11xx_SPI_SSP1CLKDIV;
+ LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 18);
NVICEnableVector(SSP1_IRQn,
CORTEX_PRIORITY_MASK(LPC11xx_SPI_SSP1_IRQ_PRIORITY));
}
@@ -237,16 +237,16 @@ void spi_lld_stop(SPIDriver *spip) {
if (spip->spd_state != SPI_STOP) {
#if LPC11xx_SPI_USE_SSP0
if (&SPID1 == spip) {
- LPC_SYSCON->SSP0CLKDIV = 0;
LPC_SYSCON->SYSAHBCLKCTRL &= ~(1 << 11);
+ LPC_SYSCON->SSP0CLKDIV = 0;
NVICDisableVector(SSP0_IRQn);
return;
}
#endif
#if LPC11xx_SPI_USE_SSP1
if (&SPID2 == spip) {
- LPC_SYSCON->SSP1CLKDIV = 0;
LPC_SYSCON->SYSAHBCLKCTRL &= ~(1 << 18);
+ LPC_SYSCON->SSP1CLKDIV = 0;
NVICDisableVector(SSP1_IRQn);
return;
}