From 788541aecf42deb34d49792c673fbf0b4cb35836 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 28 Dec 2014 16:55:47 -0600 Subject: [PATCH] Tiva SSI: Fix some recent breakage to the Tiva SSI driver for the case where only one SSI modules is enabled --- arch/arm/src/tiva/tiva_ssi.c | 20 ++++++++++++++++++++ configs/lm4f120-launchpad/src/lm4f_boot.c | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/tiva/tiva_ssi.c b/arch/arm/src/tiva/tiva_ssi.c index df02398220..8cd858290d 100644 --- a/arch/arm/src/tiva/tiva_ssi.c +++ b/arch/arm/src/tiva/tiva_ssi.c @@ -137,6 +137,26 @@ #if NSSI_ENABLED > 0 +/* Some special definitions if there is exactly one interface enabled */ + +#if NSSI_ENABLED < 2 +# if defined(CONFIG_TIVA_SSI0) +# define SSI_BASE TIVA_SSI0_BASE +# define SSI_IRQ TIVA_IRQ_SSI0 +# elif defined(CONFIG_TIVA_SSI0) +# define SSI_BASE TIVA_SSI1_BASE +# define SSI_IRQ TIVA_IRQ_SSI1 +# elif defined(CONFIG_TIVA_SSI0) +# define SSI_BASE TIVA_SSI2_BASE +# define SSI_IRQ TIVA_IRQ_SSI2 +# elif defined(CONFIG_TIVA_SSI0) +# define SSI_BASE TIVA_SSI3_BASE +# define SSI_IRQ TIVA_IRQ_SSI3 +# else +# error Help me... I am confused +# endif +#endif + /* The number of (16-bit) words that will fit in the Tx FIFO */ #define TIVA_TXFIFO_WORDS 8 diff --git a/configs/lm4f120-launchpad/src/lm4f_boot.c b/configs/lm4f120-launchpad/src/lm4f_boot.c index 73d0acdcbb..41f7d05d8e 100644 --- a/configs/lm4f120-launchpad/src/lm4f_boot.c +++ b/configs/lm4f120-launchpad/src/lm4f_boot.c @@ -49,7 +49,7 @@ #include "lmf4120-launchpad.h" /************************************************************************************ - * Definitions + * Pre-processor Definitions ************************************************************************************/ /************************************************************************************ @@ -65,7 +65,7 @@ * * Description: * All Stellaris architectures must provide the following entry point. This entry - * point is called early in the intitialization -- after all memory has been + * point is called early in the initialization -- after all memory has been * configured and mapped but before any devices have been initialized. * ************************************************************************************/