summaryrefslogtreecommitdiff
path: root/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-17 16:16:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-17 16:16:28 +0000
commitbdb3910fa1833282629470e039fe665fc0030527 (patch)
treea2afd3e989c74126e10f2046f268d508529caf7e /nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c
parent2b6d345ad32878d743958ce72ddb408469b8d3a1 (diff)
downloadpx4-nuttx-bdb3910fa1833282629470e039fe665fc0030527.tar.gz
px4-nuttx-bdb3910fa1833282629470e039fe665fc0030527.tar.bz2
px4-nuttx-bdb3910fa1833282629470e039fe665fc0030527.zip
Add support for LPCXpresso OLED
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3518 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c')
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c
index b15d97358..6c81c7a0d 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c
@@ -115,6 +115,14 @@ void weak_function lpc17_sspinitialize(void)
#ifdef CONFIG_LPC17_SSP1
(void)lpc17_configgpio(LPCXPRESSO_SD_CS);
(void)lpc17_configgpio(LPCXPRESSO_SD_CD);
+
+ /* Configure chip select for the OLED. For the SPI interface, insert jumpers in
+ * J42, J43, J45 pin1-2 and J46 pin 1-2.
+ */
+
+#ifdef CONFIG_NX_LCDDRIVER
+ (void)lpc17_configgpio(LPCXPRESSO_OLED_CS);
+#endif
#endif
ssp_dumpgpio("lpc17_sspinitialize() Exit");
@@ -175,7 +183,14 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
(void)lpc17_gpiowrite(LPCXPRESSO_SD_CS, !selected);
}
+#ifdef CONFIG_NX_LCDDRIVER
+ else if (devid == SPIDEV_DISPLAY)
+ {
+ /* Assert the CS pin to the OLED display */
+ (void)lpc17_gpiowrite(LPCXPRESSO_OLED_CS, !selected);
+ }
+#endif
ssp_dumpgpio("lpc17_spi1select() Exit");
}