From 42c9324644bae179338238f933f5d0a776601d38 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 30 Nov 2010 01:55:22 +0000 Subject: [PATCH] Debuggin SPI-based MicroSD card git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3147 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/lpc17xx/lpc17_ssp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_ssp.c b/arch/arm/src/lpc17xx/lpc17_ssp.c index a148fe8c99..e0331f09ea 100755 --- a/arch/arm/src/lpc17xx/lpc17_ssp.c +++ b/arch/arm/src/lpc17xx/lpc17_ssp.c @@ -65,20 +65,21 @@ * Definitions ****************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ +/* The following enable debug output from this file (needs CONFIG_DEBUG too). + * + * CONFIG_SSP_DEBUG - Define to enable basic SSP debug + * CONFIG_SSP_VERBOSE - Define to enable verbose SSP debug + */ -#undef SSP_DEBUG /* Define to enable debug */ -#undef SSP_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSP_DEBUG +#ifdef CONFIG_SSP_DEBUG # define sspdbg lldbg -# ifdef SSP_VERBOSE +# ifdef CONFIG_SSP_VERBOSE # define spivdbg lldbg # else # define spivdbg(x...) # endif #else -# undef SSP_VERBOSE +# undef CONFIG_SSP_VERBOSE # define sspdbg(x...) # define spivdbg(x...) #endif @@ -96,6 +97,10 @@ * use the CCLK undivided to get the SSP_CLOCK. */ +#if LPC17_CCLK > 100000000 +# error "CCLK <= 100,000,000 assumed" +#endif + #define SSP_PCLKSET_DIV SYSCON_PCLKSEL_CCLK #define SSP_CLOCK LPC17_CCLK