2010-05-11 04:40:10 +02:00
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* drivers/lcd/skeleton.c
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
2015-02-13 13:13:34 +01:00
|
|
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
2012-09-13 20:32:24 +02:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Included Files
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
#include <nuttx/arch.h>
|
2013-07-01 16:11:54 +02:00
|
|
|
#include <nuttx/spi/spi.h>
|
2010-12-04 02:56:50 +01:00
|
|
|
#include <nuttx/lcd/lcd.h>
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
#include "up_arch.h"
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/* Configuration **********************************************************************/
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Verify that all configuration requirements have been met */
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2011-07-05 22:15:48 +02:00
|
|
|
/* Debug ******************************************************************************/
|
2010-05-11 04:40:10 +02:00
|
|
|
/* Define the following to enable register-level debug output */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
#undef CONFIG_LCD_SKELDEBUG
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
/* Verbose debug must also be enabled */
|
|
|
|
|
|
|
|
#ifndef CONFIG_DEBUG
|
|
|
|
# undef CONFIG_DEBUG_VERBOSE
|
|
|
|
# undef CONFIG_DEBUG_GRAPHICS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_DEBUG_VERBOSE
|
2010-05-11 04:41:08 +02:00
|
|
|
# undef CONFIG_LCD_SKELDEBUG
|
2010-05-11 04:40:10 +02:00
|
|
|
#endif
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Color Properties *******************************************************************/
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Display Resolution */
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
#define SKEL_XRES 320
|
|
|
|
#define SKEL_YRES 240
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Color depth and format */
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
#define SKEL_BPP 16
|
|
|
|
#define SKEL_COLORFMT FB_FMT_RGB16_565
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Debug ******************************************************************************/
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
#ifdef CONFIG_LCD_SKELDEBUG
|
2014-05-22 17:01:51 +02:00
|
|
|
# define skeldbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
2010-05-11 04:40:10 +02:00
|
|
|
#else
|
2010-05-11 04:41:08 +02:00
|
|
|
# define skeldbg(x...)
|
2010-05-11 04:40:10 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Private Type Definition
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/* This structure describes the state of this driver */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
struct skel_dev_s
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
/* Publically visible device structure */
|
|
|
|
|
|
|
|
struct lcd_dev_s dev;
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Private LCD-specific information follows */
|
2010-05-11 04:40:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Private Function Protototypes
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/* LCD Data Transfer Methods */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
|
2010-05-11 04:40:10 +02:00
|
|
|
size_t npixels);
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
2010-05-11 04:40:10 +02:00
|
|
|
size_t npixels);
|
|
|
|
|
|
|
|
/* LCD Configuration */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getvideoinfo(FAR struct lcd_dev_s *dev,
|
2010-05-11 04:40:10 +02:00
|
|
|
FAR struct fb_videoinfo_s *vinfo);
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
2010-05-11 04:40:10 +02:00
|
|
|
FAR struct lcd_planeinfo_s *pinfo);
|
|
|
|
|
|
|
|
/* LCD RGB Mapping */
|
|
|
|
|
|
|
|
#ifdef CONFIG_FB_CMAP
|
|
|
|
# error "RGB color mapping not supported by this driver"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Cursor Controls */
|
|
|
|
|
|
|
|
#ifdef CONFIG_FB_HWCURSOR
|
|
|
|
# error "Cursor control not supported by this driver"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* LCD Specific Controls */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getpower(struct lcd_dev_s *dev);
|
|
|
|
static int skel_setpower(struct lcd_dev_s *dev, int power);
|
|
|
|
static int skel_getcontrast(struct lcd_dev_s *dev);
|
|
|
|
static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Private Data
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/* This is working memory allocated by the LCD driver for each LCD device
|
|
|
|
* and for each color plane. This memory will hold one raster line of data.
|
2010-05-11 05:55:28 +02:00
|
|
|
* The size of the allocated run buffer must therefore be at least
|
2010-05-11 04:40:10 +02:00
|
|
|
* (bpp * xres / 8). Actual alignment of the buffer must conform to the
|
|
|
|
* bitwidth of the underlying pixel type.
|
|
|
|
*
|
|
|
|
* If there are multiple planes, they may share the same working buffer
|
|
|
|
* because different planes will not be operate on concurrently. However,
|
|
|
|
* if there are multiple LCD devices, they must each have unique run buffers.
|
|
|
|
*/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static uint16_t g_runbuffer[SKEL_XRES];
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
/* This structure describes the overall LCD video controller */
|
|
|
|
|
|
|
|
static const struct fb_videoinfo_s g_videoinfo =
|
|
|
|
{
|
2010-05-11 04:41:08 +02:00
|
|
|
.fmt = SKEL_COLORFMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
|
|
|
|
.xres = SKEL_XRES, /* Horizontal resolution in pixel columns */
|
|
|
|
.yres = SKEL_YRES, /* Vertical resolution in pixel rows */
|
|
|
|
.nplanes = 1, /* Number of color planes supported */
|
2010-05-11 04:40:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* This is the standard, NuttX Plane information object */
|
|
|
|
|
2014-04-13 22:32:20 +02:00
|
|
|
static const struct lcd_planeinfo_s g_planeinfo =
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
2015-10-10 18:41:00 +02:00
|
|
|
.putrun = skel_putrun, /* Put a run into LCD memory */
|
|
|
|
.getrun = skel_getrun, /* Get a run from LCD memory */
|
|
|
|
.buffer = (FAR uint8_t *)g_runbuffer, /* Run scratch buffer */
|
|
|
|
.bpp = SKEL_BPP, /* Bits-per-pixel */
|
2010-05-11 04:40:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* This is the standard, NuttX LCD driver object */
|
|
|
|
|
2014-04-13 22:32:20 +02:00
|
|
|
static struct skel_dev_s g_lcddev =
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
.dev =
|
|
|
|
{
|
|
|
|
/* LCD Configuration */
|
2014-04-13 22:32:20 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
.getvideoinfo = skel_getvideoinfo,
|
|
|
|
.getplaneinfo = skel_getplaneinfo,
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
/* LCD RGB Mapping -- Not supported */
|
|
|
|
/* Cursor Controls -- Not supported */
|
|
|
|
|
|
|
|
/* LCD Specific Controls */
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
.getpower = skel_getpower,
|
|
|
|
.setpower = skel_setpower,
|
|
|
|
.getcontrast = skel_getcontrast,
|
|
|
|
.setcontrast = skel_setcontrast,
|
2010-05-11 04:40:10 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Private Functions
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_putrun
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This method can be used to write a partial raster line to the LCD:
|
|
|
|
*
|
|
|
|
* row - Starting row to write to (range: 0 <= row < yres)
|
|
|
|
* col - Starting column to write to (range: 0 <= col <= xres-npixels)
|
|
|
|
* buffer - The buffer containing the run to be written to the LCD
|
|
|
|
* npixels - The number of pixels to write to the LCD
|
|
|
|
* (range: 0 < npixels <= xres-col)
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
|
|
|
|
size_t npixels)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
|
|
|
|
|
|
|
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
|
|
|
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
|
|
|
|
|
|
|
/* Set up to write the run. */
|
|
|
|
|
|
|
|
/* Write the run to GRAM. */
|
2010-05-11 05:55:28 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 04:40:10 +02:00
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_getrun
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This method can be used to read a partial raster line from the LCD:
|
|
|
|
*
|
|
|
|
* row - Starting row to read from (range: 0 <= row < yres)
|
|
|
|
* col - Starting column to read read (range: 0 <= col <= xres-npixels)
|
|
|
|
* buffer - The buffer in which to return the run read from the LCD
|
|
|
|
* npixels - The number of pixels to read from the LCD
|
|
|
|
* (range: 0 < npixels <= xres-col)
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
|
|
|
size_t npixels)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
|
|
|
|
|
|
|
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
|
|
|
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
|
|
|
|
2011-07-05 22:15:48 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 05:55:28 +02:00
|
|
|
return -ENOSYS;
|
2010-05-11 04:40:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_getvideoinfo
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get information about the LCD video controller configuration.
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getvideoinfo(FAR struct lcd_dev_s *dev,
|
2010-05-11 04:40:10 +02:00
|
|
|
FAR struct fb_videoinfo_s *vinfo)
|
|
|
|
{
|
|
|
|
DEBUGASSERT(dev && vinfo);
|
|
|
|
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
|
|
|
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
|
|
|
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_getplaneinfo
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get information about the configuration of each LCD color plane.
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
2010-05-11 04:40:10 +02:00
|
|
|
FAR struct lcd_planeinfo_s *pinfo)
|
|
|
|
{
|
|
|
|
DEBUGASSERT(dev && pinfo && planeno == 0);
|
|
|
|
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
|
|
|
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_getpower
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2011-04-18 19:16:24 +02:00
|
|
|
* Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on). On
|
2010-05-11 04:40:10 +02:00
|
|
|
* backlit LCDs, this setting may correspond to the backlight setting.
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getpower(struct lcd_dev_s *dev)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
2010-05-11 04:41:08 +02:00
|
|
|
struct skel_dev_s *priv = (struct skel_dev_s *)dev;
|
|
|
|
gvdbg("power: %d\n", 0);
|
2011-07-05 22:15:48 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 04:41:08 +02:00
|
|
|
return 0;
|
2010-05-11 04:40:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_setpower
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2010-05-11 04:41:08 +02:00
|
|
|
* Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). On
|
2010-05-11 04:40:10 +02:00
|
|
|
* backlit LCDs, this setting may correspond to the backlight setting.
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_setpower(struct lcd_dev_s *dev, int power)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
2010-05-11 04:41:08 +02:00
|
|
|
struct skel_dev_s *priv = (struct skel_dev_s *)dev;
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
gvdbg("power: %d\n", power);
|
|
|
|
DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER);
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Set new power level */
|
2011-07-05 22:15:48 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 04:40:10 +02:00
|
|
|
|
|
|
|
return OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 04:41:08 +02:00
|
|
|
* Name: skel_getcontrast
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Get the current contrast setting (0-CONFIG_LCD_MAXCONTRAST).
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_getcontrast(struct lcd_dev_s *dev)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
gvdbg("Not implemented\n");
|
2011-07-05 22:15:48 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 04:40:10 +02:00
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-12 05:08:26 +02:00
|
|
|
* Name: skel_setcontrast
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST).
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
gvdbg("contrast: %d\n", contrast);
|
2011-07-05 22:15:48 +02:00
|
|
|
#warning "Missing logic"
|
2010-05-11 04:40:10 +02:00
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************************
|
|
|
|
* Public Functions
|
|
|
|
**************************************************************************************/
|
|
|
|
|
|
|
|
/**************************************************************************************
|
2010-05-11 05:55:28 +02:00
|
|
|
* Name: up_oledinitialize
|
2010-05-11 04:40:10 +02:00
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize the LCD video hardware. The initial state of the LCD is fully
|
|
|
|
* initialized, display memory cleared, and the LCD ready to use, but with the power
|
|
|
|
* setting at 0 (full off).
|
|
|
|
*
|
|
|
|
**************************************************************************************/
|
|
|
|
|
2010-05-11 05:55:28 +02:00
|
|
|
FAR struct lcd_dev_s *up_oledinitialize(FAR struct spi_dev_s *spi)
|
2010-05-11 04:40:10 +02:00
|
|
|
{
|
|
|
|
gvdbg("Initializing\n");
|
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Configure GPIO pins */
|
2010-05-11 05:55:28 +02:00
|
|
|
#warning "Missing logic"
|
2011-07-05 22:15:48 +02:00
|
|
|
|
|
|
|
/* Enable clocking */
|
|
|
|
#warning "Missing logic"
|
2010-05-11 04:40:10 +02:00
|
|
|
|
2010-05-11 04:41:08 +02:00
|
|
|
/* Configure and enable LCD */
|
2015-09-05 17:10:48 +02:00
|
|
|
#warning "Missing logic"
|
2011-07-05 22:15:48 +02:00
|
|
|
|
|
|
|
return &g_lcddev.dev;
|
2010-05-11 04:40:10 +02:00
|
|
|
}
|