In progress changes for OLED display work

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2669 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2010-05-15 01:15:52 +00:00
parent 0e8a67f9f9
commit 28dc6e461d
18 changed files with 465 additions and 54 deletions
-3
View File
@@ -50,9 +50,6 @@
/* ENC28J60 Configuration Settings:
*
* CONFIG_NET_ENC28J60 - Enabled ENC28J60 support
* CONFIG_ENC28J60_OWNBUS - Set if the ENC28J60 is the only active device on
* the SPI bus. No locking or SPI configuration will be performed. All
* transfers will be performed from the ENC2J60 interrupt handler.
* CONFIG_ENC28J60_SPIMODE - Controls the SPI mode
* CONFIG_ENC28J60_FREQUENCY - Define to use a different bus frequency
* CONFIG_ENC28J60_NINTERFACES - Specifies the number of physical ENC28J60
+8 -3
View File
@@ -1,5 +1,6 @@
/****************************************************************************
* include/nuttx/p14201.h
* Application interface to the RiT P14201 OLED driver
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -49,13 +50,17 @@
/* P14201 Configuration Settings:
*
* CONFIG_LCD_P14201 - Enable P14201 support
* CONFIG_P14201_OWNBUS - Set if the P14201 is the only active device on the SPI bus.
* No locking or SPI configuration will be performed. All transfers will be performed
* from the ENC2J60 interrupt handler.
* 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 functioned. 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.
*
* Required LCD driver settings:
* CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+17 -2
View File
@@ -50,7 +50,16 @@
* Pre-processor Definitions
****************************************************************************/
/* Access macros */
/* Configuration ************************************************************/
/* CONFIG_SPI_OWNBUS - Set if there is only one active device on the SPI bus.
* No locking or SPI configuration will be performed. It is not necessary
* for clients to lock, re-configure, etc..
* CONFIG_SPI_EXCHANGE - Driver supports a single exchange method
* (vs a recvblock() and sndblock ()methods).
*/
/* Access macros ************************************************************/
/****************************************************************************
* Name: SPI_LOCK
@@ -73,7 +82,11 @@
*
****************************************************************************/
#define SPI_LOCK(d,l) ((d)->ops->lock ? (d)->ops->lock(d,l) : OK)
#ifndef CONFIG_SPI_OWNBUS
# define SPI_LOCK(d,l) (d)->ops->lock(d,l)
#else
# define SPI_LOCK(d,l)
#endif
/****************************************************************************
* Name: SPI_SELECT
@@ -326,7 +339,9 @@ enum spi_mode_e
struct spi_dev_s;
struct spi_ops_s
{
#ifndef CONFIG_SPI_OWNBUS
int (*lock)(FAR struct spi_dev_s *dev, bool lock);
#endif
void (*select)(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
bool selected);
uint32_t (*setfrequency)(FAR struct spi_dev_s *dev, uint32_t frequency);