Finish framebuffer support

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2672 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-05-15 18:57:24 +00:00
parent f4376cd1ae
commit 703a73fe4f
5 changed files with 34 additions and 27 deletions

View File

@ -359,10 +359,11 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_P14201_FRAMEBUFFER - If defined, accesses will be performed
using an in-memory copy of the OLEDs GDDRAM. This cost of this
buffer is 128 * 96 / 2 = 6Kb. If this is defined, then the driver
will be fully functioned. If not, then it will have the following
will be fully functional. If not, then it will have the following
limitations:
- Reading graphics memory cannot be supported, and
- All pixel writes must be aligned to byte boundaries.
The latter limitation effectively reduces the 128x96 disply to 64x96.
ENC28J60 Ethernet Driver Configuration Settings:
CONFIG_NET_ENC28J60 - Enabled ENC28J60 support

View File

@ -576,6 +576,27 @@ CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
# RiT P14201 OLED Driver Configuration
#
# CONFIG_LCD_P14201 - Enable P14201 support
# CONFIG_P14201_SPIMODE - Controls the SPI mode
# CONFIG_P14201_FREQUENCY - Define to use a different bus frequency
# CONFIG_P14201_NINTERFACES - Specifies the number of physical P14201 devices that
# will be supported.
# CONFIG_P14201_FRAMEBUFFER - If defined, accesses will be performed using an in-memory
# copy of the OLEDs GDDRAM. This cost of this buffer is 128 * 96 / 2 = 6Kb. If this
# is defined, then the driver will be fully functional. If not, then it will have the
# following limitations:
# - Reading graphics memory cannot be supported, and
# - All pixel writes must be aligned to byte boundaries.
#
# The latter limitation effectively reduces the 128x96 disply to 64x96.
CONFIG_LCD_P14201=y
CONFIG_P14201_SPIMODE=0
CONFIG_P14201_FREQUENCY=20000000
CONFIG_P14201_NINTERFACES=1
CONFIG_P14201_FRAMEBUFFER=y
#
# Settings for examples/uip
#
@ -708,6 +729,7 @@ CONFIG_EXAMPLES_NX_STACKSIZE=2048
CONFIG_EXAMPLES_NX_CLIENTPRIO=80
CONFIG_EXAMPLES_NX_SERVERPRIO=120
CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4
CONFIG_EXAMPLES_NX_EXTERNINIT=y
#
# Stack and heap information

View File

@ -126,18 +126,6 @@
extern void weak_function lm3s_ssiinitialize(void);
/************************************************************************************
* Name: lm3s_oledinitialize
*
* Description:
* Called to configure OLED.
*
************************************************************************************/
#ifdef CONFIG_NX_LCDDRIVER
extern void lm3s_oledinitialize(void);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */

View File

@ -81,12 +81,6 @@ void lm3s_boardinitialize(void)
{
lm3s_ssiinitialize();
}
/* Configure the OLED for use */
#ifdef CONFIG_NX_LCDDRIVER
lm3s_oledinitialize();
#endif
#endif
/* Configure on-board LEDs if LED support has been selected. */

View File

@ -59,17 +59,17 @@
****************************************************************************/
/************************************************************************************
* Name: lm3s_oledinitialize
* Name: up_nxdrvinit
*
* Description:
* Called to configure OLED.
* Called NX initialization logic to configure the OLED.
*
************************************************************************************/
void lm3s_oledinitialize(void)
FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
{
FAR struct spi_dev_s *spi;
int ret;
FAR struct lcd_dev_s *dev;
/* Configure the OLED D/Cn GPIO */
@ -86,16 +86,18 @@ void lm3s_oledinitialize(void)
{
/* Bind the SPI port to the OLED */
ret = rit_initialize(spi, 0);
if (ret < 0)
dev = rit_initialize(spi, devno);
if (!dev)
{
glldbg("Failed to bind SPI port 0 to OLED: %d\n", ret);
glldbg("Failed to bind SPI port 0 to OLED %d: %d\n", ret, devno);
}
else
{
gllvdbg("Bound SPI port 0 to OLED\n");
gllvdbg("Bound SPI port 0 to OLED %d\n", devno);
return dev;
}
}
return NULL;
}
/**************************************************************************************