Refresh/fix some more LPC17xx configurations

This commit is contained in:
Gregory Nutt
2015-07-01 11:43:06 -06:00
parent 799205d59b
commit 4b97a5314c
8 changed files with 996 additions and 644 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -47,6 +47,8 @@
#include <nuttx/spi/spi.h>
#include <nuttx/mmcsd.h>
#include "lpc17_ssp.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -92,8 +92,8 @@
* Private Data
****************************************************************************/
FAR struct spi_dev_s *spi;
FAR struct lcd_dev_s *dev;
FAR struct spi_dev_s *g_spidev;
FAR struct lcd_dev_s *g_lcddev;
/****************************************************************************
* Private Functions
@@ -115,8 +115,8 @@ int board_lcd_initialize(void)
lpc17_gpiowrite(ZKITARM_OLED_RS, 1);
zkit_sspinitialize();
spi = lpc17_sspinitialize(0);
if (!spi)
g_spidev = lpc17_sspinitialize(0);
if (!g_spidev)
{
glldbg("Failed to initialize SSP port 0\n");
return 0;
@@ -134,8 +134,8 @@ int board_lcd_initialize(void)
FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
{
dev = st7567_initialize(spi, lcddev);
if (!dev)
g_lcddev = st7567_initialize(g_spidev, lcddev);
if (!g_lcddev)
{
glldbg("Failed to bind SSI port 0 to OLCD %d: %d\n", lcddev);
}
@@ -144,8 +144,8 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev)
gllvdbg("Bound SSI port 0 to OLCD %d\n", lcddev);
/* And turn the OLCD on (CONFIG_LCD_MAXPOWER should be 1) */
(void)dev->setpower(dev, CONFIG_LCD_MAXPOWER);
return dev;
(void)g_lcddev->setpower(g_lcddev, CONFIG_LCD_MAXPOWER);
return g_lcddev;
}
return NULL;
+1 -1
View File
@@ -82,7 +82,7 @@
* Private Data
****************************************************************************/
/* LED definitions ******************************************************************
/* LED definitions **********************************************************/
/* The ZKit-ARM-1769 has 2 LEDs along the bottom of the board. Red or off.
* If CONFIG_ARCH_LEDS is defined, the LEDs will be controlled as follows for NuttX