summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-19 14:45:26 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-19 14:45:26 +0000
commitc79e92ceffd9665632b58a6fb884178a4f4c71a2 (patch)
tree3a9f58cf49adcd4cb4e19f29fa9de73dfd12cb16 /nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
parent18f9d0eaa3b20a4c3a11c9a3f4e60a150e11d69f (diff)
downloadpx4-nuttx-c79e92ceffd9665632b58a6fb884178a4f4c71a2.tar.gz
px4-nuttx-c79e92ceffd9665632b58a6fb884178a4f4c71a2.tar.bz2
px4-nuttx-c79e92ceffd9665632b58a6fb884178a4f4c71a2.zip
Add workaround for ADC errata from Chris Taglia
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5760 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx/lpc17_spi.c')
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_spi.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
index 05e791434..d87e6c1ec 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_spi.c
@@ -63,28 +63,35 @@
/****************************************************************************
* Definitions
****************************************************************************/
+/* Configuration ************************************************************/
+/* This driver does not support the SPI exchange method. */
-/* Enables debug output from this file (needs CONFIG_DEBUG too) */
+#ifdef CONFIG_SPI_EXCHANGE
+# error "CONFIG_SPI_EXCHANGE must not be defined in the configuration"
+#endif
-#undef SPI_DEBUG /* Define to enable debug */
-#undef SPI_VERBOSE /* Define to enable verbose debug */
+/* Debug ********************************************************************/
+/* The following enable debug output from this file:
+ *
+ * CONFIG_DEBUG - Define to enable general debug features
+ * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG)
+ * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug
+ */
-#ifdef SPI_DEBUG
+#ifdef CONFIG_DEBUG_SPI
# define spidbg lldbg
-# ifdef SPI_VERBOSE
+# ifdef CONFIG_DEBUG_VERBOSE
# define spivdbg lldbg
# else
# define spivdbg(x...)
# endif
#else
-# undef SPI_VERBOSE
# define spidbg(x...)
# define spivdbg(x...)
#endif
-/* SPI Clocking.
- *
- * The CPU clock by 1, 2, 4, or 8 to get the SPI peripheral clock (SPI_CLOCK).
+/* SSP Clocking *************************************************************/
+/* The CPU clock by 1, 2, 4, or 8 to get the SPI peripheral clock (SPI_CLOCK).
* SPI_CLOCK may be further divided by 8-254 to get the SPI clock. If we
* want a usable range of 4KHz to 25MHz for the SPI, then:
*