aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/LPC13xx/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-20 08:37:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-20 08:37:29 +0000
commit9be1c67db2a0004db4458d0b5fa7fd31c1868a34 (patch)
treecdc421624b9ccd7ddec69c043b57fdab884b224f /os/hal/platforms/LPC13xx/spi_lld.c
parent73a2000ab2ca1c8a275ee82259d118b8d18dfed9 (diff)
downloadChibiOS-9be1c67db2a0004db4458d0b5fa7fd31c1868a34.tar.gz
ChibiOS-9be1c67db2a0004db4458d0b5fa7fd31c1868a34.tar.bz2
ChibiOS-9be1c67db2a0004db4458d0b5fa7fd31c1868a34.zip
New NXP headers.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4219 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/LPC13xx/spi_lld.c')
-rw-r--r--os/hal/platforms/LPC13xx/spi_lld.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/os/hal/platforms/LPC13xx/spi_lld.c b/os/hal/platforms/LPC13xx/spi_lld.c
index 27da2592e..c158fee2a 100644
--- a/os/hal/platforms/LPC13xx/spi_lld.c
+++ b/os/hal/platforms/LPC13xx/spi_lld.c
@@ -156,10 +156,10 @@ void spi_lld_init(void) {
#if LPC13xx_SPI_USE_SSP0
spiObjectInit(&SPID1);
- SPID1.ssp = LPC_SSP;
- LPC_IOCON->SCKLOC = LPC13xx_SPI_SCK0_SELECTOR;
+ SPID1.ssp = LPC_SSP0;
+ LPC_IOCON->SCK_LOC = LPC13xx_SPI_SCK0_SELECTOR;
#if LPC13xx_SPI_SCK0_SELECTOR == SCK0_IS_PIO0_10
- LPC_IOCON->JTAG_TCK_PIO0_10 = 0xC2; /* SCK0 without resistors. */
+ LPC_IOCON->SWCLK_PIO0_10 = 0xC2; /* SCK0 without resistors. */
#elif LPC13xx_SPI_SCK0_SELECTOR == SCK0_IS_PIO2_11
LPC_IOCON->PIO2_11 = 0xC1; /* SCK0 without resistors. */
#else /* LPC13xx_SPI_SCK0_SELECTOR == SCK0_IS_PIO0_6 */
@@ -183,10 +183,10 @@ void spi_lld_start(SPIDriver *spip) {
/* Clock activation.*/
#if LPC13xx_SPI_USE_SSP0
if (&SPID1 == spip) {
- LPC_SYSCON->SSPCLKDIV = LPC13xx_SPI_SSP0CLKDIV;
+ LPC_SYSCON->SSP0CLKDIV = LPC13xx_SPI_SSP0CLKDIV;
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 11);
LPC_SYSCON->PRESETCTRL |= 1;
- nvicEnableVector(SSP_IRQn,
+ nvicEnableVector(SSP0_IRQn,
CORTEX_PRIORITY_MASK(LPC13xx_SPI_SSP0_IRQ_PRIORITY));
}
#endif
@@ -216,8 +216,8 @@ void spi_lld_stop(SPIDriver *spip) {
if (&SPID1 == spip) {
LPC_SYSCON->PRESETCTRL &= ~1;
LPC_SYSCON->SYSAHBCLKCTRL &= ~(1 << 11);
- LPC_SYSCON->SSPCLKDIV = 0;
- nvicDisableVector(SSP_IRQn);
+ LPC_SYSCON->SSP0CLKDIV = 0;
+ nvicDisableVector(SSP0_IRQn);
}
#endif
}