diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-17 16:16:28 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-17 16:16:28 +0000 |
commit | bdb3910fa1833282629470e039fe665fc0030527 (patch) | |
tree | a2afd3e989c74126e10f2046f268d508529caf7e /nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c | |
parent | 2b6d345ad32878d743958ce72ddb408469b8d3a1 (diff) | |
download | px4-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-x | nuttx/configs/lpcxpresso-lpc1768/src/up_ssp.c | 15 |
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"); } |