aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/LPC13xx/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-28 18:39:40 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-28 18:39:40 +0000
commit3ea83706512a5051a185ac8ec4ba0094290a217d (patch)
treef252f07fed2ccf821729d9ec595695b90fb58f65 /os/hal/platforms/LPC13xx/spi_lld.c
parent29a259ba43607142487a0bceb8adf31d76286770 (diff)
downloadChibiOS-3ea83706512a5051a185ac8ec4ba0094290a217d.tar.gz
ChibiOS-3ea83706512a5051a185ac8ec4ba0094290a217d.tar.bz2
ChibiOS-3ea83706512a5051a185ac8ec4ba0094290a217d.zip
LPC13xx SPI driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2300 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 299e394bd..d9b8ef06f 100644
--- a/os/hal/platforms/LPC13xx/spi_lld.c
+++ b/os/hal/platforms/LPC13xx/spi_lld.c
@@ -120,7 +120,7 @@ static void spi_serve_interrupt(SPIDriver *spip) {
*
* @isr
*/
-CH_IRQ_HANDLER(Vector90) {
+CH_IRQ_HANDLER(VectorF4) {
CH_IRQ_PROLOGUE();
@@ -143,8 +143,8 @@ void spi_lld_init(void) {
#if LPC13xx_SPI_USE_SSP0
spiObjectInit(&SPID1);
- SPID1.spd_ssp = LPC_SSP0;
- LPC_IOCON->SCK_LOC = LPC13xx_SPI_SCK0_SELECTOR;
+ SPID1.spd_ssp = LPC_SSP;
+ LPC_IOCON->SCKLOC = LPC13xx_SPI_SCK0_SELECTOR;
#if LPC13xx_SPI_SCK0_SELECTOR == SCK0_IS_PIO0_10
LPC_IOCON->JTAG_TCK_PIO0_10 = 0xC2; /* SCK0 without resistors. */
#elif LPC13xx_SPI_SCK0_SELECTOR == SCK0_IS_PIO2_11
@@ -170,10 +170,10 @@ void spi_lld_start(SPIDriver *spip) {
/* Clock activation.*/
#if LPC13xx_SPI_USE_SSP0
if (&SPID1 == spip) {
- LPC_SYSCON->SSP0CLKDIV = LPC13xx_SPI_SSP0CLKDIV;
+ LPC_SYSCON->SSPCLKDIV = LPC13xx_SPI_SSP0CLKDIV;
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 11);
LPC_SYSCON->PRESETCTRL |= 1;
- NVICEnableVector(SSP0_IRQn,
+ NVICEnableVector(SSP_IRQn,
CORTEX_PRIORITY_MASK(LPC13xx_SPI_SSP0_IRQ_PRIORITY));
}
#endif
@@ -200,8 +200,8 @@ void spi_lld_stop(SPIDriver *spip) {
if (&SPID1 == spip) {
LPC_SYSCON->PRESETCTRL &= ~1;
LPC_SYSCON->SYSAHBCLKCTRL &= ~(1 << 11);
- LPC_SYSCON->SSP0CLKDIV = 0;
- NVICDisableVector(SSP0_IRQn);
+ LPC_SYSCON->SSPCLKDIV = 0;
+ NVICDisableVector(SSP_IRQn);
return;
}
#endif