You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/01/26 13:12:20 UTC
[incubator-nuttx] 11/13: include: nuttx: lcd: nxstyle fixes
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 785cb0dffe1eba4ca075340092fd254d384a95ee
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Tue Jan 26 11:27:31 2021 +0100
include: nuttx: lcd: nxstyle fixes
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <al...@sony.com>
---
include/nuttx/lcd/ft80x.h | 688 +++++++++++++++++--------------
include/nuttx/lcd/hd4478ou.h | 37 +-
include/nuttx/lcd/ili9325.h | 126 ++++--
include/nuttx/lcd/ili9341.h | 4 +-
include/nuttx/lcd/ili9488.h | 19 +-
include/nuttx/lcd/lpm013m091a.h | 4 +-
include/nuttx/lcd/max7219.h | 1 -
include/nuttx/lcd/mio283qt2.h | 2 +
include/nuttx/lcd/mio283qt9a.h | 2 +
include/nuttx/lcd/p14201.h | 4 +-
include/nuttx/lcd/pcd8544.h | 9 +-
include/nuttx/lcd/pcf8574_lcd_backpack.h | 33 +-
include/nuttx/lcd/ra8875.h | 2 +
include/nuttx/lcd/slcd_codec.h | 4 +-
include/nuttx/lcd/slcd_ioctl.h | 1 +
include/nuttx/lcd/ssd1289.h | 2 +
include/nuttx/lcd/st7032.h | 2 +-
include/nuttx/lcd/st7567.h | 11 +-
include/nuttx/lcd/ug-2864ambag01.h | 87 ++--
include/nuttx/lcd/ug-9664hswag01.h | 14 +-
20 files changed, 599 insertions(+), 453 deletions(-)
diff --git a/include/nuttx/lcd/ft80x.h b/include/nuttx/lcd/ft80x.h
index 3bf1d79..1530197 100644
--- a/include/nuttx/lcd/ft80x.h
+++ b/include/nuttx/lcd/ft80x.h
@@ -1,4 +1,4 @@
-/********************************************************************************************
+/****************************************************************************
* include/nuttx/lcd/ft80x.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
@@ -43,14 +43,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ********************************************************************************************/
+ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_FT80X_H
#define __INCLUDE_NUTTX_LCD_FT80X_H
-/********************************************************************************************
+/****************************************************************************
* Included Files
- ********************************************************************************************/
+ ****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/irq.h>
@@ -62,23 +62,23 @@
#ifdef CONFIG_LCD_FT80X
-/********************************************************************************************
+/****************************************************************************
* Pre-processor Definitions
- ********************************************************************************************/
+ ****************************************************************************/
-/* Configuration ****************************************************************************/
+/* Configuration ************************************************************/
#if defined(CONFIG_LCD_FT80X_WQVGA)
-# define FT80X_DISPLAY_WIDTH 480
-# define FT80X_DISPLAY_HEIGHT 272
+#define FT80X_DISPLAY_WIDTH 480
+#define FT80X_DISPLAY_HEIGHT 272
#elif defined(CONFIG_LCD_FT80X_QVGA)
-# define FT80X_DISPLAY_WIDTH 320
-# define FT80X_DISPLAY_HEIGHT 240
+#define FT80X_DISPLAY_WIDTH 320
+#define FT80X_DISPLAY_HEIGHT 240
#else
# error Unknown display size
#endif
-/* FT80x IOCTL commands *********************************************************************
+/* FT80x IOCTL commands *****************************************************
*
* FT80X_IOC_CREATEDL:
* Description: Write a display list to the FT80x display list memory
@@ -107,10 +107,12 @@
* # Various display commands ...
* FT80X_DISPLAY(); # Terminate the display list
*
- * Then write to the REG_DLSWAP register to set REG_swap to the new display list.
+ * Then write to the REG_DLSWAP register to set REG_swap to the new display
+ * list.
*
- * NOTE: The functionality of FT80X_IOC_CREATEDL is the equivalent to that of
- * the driver write() method. Either the write() method or the FT80X_IOC_CREATEDL
+ * NOTE:
+ * The functionality of FT80X_IOC_CREATEDL is the equivalent to that of the
+ * driver write() method. Either the write() method or the FT80X_IOC_CREATEDL
* IOCTL command can be used to create the display list.
*
* The difference between appending and create a display list using write()
@@ -118,88 +120,99 @@
* to create a new display list. Subsequent writes will behave then append
* to the end of the display list.
*
- * Need to know the current display list offset? You can set that using lseek()
- * too. Just seek to the current position; the returned value will be the current
- * display list offset.
+ * Need to know the current display list offset?
+ * You can set that using lseek()too. Just seek to the current position;
+ * the returned value will be the current display list offset.
*
* Output values from display commands are not automatically written back in
* either case but must be subsequently obtained using FT80X_IOC_GETRAMDL.
*
* FT80X_IOC_GETRAMDL:
- * Description: Read a 32-bit aligned data from the display list.
- * Argument: A reference to an instance of struct ft80x_relmem_s below.
- * Returns: The 32-bit value read from the display list.
+ * Description: Read a 32-bit aligned data from the display list.
+ * Argument: A reference to an instance of struct ft80x_relmem_s
+ * below.
+ * Returns: The 32-bit value read from the display list.
*
* FT80X_IOC_PUTRAMG
- * Description: Write byte data to FT80x graphics memory (RAM_G)
- * Argument: A reference to an instance of struct ft80x_relmem_s below.
- * Returns: None.
+ * Description: Write byte data to FT80x graphics memory (RAM_G)
+ * Argument: A reference to an instance of struct ft80x_relmem_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_PUTRAMCMD
- * Description: Write 32-bit aligned data to FT80x FIFO (RAM_CMD)
- * Argument: A reference to an instance of struct ft80x_relmem_s below.
- * Returns: None.
+ * Description: Write 32-bit aligned data to FT80x FIFO (RAM_CMD)
+ * Argument: A reference to an instance of struct ft80x_relmem_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_GETREG8:
- * Description: Read an 8-bit register value from the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: The 8-bit value read from the register.
+ * Description: Read an 8-bit register value from the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: The 8-bit value read from the register.
*
* FT80X_IOC_GETREG16:
- * Description: Read a 16-bit register value from the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: The 16-bit value read from the register.
+ * Description: Read a 16-bit register value from the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: The 16-bit value read from the register.
*
* FT80X_IOC_GETREG32:
- * Description: Read a 32-bit register value from the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: The 32-bit value read from the register.
+ * Description: Read a 32-bit register value from the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: The 32-bit value read from the register.
*
* FT80X_IOC_GETREGS:
- * Description: Read multiple 32-bit register values from the FT80x.
- * Argument: A reference to an instance of struct ft80x_registers_s below.
- * Returns: The 32-bit values read from the consecutive registers .
+ * Description: Read multiple 32-bit register values from the FT80x.
+ * Argument: A reference to an instance of struct ft80x_registers_s
+ * below.
+ * Returns: The 32-bit values read from the consecutive registers.
*
* FT80X_IOC_PUTREG8:
- * Description: Write an 8-bit register value to the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: None.
+ * Description: Write an 8-bit register value to the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_PUTREG16:
- * Description: Write a 16-bit register value to the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: None.
+ * Description: Write a 16-bit register value to the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_PUTREG32:
- * Description: Write a 32-bit register value to the FT80x.
- * Argument: A reference to an instance of struct ft80x_register_s below.
- * Returns: None.
+ * Description: Write a 32-bit register value to the FT80x.
+ * Argument: A reference to an instance of struct ft80x_register_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_PUTREGS:
- * Description: Write multiple 32-bit register values to the FT80x.
- * Argument: A reference to an instance of struct ft80x_registers_s below.
- * Returns: None.
+ * Description: Write multiple 32-bit register values to the FT80x.
+ * Argument: A reference to an instance of struct ft80x_registers_s
+ * below.
+ * Returns: None.
*
* FT80X_IOC_EVENTNOTIFY:
- * Description: Setup to receive a signal when there is a change in any
- * touch tag value. Additional information may be provided in
- * the signinfo.si_val file of the notification:
+ * Description: Setup to receive a signal when there is a change in any
+ * touch tag value. Additional information may be provided
+ * in the signinfo.si_val file of the notification:
*
- * For touch tag events, siginfo.si_value will indicate the
- * touch tag. For the FT801 in extended mode, it will
- * indicate only the tag value for TOUCH0.
- * Argument: A reference to an instance of struct ft80x_notify_s.
- * Returns: None
+ * For touch tag events, siginfo.si_value will indicate the
+ * touch tag. For the FT801 in extended mode, it will
+ * indicate only the tag value for TOUCH0.
+ * Argument: A reference to an instance of struct ft80x_notify_s.
+ * Returns: None
*
* FT80X_IOC_FADE:
- * Description: Change the backlight intensity with a controllable fade.
- * Argument: A reference to an instance of struct ft80x_fade_s below.
- * Returns: None.
+ * Description: Change the backlight intensity with a controllable fade.
+ * Argument: A reference to an instance of struct ft80x_fade_s below.
+ * Returns: None.
*
* FT80X_IOC_AUDIO:
- * Description: Enable/disable an external audio amplifier.
- * Argument: 0=disable; 1=enable.
- * Returns: None.
+ * Description: Enable/disable an external audio amplifier.
+ * Argument: 0=disable; 1=enable.
+ * Returns: None.
*/
#define FT80X_IOC_CREATEDL _LCDIOC(FT80X_NIOCTL_BASE + 0)
@@ -219,187 +232,190 @@
#define FT80X_IOC_FADE _LCDIOC(FT80X_NIOCTL_BASE + 14)
#define FT80X_IOC_AUDIO _LCDIOC(FT80X_NIOCTL_BASE + 15)
-/* FT80x Memory Map *************************************************************************/
+/* FT80x Memory Map *********************************************************/
/* Address region */
-#define FT80X_RAM_G 0x000000 /* Main graphics RAM (256Kb) */
-#define FT80X_ROM_CHIPID 0x0c0000 /* FT80x chip identification and revision
- * information (4b):
- * Byte [0:1] Chip ID: 0800 or 0801
- * Byte [2:3] Version ID: 0100 */
-#define FT80X_ROM_FONT 0x0bb23c /* Font table and bitmap (275Kb) */
-#define FT80X_ROM_FONT_ADDR 0x0ffffc /* Font table pointer address (4b) */
-#define FT80X_RAM_DL 0x100000 /* Display List RAM (8Kb) */
-#define FT80X_RAM_PAL 0x102000 /* Palette RAM (1Kb) */
-#define FT80X_REG 0x102400 /* Registers (380b) */
-#define FT80X_RAM_CMD 0x108000 /* Command Buffer (4Kb) */
+#define FT80X_RAM_G 0x000000 /* Main graphics RAM (256Kb) */
+#define FT80X_ROM_CHIPID 0x0c0000 /* FT80x chip identification and revision
+ * information (4b):
+ * Byte [0:1] Chip ID: 0800 or 0801
+ * Byte [2:3] Version ID: 0100 */
+#define FT80X_ROM_FONT 0x0bb23c /* Font table and bitmap (275Kb) */
+#define FT80X_ROM_FONT_ADDR 0x0ffffc /* Font table pointer address (4b) */
+#define FT80X_RAM_DL 0x100000 /* Display List RAM (8Kb) */
+#define FT80X_RAM_PAL 0x102000 /* Palette RAM (1Kb) */
+#define FT80X_REG 0x102400 /* Registers (380b) */
+#define FT80X_RAM_CMD 0x108000 /* Command Buffer (4Kb) */
#ifdef CONFIG_LCD_FT801
-# define FT80X_RAM_SCREENSHOT 0x1c2000 /* Screenshot readout buffer (2Kb) */
+#define FT80X_RAM_SCREENSHOT 0x1c2000 /* Screenshot readout buffer (2Kb) */
#endif
/* Memory buffer sizes */
-#define FT80X_RAM_G_SIZE (256 * 1024)
-#define FT80X_CMDFIFO_SIZE (4 * 1024)
-#define FT80X_RAM_DL_SIZE (8 * 1024)
-#define FT80X_RAM_PAL_SIZE (1 * 1024)
+#define FT80X_RAM_G_SIZE (256 * 1024)
+#define FT80X_CMDFIFO_SIZE (4 * 1024)
+#define FT80X_RAM_DL_SIZE (8 * 1024)
+#define FT80X_RAM_PAL_SIZE (1 * 1024)
-/* FT80x Register Addresses *****************************************************************/
+/* FT80x Register Addresses *************************************************/
-#define FT80X_REG_ID 0x102400 /* Identification register, always reads as 7c */
-#define FT80X_REG_FRAMES 0x102404 /* Frame counter, since reset */
-#define FT80X_REG_CLOCK 0x102408 /* Clock cycles, since reset */
-#define FT80X_REG_FREQUENCY 0x10240c /* Main clock frequency */
+#define FT80X_REG_ID 0x102400 /* Identification register, always reads as 7c */
+#define FT80X_REG_FRAMES 0x102404 /* Frame counter, since reset */
+#define FT80X_REG_CLOCK 0x102408 /* Clock cycles, since reset */
+#define FT80X_REG_FREQUENCY 0x10240c /* Main clock frequency */
#if defined(CONFIG_LCD_FT800)
-# define FT80X_REG_RENDERMODE 0x102410 /* Rendering mode: 0 = normal, 1 = single-line */
-# define FT80X_REG_SNAPY 0x102414 /* Scan line select for RENDERMODE 1 */
-# define FT80X_REG_SNAPSHOT 0x102418 /* Trigger for RENDERMODE 1 */
+#define FT80X_REG_RENDERMODE 0x102410 /* Rendering mode: 0 = normal, 1 = single-line */
+#define FT80X_REG_SNAPY 0x102414 /* Scan line select for RENDERMODE 1 */
+#define FT80X_REG_SNAPSHOT 0x102418 /* Trigger for RENDERMODE 1 */
#elif defined(CONFIG_LCD_FT801)
-# define FT80X_REG_SCREENSHOT_EN 0x102410 /* Set to enable screenshot mode */
-# define FT80X_REG_SCREENSHOT_Y 0x102414 /* Y line number for screenshot */
-# define FT80X_REG_SCREENSHOT_START 0x102418 /* Screenshot start trigger */
+#define FT80X_REG_SCREENSHOT_EN 0x102410 /* Set to enable screenshot mode */
+#define FT80X_REG_SCREENSHOT_Y 0x102414 /* Y line number for screenshot */
+#define FT80X_REG_SCREENSHOT_START 0x102418 /* Screenshot start trigger */
#endif
-#define FT80X_REG_CPURESET 0x10241c /* Graphics, audio and touch engines reset
- * control */
-#define FT80X_REG_TAP_CRC 0x102420 /* Live video tap crc. Frame CRC is computed
- * every DL SWAP. */
-#define FT80X_REG_TAP_MASK 0x102424 /* Live video tap mask */
-#define FT80X_REG_HCYCLE 0x102428 /* Horizontal total cycle count */
-#define FT80X_REG_HOFFSET 0x10242c /* Horizontal display start offset */
-#define FT80X_REG_HSIZE 0x102430 /* Horizontal display pixel count */
-#define FT80X_REG_HSYNC0 0x102434 /* Horizontal sync fall offset */
-#define FT80X_REG_HSYNC1 0x102438 /* Horizontal sync rise offset */
-#define FT80X_REG_VCYCLE 0x10243c /* Vertical total cycle count */
-#define FT80X_REG_VOFFSET 0x102440 /* Vertical display start offset */
-#define FT80X_REG_VSIZE 0x102444 /* Vertical display line count */
-#define FT80X_REG_VSYNC0 0x102448 /* Vertical sync fall offset */
-#define FT80X_REG_VSYNC1 0x10244c /* Vertical sync rise offset */
-#define FT80X_REG_DLSWAP 0x102450 /* Display list swap control */
-#define FT80X_REG_ROTATE 0x102454 /* Screen 180 degree rotate */
-#define FT80X_REG_OUTBITS 0x102458 /* Output bit resolution, 3x3x3 bits */
-#define FT80X_REG_DITHER 0x10245c /* Output dither enable */
-#define FT80X_REG_SWIZZLE 0x102460 /* Output RGB signal swizzle */
-#define FT80X_REG_CSPREAD 0x102464 /* Output clock spreading enable */
-#define FT80X_REG_PCLK_POL 0x102468 /* PCLK polarity: 0=rising edge, 1= falling edge */
-#define FT80X_REG_PCLK 0x10246c /* PCLK frequency divider, 0 = disable */
-#define FT80X_REG_TAG_X 0x102470 /* Tag query X coordinate */
-#define FT80X_REG_TAG_Y 0x102474 /* Tag query Y coordinate */
-#define FT80X_REG_TAG 0x102478 /* Tag query result */
-#define FT80X_REG_VOL_PB 0x10247c /* Volume for playback */
-#define FT80X_REG_VOL_SOUND 0x102480 /* Volume for synthesizer sound */
-#define FT80X_REG_SOUND 0x102484 /* Sound effect select */
-#define FT80X_REG_PLAY 0x102488 /* Start effect playback */
-#define FT80X_REG_GPIO_DIR 0x10248c /* GPIO pin direction, 0=input, 1=output */
-#define FT80X_REG_GPIO 0x102490 /* Pin value (bits 0,1,7); Drive strength
- * (bits 2-6) */
- /* 0x102494 Reserved */
-#define FT80X_REG_INT_FLAGS 0x102498 /* Interrupt flags, clear by read */
-#define FT80X_REG_INT_EN 0x10249c /* Global interrupt enable */
-#define FT80X_REG_INT_MASK 0x1024a0 /* Interrupt enable mask */
-#define FT80X_REG_PLAYBACK_START 0x1024a4 /* Audio playback RAM start address */
-#define FT80X_REG_PLAYBACK_LENGTH 0x1024a8 /* Audio playback sample length (bytes) */
-#define FT80X_REG_PLAYBACK_READPTR 0x1024ac /* Audio playback current read pointer */
-#define FT80X_REG_PLAYBACK_FREQ 0x1024b0 /* Audio playback sampling frequency (Hz) */
-#define FT80X_REG_PLAYBACK_FORMAT 0x1024b4 /* Audio playback format */
-#define FT80X_REG_PLAYBACK_LOOP 0x1024b8 /* Audio playback loop enable */
-#define FT80X_REG_PLAYBACK_PLAY 0x1024bc /* Start audio playback */
-#define FT80X_REG_PWM_HZ 0x1024c0 /* BACKLIGHT PWM output frequency (Hz) */
-#define FT80X_REG_PWM_DUTY 0x1024c4 /* BACKLIGHT PWM output duty cycle 0=0%,
+#define FT80X_REG_CPURESET 0x10241c /* Graphics, audio and touch engines reset
+ * control */
+#define FT80X_REG_TAP_CRC 0x102420 /* Live video tap crc. Frame CRC is computed
+ * every DL SWAP. */
+#define FT80X_REG_TAP_MASK 0x102424 /* Live video tap mask */
+#define FT80X_REG_HCYCLE 0x102428 /* Horizontal total cycle count */
+#define FT80X_REG_HOFFSET 0x10242c /* Horizontal display start offset */
+#define FT80X_REG_HSIZE 0x102430 /* Horizontal display pixel count */
+#define FT80X_REG_HSYNC0 0x102434 /* Horizontal sync fall offset */
+#define FT80X_REG_HSYNC1 0x102438 /* Horizontal sync rise offset */
+#define FT80X_REG_VCYCLE 0x10243c /* Vertical total cycle count */
+#define FT80X_REG_VOFFSET 0x102440 /* Vertical display start offset */
+#define FT80X_REG_VSIZE 0x102444 /* Vertical display line count */
+#define FT80X_REG_VSYNC0 0x102448 /* Vertical sync fall offset */
+#define FT80X_REG_VSYNC1 0x10244c /* Vertical sync rise offset */
+#define FT80X_REG_DLSWAP 0x102450 /* Display list swap control */
+#define FT80X_REG_ROTATE 0x102454 /* Screen 180 degree rotate */
+#define FT80X_REG_OUTBITS 0x102458 /* Output bit resolution, 3x3x3 bits */
+#define FT80X_REG_DITHER 0x10245c /* Output dither enable */
+#define FT80X_REG_SWIZZLE 0x102460 /* Output RGB signal swizzle */
+#define FT80X_REG_CSPREAD 0x102464 /* Output clock spreading enable */
+#define FT80X_REG_PCLK_POL 0x102468 /* PCLK polarity: 0=rising edge, 1= falling edge */
+#define FT80X_REG_PCLK 0x10246c /* PCLK frequency divider, 0 = disable */
+#define FT80X_REG_TAG_X 0x102470 /* Tag query X coordinate */
+#define FT80X_REG_TAG_Y 0x102474 /* Tag query Y coordinate */
+#define FT80X_REG_TAG 0x102478 /* Tag query result */
+#define FT80X_REG_VOL_PB 0x10247c /* Volume for playback */
+#define FT80X_REG_VOL_SOUND 0x102480 /* Volume for synthesizer sound */
+#define FT80X_REG_SOUND 0x102484 /* Sound effect select */
+#define FT80X_REG_PLAY 0x102488 /* Start effect playback */
+#define FT80X_REG_GPIO_DIR 0x10248c /* GPIO pin direction, 0=input, 1=output */
+#define FT80X_REG_GPIO 0x102490 /* Pin value (bits 0,1,7); Drive strength
+ * (bits 2-6) */
+ /* 0x102494 Reserved */
+#define FT80X_REG_INT_FLAGS 0x102498 /* Interrupt flags, clear by read */
+#define FT80X_REG_INT_EN 0x10249c /* Global interrupt enable */
+#define FT80X_REG_INT_MASK 0x1024a0 /* Interrupt enable mask */
+#define FT80X_REG_PLAYBACK_START 0x1024a4 /* Audio playback RAM start address */
+#define FT80X_REG_PLAYBACK_LENGTH 0x1024a8 /* Audio playback sample length (bytes) */
+#define FT80X_REG_PLAYBACK_READPTR 0x1024ac /* Audio playback current read pointer */
+#define FT80X_REG_PLAYBACK_FREQ 0x1024b0 /* Audio playback sampling frequency (Hz) */
+#define FT80X_REG_PLAYBACK_FORMAT 0x1024b4 /* Audio playback format */
+#define FT80X_REG_PLAYBACK_LOOP 0x1024b8 /* Audio playback loop enable */
+#define FT80X_REG_PLAYBACK_PLAY 0x1024bc /* Start audio playback */
+#define FT80X_REG_PWM_HZ 0x1024c0 /* BACKLIGHT PWM output frequency (Hz) */
+#define FT80X_REG_PWM_DUTY 0x1024c4 /* BACKLIGHT PWM output duty cycle 0=0%,
* 128=100% */
-#define FT80X_REG_MACRO_0 0x1024c8 /* Display list macro command 0 */
-#define FT80X_REG_MACRO_1 0x1024cc /* Display list macro command 1 */
+#define FT80X_REG_MACRO_0 0x1024c8 /* Display list macro command 0 */
+#define FT80X_REG_MACRO_1 0x1024cc /* Display list macro command 1 */
#if defined(CONFIG_LCD_FT800)
- /* 0x1024d0 – 0x1024e0 Reserved */
+ /* 0x1024d0 – 0x1024e0 Reserved */
+
#elif defined(CONFIG_LCD_FT801)
- /* 0x1024d0 – 0x1024d4 Reserved */
-# define FT80X_REG_SCREENSHOT_BUSY 0x1024d8 /* Screenshot ready flags */
- /* 0x1024e0 Reserved */
+ /* 0x1024d0 – 0x1024d4 Reserved */
+
+#define FT80X_REG_SCREENSHOT_BUSY 0x1024d8 /* Screenshot ready flags */
+
+ /* 0x1024e0 Reserved */
#endif
-#define FT80X_REG_CMD_READ 0x1024e4 /* Command buffer read pointer */
-#define FT80X_REG_CMD_WRITE 0x1024e8 /* Command buffer write pointer */
-#define FT80X_REG_CMD_DL 0x1024ec /* Command display list offset */
-#define FT80X_REG_TOUCH_MODE 0x1024f0 /* Touch-screen sampling mode */
+#define FT80X_REG_CMD_READ 0x1024e4 /* Command buffer read pointer */
+#define FT80X_REG_CMD_WRITE 0x1024e8 /* Command buffer write pointer */
+#define FT80X_REG_CMD_DL 0x1024ec /* Command display list offset */
+#define FT80X_REG_TOUCH_MODE 0x1024f0 /* Touch-screen sampling mode */
#if defined(CONFIG_LCD_FT800)
-# define FT80X_REG_TOUCH_ADC_MODE 0x1024f4 /* Select single ended (low power) or
+#define FT80X_REG_TOUCH_ADC_MODE 0x1024f4 /* Select single ended (low power) or
* differential (accurate) sampling */
-# define FT80X_REG_TOUCH_CHARGE 0x1024f8 /* Touch-screen charge time, units of 6 clocks */
-# define FT80X_REG_TOUCH_SETTLE 0x1024fc /* Touch-screen settle time, units of 6 clocks */
-# define FT80X_REG_TOUCH_OVERSAMPLE 0x102500 /* Touch-screen oversample factor */
-# define FT80X_REG_TOUCH_RZTHRESH 0x102504 /* Touch-screen resistance threshold */
-# define FT80X_REG_TOUCH_RAW_XY 0x102508 /* Touch-screen raw (x-MSB16; y-LSB16) */
-# define FT80X_REG_TOUCH_RZ 0x10250c /* Touch-screen resistance */
-# define FT80X_REG_TOUCH_SCREEN_XY 0x102510 /* Touch-screen screen (x-MSB16; y-LSB16) */
-# define FT80X_REG_TOUCH_TAG_XY 0x102514 /* Touch-screen screen (x-MSB16; y-LSB16)
+#define FT80X_REG_TOUCH_CHARGE 0x1024f8 /* Touch-screen charge time, units of 6 clocks */
+#define FT80X_REG_TOUCH_SETTLE 0x1024fc /* Touch-screen settle time, units of 6 clocks */
+#define FT80X_REG_TOUCH_OVERSAMPLE 0x102500 /* Touch-screen oversample factor */
+#define FT80X_REG_TOUCH_RZTHRESH 0x102504 /* Touch-screen resistance threshold */
+#define FT80X_REG_TOUCH_RAW_XY 0x102508 /* Touch-screen raw (x-MSB16; y-LSB16) */
+#define FT80X_REG_TOUCH_RZ 0x10250c /* Touch-screen resistance */
+#define FT80X_REG_TOUCH_SCREEN_XY 0x102510 /* Touch-screen screen (x-MSB16; y-LSB16) */
+#define FT80X_REG_TOUCH_TAG_XY 0x102514 /* Touch-screen screen (x-MSB16; y-LSB16)
* used for tag lookup */
-# define FT80X_REG_TOUCH_TAG 0x102518 /* Touch-screen tag result */
-# define FT80X_REG_TOUCH_TRANSFORM_A 0x10251c /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_TOUCH_TRANSFORM_B 0x102520 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_TOUCH_TRANSFORM_C 0x102524 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_TOUCH_TRANSFORM_D 0x102528 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_TOUCH_TRANSFORM_E 0x10252c /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_TOUCH_TRANSFORM_F 0x102530 /* Touch-screen transform coefficient (s15.16) */
- /* 0x102534 – 0x102470 Reserved */
-# define FT80X_REG_TOUCH_DIRECT_XY 0x102574 /* Touch screen direct (x-MSB16; y-LSB16)
- * conversions */
-# define FT80X_REG_TOUCH_DIRECT_Z1Z2 0x102578 /* Touch screen direct (z1-MSB16; z2-LSB16)
- * conversions */
+#define FT80X_REG_TOUCH_TAG 0x102518 /* Touch-screen tag result */
+#define FT80X_REG_TOUCH_TRANSFORM_A 0x10251c /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_TOUCH_TRANSFORM_B 0x102520 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_TOUCH_TRANSFORM_C 0x102524 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_TOUCH_TRANSFORM_D 0x102528 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_TOUCH_TRANSFORM_E 0x10252c /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_TOUCH_TRANSFORM_F 0x102530 /* Touch-screen transform coefficient (s15.16) */
+ /* 0x102534 – 0x102470 Reserved */
+#define FT80X_REG_TOUCH_DIRECT_XY 0x102574 /* Touch screen direct (x-MSB16; y-LSB16)
+ * conversions */
+#define FT80X_REG_TOUCH_DIRECT_Z1Z2 0x102578 /* Touch screen direct (z1-MSB16; z2-LSB16)
+ * conversions */
#elif defined(CONFIG_LCD_FT801)
- /* 0x1024d0 – 0x1024d4 Reserved */
-# define FT80X_REG_CTOUCH_EXTENDED 0x1024f4 /* Set capacitive touch operation mode:
- * 0: extended mode (multi-touch)
- * 1: FT800 compatibility mode (single touch) */
-# define FT80X_REG_CTOUCH_REG 0x1024f8 /* CTPM configure register write
- * Bits [7:0]: configure register address
- * Bits [15:8]: configure register value */
- /* 0x1024fc - 0x102504 Reserved */
-# define FT80X_REG_CTOUCH_RAW_XY 0x102508 /* Compatibility mode: touch-screen raw
+ /* 0x1024d0 – 0x1024d4 Reserved */
+#define FT80X_REG_CTOUCH_EXTENDED 0x1024f4 /* Set capacitive touch operation mode:
+ * 0: extended mode (multi-touch)
+ * 1: FT800 compatibility mode (single touch) */
+#define FT80X_REG_CTOUCH_REG 0x1024f8 /* CTPM configure register write
+ * Bits [7:0]: configure register address
+ * Bits [15:8]: configure register value */
+ /* 0x1024fc - 0x102504 Reserved */
+#define FT80X_REG_CTOUCH_RAW_XY 0x102508 /* Compatibility mode: touch-screen raw
* (x-MSB16; y-LSB16) */
-# define FT80X_REG_CTOUCH_TOUCH1_XY 0x102508 /* Extended mode: touch-screen screen data for touch 1
+#define FT80X_REG_CTOUCH_TOUCH1_XY 0x102508 /* Extended mode: touch-screen screen data for touch 1
* (x-MSB16; y-LSB16) */
-# define FT80X_REG_CTOUCH_TOUCH4_Y 0x10250c /* Extended mode: touch-screen screen Y data for touch 4 */
-# define FT80X_REG_CTOUCH_SCREEN_XY 0x102510 /* Compatibility mode: touch-screen screen
+#define FT80X_REG_CTOUCH_TOUCH4_Y 0x10250c /* Extended mode: touch-screen screen Y data for touch 4 */
+#define FT80X_REG_CTOUCH_SCREEN_XY 0x102510 /* Compatibility mode: touch-screen screen
* (x-MSB16; y-LSB16) */
-# define FT80X_REG_CTOUCH_TOUCH0_XY 0x102510 /* Extended mode: touch-screen screen data for touch 0
+#define FT80X_REG_CTOUCH_TOUCH0_XY 0x102510 /* Extended mode: touch-screen screen data for touch 0
* (x-MSB16; y-LSB16) */
-# define FT80X_REG_CTOUCH_TAG_XY 0x102514 /* Touch-screen screen (x-MSB16; y-LSB16)
+#define FT80X_REG_CTOUCH_TAG_XY 0x102514 /* Touch-screen screen (x-MSB16; y-LSB16)
* used for tag lookup */
-# define FT80X_REG_CTOUCH_TAG 0x102518 /* Touch-screen tag result */
-# define FT80X_REG_CTOUCH_TRANSFORM_A 0x10251c /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_CTOUCH_TRANSFORM_B 0x102520 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_CTOUCH_TRANSFORM_C 0x102524 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_CTOUCH_TRANSFORM_D 0x102528 /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_CTOUCH_TRANSFORM_E 0x10252c /* Touch-screen transform coefficient (s15.16) */
-# define FT80X_REG_CTOUCH_TRANSFORM_F 0x102530 /* Touch-screen transform coefficient (s15.16) */
- /* 0x102534 Reserved */
-# define FT80X_REG_CTOUCH_TOUCH4_X 0x102538 /* Extended mode: touch-screen screen X data for
- * touch 4 */
- /* 0x10253c – 0x102450 Reserved */
-# define FT80X_REG_SCREENSHOT_READ 0x102554 /* Set to enable readout of the screenshot of the
- * selected Y line */
- /* 0x10253c – 0x102468 Reserved */
-# define FT80X_REG_TRIM 0x10256c /* Internal relaxation clock trimming */
- /* 0x102570 Reserved */
-# define FT80X_REG_CTOUCH_DIRECT_XY 0x102574 /* Compatibility mode: Touch screen direct
- * (x-MSB16; y-LSB16) conversions */
-# define FT80X_REG_CTOUCH_TOUCH2_XY 0x102574 /* Extended mode: touch-screen screen data for
- * touch 2 (x-MSB16; y-LSB16) */
-# define FT80X_REG_CTOUCH_DIRECT_Z1Z2 0x102578 /* Compatibility mode: Touch screen direct
- * (z1-MSB16; z2-LSB16) conversions */
-# define FT80X_REG_CTOUCH_TOUCH3_XY 0x102578 /* Extended mode: touch-screen screen data for
- * touch 3 (x-MSB16; y-LSB16) */
+#define FT80X_REG_CTOUCH_TAG 0x102518 /* Touch-screen tag result */
+#define FT80X_REG_CTOUCH_TRANSFORM_A 0x10251c /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_CTOUCH_TRANSFORM_B 0x102520 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_CTOUCH_TRANSFORM_C 0x102524 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_CTOUCH_TRANSFORM_D 0x102528 /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_CTOUCH_TRANSFORM_E 0x10252c /* Touch-screen transform coefficient (s15.16) */
+#define FT80X_REG_CTOUCH_TRANSFORM_F 0x102530 /* Touch-screen transform coefficient (s15.16) */
+ /* 0x102534 Reserved */
+#define FT80X_REG_CTOUCH_TOUCH4_X 0x102538 /* Extended mode: touch-screen screen X data for
+ * touch 4 */
+ /* 0x10253c – 0x102450 Reserved */
+#define FT80X_REG_SCREENSHOT_READ 0x102554 /* Set to enable readout of the screenshot of the
+ * selected Y line */
+ /* 0x10253c – 0x102468 Reserved */
+#define FT80X_REG_TRIM 0x10256c /* Internal relaxation clock trimming */
+ /* 0x102570 Reserved */
+#define FT80X_REG_CTOUCH_DIRECT_XY 0x102574 /* Compatibility mode: Touch screen direct
+ * (x-MSB16; y-LSB16) conversions */
+#define FT80X_REG_CTOUCH_TOUCH2_XY 0x102574 /* Extended mode: touch-screen screen data for
+ * touch 2 (x-MSB16; y-LSB16) */
+#define FT80X_REG_CTOUCH_DIRECT_Z1Z2 0x102578 /* Compatibility mode: Touch screen direct
+ * (z1-MSB16; z2-LSB16) conversions */
+#define FT80X_REG_CTOUCH_TOUCH3_XY 0x102578 /* Extended mode: touch-screen screen data for
+ * touch 3 (x-MSB16; y-LSB16) */
#endif
#define FT80X_REG_TRACKER 0x109000 /* Track register (Track value – MSB16;
* Tag value - LSB8) */
-/* FT80x Register Bit Definitions ***********************************************************/
+/* FT80x Register Bit Definitions *******************************************/
/* FT80X_REG_ID */
@@ -416,7 +432,9 @@
* the screen immediately after the current
* frame is scanned out (recommended).
*/
+
/* FT80X_REG_SOUND */
+
/* Sound effect (Bits 0-7) */
#define FT08X_EFFECT_SILENCE 0x00 /* Silence */
@@ -571,90 +589,104 @@
/* FT80X_REG_GPIO */
- /* Bits 0-1: GPIO 0-1 value */
- /* Bits 2-3: MISO and nINT drive strength */
- /* Bits 4: Display signal drive strength */
-#define FT80X_GPIO_DRIVE_SHIFT 5 /* Bits 5-6: GPIO output drive strength */
-#define FT80X_GPIO_DRIVE_MASK (3 << FT80X_GPIO_DRIVE_SHIFT)
-# define FT80X_GPIO_DRIVE_4MA (0 << FT80X_GPIO_DRIVE_SHIFT)
-# define FT80X_GPIO_DRIVE_8MA (1 << FT80X_GPIO_DRIVE_SHIFT)
-# define FT80X_GPIO_DRIVE_12MA (2 << FT80X_GPIO_DRIVE_SHIFT)
-# define FT80X_GPIO_DRIVE_16MA (3 << FT80X_GPIO_DRIVE_SHIFT)
- /* Bit 7: GPIO 7 value */
+/* Bits 0-1: GPIO 0-1 value */
+
+/* Bits 2-3: MISO and nINT drive strength */
+
+/* Bits 4: Display signal drive strength */
+
+#define FT80X_GPIO_DRIVE_SHIFT 5 /* Bits 5-6: GPIO output drive strength */
+#define FT80X_GPIO_DRIVE_MASK (3 << FT80X_GPIO_DRIVE_SHIFT)
+#define FT80X_GPIO_DRIVE_4MA (0 << FT80X_GPIO_DRIVE_SHIFT)
+#define FT80X_GPIO_DRIVE_8MA (1 << FT80X_GPIO_DRIVE_SHIFT)
+#define FT80X_GPIO_DRIVE_12MA (2 << FT80X_GPIO_DRIVE_SHIFT)
+#define FT80X_GPIO_DRIVE_16MA (3 << FT80X_GPIO_DRIVE_SHIFT)
+ /* Bit 7: GPIO 7 value */
/* FT80X_REG_PLAYBACK_FORMAT */
-#define AUDIO_FORMAT_LINEAR 0 /* Linear Sample format */
-#define AUDIO_FORMAT_ULAW 1 /* uLaw Sample format */
-#define AUDIO_FORMAT_ADPCM 2 /* 4-bit IMA ADPCM Sample format */
+#define AUDIO_FORMAT_LINEAR 0 /* Linear Sample format */
+#define AUDIO_FORMAT_ULAW 1 /* uLaw Sample format */
+#define AUDIO_FORMAT_ADPCM 2 /* 4-bit IMA ADPCM Sample format */
/* FT80X_REG_TOUCH_TAG */
-#define TOUCH_TAG_MASK 0xff /* Bits 0-7: Tag of touched graphic object */
+#define TOUCH_TAG_MASK 0xff /* Bits 0-7: Tag of touched graphic object */
/* FT80X_REG_TOUCH_MODE */
-#define TOUCH_MODE_OFF 0 /* Acquisition stopped, touch detection
+#define TOUCH_MODE_OFF 0 /* Acquisition stopped, touch detection
* interrupt is still valid. */
-#define TOUCH_MODE_ONESHOT 1 /* Perform acquisition once every write of 1
- * to REG_TOUCH_MODE. */
-#define TOUCH_MODE_FRAMESYNC 2 /* Perform acquisition for every frame sync
- * (~60 data acquisition/second). */
-#define TOUCH_MODE_CONTINUOUS 3 /* Perform acquisition continuously at
- * approximately 1000 data acquisition /
+#define TOUCH_MODE_ONESHOT 1 /* Perform acquisition once every write of 1
+ * to REG_TOUCH_MODE. */
+#define TOUCH_MODE_FRAMESYNC 2 /* Perform acquisition for every frame sync
+ * (~60 data acquisition/second). */
+#define TOUCH_MODE_CONTINUOUS 3 /* Perform acquisition continuously at
+ * approximately 1000 data acquisition /
* second. */
-/* Interrupts *******************************************************************************/
-/* The interrupt output pin is enabled by REG_INT_EN. When REG_INT_EN is 0, INT_N is
- * tri-state (pulled to high by external pull-up resistor). When REG_INT_EN is 1, INT_N is
- * driven low when any of the interrupt flags in REG_INT_FLAGS are high, after masking with
- * REG_INT_MASK. Writing a '1' in any bit of REG_INT_MASK will enable the correspond
- * interrupt. Each bit in REG_INT_FLAGS is set by a corresponding interrupt source.
- * REG_INT_FLAGS is readable by the host at any time, and clears when read.
+/* Interrupts ***************************************************************/
+
+/* The interrupt output pin is enabled by REG_INT_EN. When REG_INT_EN is 0,
+ * INT_N is tri-state (pulled to high by external pull-up resistor).
+ * When REG_INT_EN is 1, INT_N is driven low when any of the interrupt flags
+ * in REG_INT_FLAGS are high, after masking with REG_INT_MASK.
+ * Writing a '1' in any bit of REG_INT_MASK will enable the correspond
+ * interrupt. Each bit in REG_INT_FLAGS is set by a corresponding interrupt
+ * source. REG_INT_FLAGS is readable by the host at any time, and clears when
+ * read.
*/
/* FT80X_REG_INT_EN */
-#define FT80X_INT_ENABLE (0) /* Bit 0: 0=Interrupts disabled */
-#define FT80X_INT_DISABLE (1 << 0) /* 1=Interrupts enabled */
+#define FT80X_INT_ENABLE (0) /* Bit 0: 0=Interrupts disabled */
+#define FT80X_INT_DISABLE (1 << 0) /* 1=Interrupts enabled */
/* FT80X_REG_INT_FLAGS and FT80X_REG_INT_MASK */
-#define FT80X_INT_SWAP (1 << 0) /* Bit 0: Display swap occurred */
-#define FT80X_INT_TOUCH (1 << 1) /* Bit 1: Touch-screen touch detected */
-#define FT80X_INT_TAG (1 << 2) /* Bit 2: Touch-screen tag value change */
-#define FT80X_INT_SOUND (1 << 3) /* Bit 3: Sound effect ended */
-#define FT80X_INT_PLAYBACK (1 << 4) /* Bit 4: Audio playback ended */
-#define FT80X_INT_CMDEMPTY (1 << 5) /* Bit 5: Command FIFO empty */
-#define FT80X_INT_CMDFLAG (1 << 6) /* Bit 6: Command FIFO flag */
-#define FT80X_INT_CONVCOMPLETE (1 << 7) /* Bit 7: Touch-screen conversions completed */
+#define FT80X_INT_SWAP (1 << 0) /* Bit 0: Display swap occurred */
+#define FT80X_INT_TOUCH (1 << 1) /* Bit 1: Touch-screen touch detected */
+#define FT80X_INT_TAG (1 << 2) /* Bit 2: Touch-screen tag value change */
+#define FT80X_INT_SOUND (1 << 3) /* Bit 3: Sound effect ended */
+#define FT80X_INT_PLAYBACK (1 << 4) /* Bit 4: Audio playback ended */
+#define FT80X_INT_CMDEMPTY (1 << 5) /* Bit 5: Command FIFO empty */
+#define FT80X_INT_CMDFLAG (1 << 6) /* Bit 6: Command FIFO flag */
+#define FT80X_INT_CONVCOMPLETE (1 << 7) /* Bit 7: Touch-screen conversions completed */
#define FT80X_INT_NEVENTS 8
#define FT80X_INT(n) (1 << (n))
-/* FT80x Display List Commands **************************************************************/
-/* Host commands. 3 byte commands. The first byte begins with [7:6]==01. Bits [5:0] of
- * the first byte are actual command. The following two bytes must be zero.
+/* FT80x Display List Commands **********************************************/
+
+/* Host commands. 3 byte commands.
+ * The first byte begins with [7:6]==01.
+ * Bits [5:0] of the first byte are actual command.
+ * The following two bytes must be zero.
*/
-#define FT80X_CMD_ACTIVE 0x00 /* Switch from Standby/Sleep modes to active mode */
-#define FT80X_CMD_STANDBY 0x41 /* Put FT80x core to standby mode */
-#define FT80X_CMD_SLEEP 0x42 /* Put FT80x core to sleep mode */
-#define FT80X_CMD_CLKEXT 0x44 /* Enable PLL input from oscillator or external clock */
-#define FT80X_CMD_PWRDOWN 0x50 /* Switch off 1.2V internal regulator */
-#define FT80X_CMD_CLK36M 0x61 /* Switch PLL output clock to 36MHz */
-#define FT80X_CMD_CLK48M 0x62 /* Switch PLL output clock to 48MHz (default). */
-#define FT80X_CMD_CORERST 0x68 /* Send reset pulse to FT800 core */
+#define FT80X_CMD_ACTIVE 0x00 /* Switch from Standby/Sleep modes to active mode */
+#define FT80X_CMD_STANDBY 0x41 /* Put FT80x core to standby mode */
+#define FT80X_CMD_SLEEP 0x42 /* Put FT80x core to sleep mode */
+#define FT80X_CMD_CLKEXT 0x44 /* Enable PLL input from oscillator or external clock */
+#define FT80X_CMD_PWRDOWN 0x50 /* Switch off 1.2V internal regulator */
+#define FT80X_CMD_CLK36M 0x61 /* Switch PLL output clock to 36MHz */
+#define FT80X_CMD_CLK48M 0x62 /* Switch PLL output clock to 48MHz (default). */
+#define FT80X_CMD_CORERST 0x68 /* Send reset pulse to FT800 core */
/* Display list command encoding
*
- * Each display list command has a 32-bit encoding. The most significant bits
- * of the code determine the command. Command parameters (if any) are present
- * in the least significant bits. Any bits marked reserved must be zero.
+ * Each display list command has a 32-bit encoding.
+ * The most significant bits of the code determine the command.
+ * Command parameters (if any) are present in the least significant bits.
+ * Any bits marked reserved must be zero.
+ */
+
+/* FT800 graphics engine specific macros useful for static display list
+ * generation
*/
-/* FT800 graphics engine specific macros useful for static display list generation */
/* Setting Graphics state */
+
/* ALPHA_FUNC (0x09) - Set the alpha test function */
#define FT80X_ALPHA_FUNC(func,ref) \
@@ -821,12 +853,16 @@
#define FT80X_SCISSOR_SIZE(width,height) \
((28 << 24) | (((width) & 1023) << 10) | (((height) & 1023) << 0))
-/* SCISSOR_XY (0x1b) - Set the top left corner of the scissor clip rectangle */
+/* SCISSOR_XY (0x1b)
+ * Set the top left corner of the scissor clip rectangle
+ */
#define FT80X_SCISSOR_XY(x,y) \
((27 << 24) | (((x) & 511) << 9) | (((y) & 511) << 0))
-/* STENCIL_FUNC (0x0a) - Set function and reference value for stencil testing */
+/* STENCIL_FUNC (0x0a)
+ * Set function and reference value for stencil testing
+ */
#define FT80X_STENCIL_FUNC(func,ref,mask) \
((10 << 24) | (((func) & 7) << 16) | (((ref) & 255) << 8) | (((mask) & 255) << 0))
@@ -874,6 +910,7 @@
((20 << 24) | (((mask) & 1) << 0))
/* Drawing actions */
+
/* BEGIN (0x1f) - Start drawing a graphics primitive */
#define FT80X_BEGIN(prim) \
@@ -908,6 +945,7 @@
(((handle) & 31) << 7) | (((cell) & 127) << 0))
/* Execution control */
+
/* JUMP (0x1e) - Execute commands at another location in the display list */
#define FT80X_JUMP(dest) \
@@ -937,10 +975,12 @@
/* FT80x Graphic Engine Co-processor commands.
*
- * Like the 32-bit commands above, these commands are elements of the display list.
- * Unlike the 32-bit commands, these all begin with 0xffffffxx and consist of multiple
- * 32-bit words. In all cases, byte data such as strings must be padded to the even
- * 32-bit boundaries.
+ * Like the 32-bit commands above, these commands are elements of the display
+ * list.
+ * Unlike the 32-bit commands, these all begin with 0xffffffxx and consist of
+ * multiple 32-bit words.
+ * In all cases, byte data such as strings must be padded to the even32-bit
+ * boundaries.
*/
#define FT80X_CMD_APPEND 0xffffff1e /* Append memory to a display list */
@@ -1019,14 +1059,16 @@
#define FT80X_OPT_NOHANDS 0x0000c000 /* Co-processor clock widget is drawn without hour, minutes or
* seconds hands */
-/********************************************************************************************
+/****************************************************************************
* Public Types
- ********************************************************************************************/
+ ****************************************************************************/
-/* FT80x Lower Half Interface Definitions ***************************************************/
-/* Pins relevant to software control. The FT80X is a 48-pin part. Most of the pins are
- * associated with the TFT panel and other board-related support. A few a relevant to
- * software control of the part. Those are listed here:
+/* FT80x Lower Half Interface Definitions ***********************************/
+
+/* Pins relevant to software control.
+ * The FT80X is a 48-pin part. Most of the pins are associated with the TFT
+ * panel and other board-related support.
+ * A few a relevant to software control of the part. Those are listed here:
*
* FT80X PIN DIR DESCRIPTION
* 3 I SPI: SCLK, I2C: SCL
@@ -1036,24 +1078,28 @@
* 11 OD nINT Host interrupt
* 12 * nPD Power down input
*
- * In addition, if there is a audio amplifier on board (such as TPA6205A or LM4864), then
- * there may also be an active low audio shutdown output:
+ * In addition, if there is a audio amplifier on board (such as TPA6205A or
+ * LM4864), then there may also be an active low audio shutdown output:
*
* N/A O nSHDN Audio shutdown (active low)
*
- * REVISIT: In all of the architectures that I am aware of, the audio amplifier is
- * controlled by GPIOs driven by the FT80x and, hence, not controllable by board logic.
+ * REVISIT:
+ * In all of the architectures that I am aware of, the audio amplifier is
+ * controlled by GPIOs driven by the FT80x and, hence, not controllable by
+ * board logic.
*
- * SCL/SDA, SCLK/MISO/MOSI/nCS are handled by generic I2C or SPI logic. nInt and nPD are
- * directly managed by this interface.
+ * SCL/SDA, SCLK/MISO/MOSI/nCS are handled by generic I2C or SPI logic.
+ * nInt and nPD are directly managed by this interface.
*/
-/* A reference to a structure of this type must be passed to the FT80X driver. This
- * structure provides information about the configuration of the FT80X and provides some
- * board-specific hooks.
+/* A reference to a structure of this type must be passed to the FT80X
+ * driver.
+ * This structure provides information about the configuration of the FT80X
+ * and provides some board-specific hooks.
*
- * Memory for this structure is provided by the caller. It is not copied by the driver and
- * is presumed to persist while the driver is active. The memory may be read-only.
+ * Memory for this structure is provided by the caller.
+ * It is not copied by the driver and is presumed to persist while
+ * the driver is active. The memory may be read-only.
*/
struct ft80x_config_s
@@ -1066,16 +1112,19 @@ struct ft80x_config_s
uint8_t address; /* 7-bit I2C address */
#endif
- /* IRQ/GPIO access callbacks. These operations all hidden behind callbacks to isolate the
- * FT80X driver from differences in GPIO interrupt handling by varying boards and MCUs.
+ /* IRQ/GPIO access callbacks.
+ * These operations all hidden behind callbacks to isolate the FT80X
+ * driver from differences in GPIO interrupt handling by varying
+ * boards and MCUs.
* Interrupts should be configured on the falling edge of nINT.
*
* attach - Attach the ADS7843E interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt as necessary.
* pwrdown - Power the FT80X up or down.
- * audio - Enable audio (i.e., set the external audio amplifier shutdown pin to the
- * appropriate level to enable or disable the external audio amplifier)
+ * audio - Enable audio (i.e., set the external audio amplifier
+ * shutdown pin to the appropriate level to enable or disable
+ * the external audio amplifier)
* destroy - The driver has been unlinked. Cleanup as necessary.
*/
@@ -1092,7 +1141,8 @@ struct ft80x_config_s
#endif
};
-/* FT80x Display List Command Structures ****************************************************/
+/* FT80x Display List Command Structures ************************************/
+
/* This structure describes one generic display list command */
struct ft80x_dlcmd_s
@@ -1101,6 +1151,7 @@ struct ft80x_dlcmd_s
};
/* Specific display list command structures */
+
/* 32-bit commands */
struct ft80x_cmd32_s
@@ -1245,7 +1296,9 @@ struct ft80x_cmd_getmatrix_s
int32_t f; /* 24: Matrix coefficient F (output) */
};
-/* FT80X_CMD_GETPROPS - Get info for image in RAM_G from last CMD_LOADIMAGE command */
+/* FT80X_CMD_GETPROPS - Get info for image in RAM_G from last
+ * CMD_LOADIMAGE command
+ */
struct ft80x_cmd_getprops_s
{
@@ -1591,9 +1644,11 @@ struct ft80x_cmd_translate_s
int32_t ty; /* 8: Y translate factor (b16) (input) */
};
-/* FT80x IOCTL Argument Structures **********************************************************/
-/* This container structure is used by FT80X_IOC_CREATEDL and FT80X_IOC_APPENDDL. It
- * defines the list of display commands to be written into display list memory.
+/* FT80x IOCTL Argument Structures ******************************************/
+
+/* This container structure is used by FT80X_IOC_CREATEDL and
+ * FT80X_IOC_APPENDDL. It defines the list of display commands
+ * to be written into display list memory.
*/
struct ft80x_displaylist_s
@@ -1602,12 +1657,13 @@ struct ft80x_displaylist_s
struct ft80x_dlcmd_s cmd; /* First command in the display list */
};
-/* This structure is used with the FT80X_IOC_GETRAMDL, FT80X_IOC_PUTRAMG, and
- * FT80X_IOC_PUTRAMCMD IOCTL commands to access particular memory regions via an offset.
+/* This structure is used with the FT80X_IOC_GETRAMDL, FT80X_IOC_PUTRAMG,
+ * and FT80X_IOC_PUTRAMCMD IOCTL commands to access particular memory
+ * regions via an offset.
*
* NOTES:
- * - For FT80X_IOC_GET* commands, the value is an output; for FT80X_IOC_PUT* command, the
- * value is an input.
+ * - For FT80X_IOC_GET* commands, the value is an output;
+ * for FT80X_IOC_PUT* command, the value is an input.
*/
struct ft80x_relmem_s
@@ -1617,8 +1673,8 @@ struct ft80x_relmem_s
FAR void *value; /* Value(s) read from memory base + offset */
};
-/* This structure is used with the FT80X_IOC_EVENTNOTIFY IOCTL command to describe
- * the requested event notification.
+/* This structure is used with the FT80X_IOC_EVENTNOTIFY IOCTL command to
+ * describe the requested event notification.
*/
enum ft80x_notify_e
@@ -1645,8 +1701,8 @@ struct ft80x_notify_s
* IOCTL commands to describe the requested register access.
*
* NOTES:
- * - For FT80X_IOC_GETREGnn, the value is an output; for FT80X_IOC_PUTREGnn,
- * the value is an input.
+ * - For FT80X_IOC_GETREGnn, the value is an output;
+ * for FT80X_IOC_PUTREGnn, the value is an input.
* - The union field used to access the register value depends on the width
* of the requested access.
*/
@@ -1664,22 +1720,22 @@ struct ft80x_register_s
struct ft80x_registers_s
{
- uint32_t addr; /* 32-bit aligned start register address */
- uint8_t nregs; /* Number of 32-bit registers to be accessed */
- FAR uint32_t *value; /* A pointer to an array of 32-bit register values */
+ uint32_t addr; /* 32-bit aligned start register address */
+ uint8_t nregs; /* Number of 32-bit registers to be accessed */
+ FAR uint32_t *value; /* A pointer to an array of 32-bit register values */
};
/* Used with FT80X_IOC_FADE: */
struct ft80x_fade_s
{
- uint8_t duty ; /* Terminal backlight duty as a percentage (0-100) */
- uint16_t delay; /* Total number of milliseconds for the fade (10-16700)*/
+ uint8_t duty ; /* Terminal backlight duty as a percentage (0-100) */
+ uint16_t delay; /* Total number of milliseconds for the fade (10-16700) */
};
-/********************************************************************************************
+/****************************************************************************
* Public Function Prototypes
- ********************************************************************************************/
+ ****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@@ -1689,12 +1745,13 @@ extern "C"
#define EXTERN extern
#endif
-/********************************************************************************************
+/****************************************************************************
* Name: ft80x_register
*
* Description:
- * Configure the ADS7843E to use the provided SPI device instance. This will register
- * the driver as /dev/ft800 or /dev/ft801, depending upon the configuration.
+ * Configure the ADS7843E to use the provided SPI device instance.
+ * This will register the driver as /dev/ft800 or /dev/ft801, depending
+ * upon the configuration.
*
* Input Parameters:
* spi - An SPI driver instance
@@ -1702,10 +1759,11 @@ extern "C"
* lower - Persistent board configuration data / lower half interface
*
* Returned Value:
- * Zero is returned on success. Otherwise, a negated errno value is returned to indicate
- * the nature of the failure.
+ * Zero is returned on success.
+ * Otherwise, a negated errno value is returned to indicate the nature of
+ * the failure.
*
- ********************************************************************************************/
+ ****************************************************************************/
#if defined(CONFIG_LCD_FT80X_SPI)
int ft80x_register(FAR struct spi_dev_s *spi,
diff --git a/include/nuttx/lcd/hd4478ou.h b/include/nuttx/lcd/hd4478ou.h
index d778a53..bf13756 100644
--- a/include/nuttx/lcd/hd4478ou.h
+++ b/include/nuttx/lcd/hd4478ou.h
@@ -1,4 +1,4 @@
-/********************************************************************************************
+/****************************************************************************
* include/nuttx/lcd/hd4478ou.h
*
* Definitions for the Hitachi HD44780U LCD controller (as used in the
@@ -34,14 +34,15 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ********************************************************************************************/
+ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_HD4478OU_H
#define __INCLUDE_NUTTX_HD4478OU_H
-/********************************************************************************************
+/****************************************************************************
* Included Files
- ********************************************************************************************/
+ ****************************************************************************/
+
/* Command set:
*
* RS=0 R/W=0 : Command
@@ -94,38 +95,40 @@
#define HD4478OU_DDRAM_ROW0 0x00
#define HD4478OU_DDRAM_ROW1 0x40
-/********************************************************************************************
+/****************************************************************************
* Pre-processor Definitions
- ********************************************************************************************/
+ ****************************************************************************/
-/********************************************************************************************
+/****************************************************************************
* Public Types
- ********************************************************************************************/
+ ****************************************************************************/
-/********************************************************************************************
+/****************************************************************************
* Public Data
- ********************************************************************************************/
+ ****************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
-/********************************************************************************************
+/****************************************************************************
* Public Function Prototypes
- ********************************************************************************************/
+ ****************************************************************************/
-/********************************************************************************************
+/****************************************************************************
* Name: up_lcd1602_initialize
*
* Description:
- * The LCD1602 is an HD4478OU-based LCD from Wave share. This function initializes the
- * LCD1602 hardware and registers the character driver as /dev/lcd1602.
+ * The LCD1602 is an HD4478OU-based LCD from Wave share.
+ * This function initializes the LCD1602 hardware and registers the
+ * character driver as /dev/lcd1602.
*
- * NOTE: This common interface definition is provided, however, the underlying
+ * NOTE:
+ * This common interface definition is provided, however, the underlying
* implemenataton is always board-specific for this LCD.
*
- ********************************************************************************************/
+ ****************************************************************************/
int up_lcd1602_initialize(void);
diff --git a/include/nuttx/lcd/ili9325.h b/include/nuttx/lcd/ili9325.h
index 94bea4c..b0f1dfd 100644
--- a/include/nuttx/lcd/ili9325.h
+++ b/include/nuttx/lcd/ili9325.h
@@ -1,4 +1,4 @@
-/**************************************************************************************
+/****************************************************************************
* include/nuttx/lcd/ili9325.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
@@ -31,25 +31,26 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- **************************************************************************************/
+ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_ILI9325_H
#define __INCLUDE_NUTTX_LCD_ILI9325_H
-/**************************************************************************************
+/****************************************************************************
* Included Files
- **************************************************************************************/
+ ****************************************************************************/
#include <nuttx/config.h>
-/**************************************************************************************
+/****************************************************************************
* Pre-processor Definitions
- **************************************************************************************/
+ ****************************************************************************/
+
/* ILI9325 ID code */
#define ILI9325_DEVICE_CODE 0x9325
-/* ILI9325 LCD Register Addresses *****************************************************/
+/* ILI9325 LCD Register Addresses *******************************************/
#define ILI9325_DEVICE_CODE_REG 0x00 /* Driver Code Register */
#define ILI9325_START_OSC_CTRL 0x00 /* Start Oscillator Control */
@@ -103,7 +104,8 @@
#define ILI9325_OTP_VCM_STATUS_AND_ENABLE 0xa2 /* OTP VCM Status and Enable */
#define ILI9325_OTP_PROG_ID_KEY 0xa5 /* OTP Programming ID Key */
-/* ILI9325 LCD Register Bit Definitions ***********************************************/
+/* ILI9325 LCD Register Bit Definitions *************************************/
+
/* ILI9325_START_OSC_CTRL, Start Oscillator Control, Offset: 0x00) */
#define ILI9325_START_OSC_CTRL_EN (1 << 0)
@@ -184,7 +186,9 @@
# define ILI9325_DISP_CTRL4_FMI(n) ((uint16_t)(n) << ILI9325_DISP_CTRL4_FMI_SHIFT)
#define ILI9325_DISP_CTRL4_FMARKOE (1 << 3)
-/* ILI9325_RGB_DISP_INTERFACE_CTRL1, RGB Display Interface Control 1, Offset: 0x0c */
+/* ILI9325_RGB_DISP_INTERFACE_CTRL1,
+ * RGB Display Interface Control 1, Offset: 0x0c
+ */
#define ILI9325_RGB_DISP_INTERFACE_CTRL1_RIM_SHIFT 0
#define ILI9325_RGB_DISP_INTERFACE_CTRL1_RIM_MASK (3 << ILI9325_RGB_DISP_INTERFACE_CTRL1_RIM_SHIFT)
@@ -205,7 +209,9 @@
#define ILI9325_FRAME_MAKER_SHIFT_FMP_MASK (0x1ff << ILI9325_FRAME_MAKER_SHIFT_FMP_SHIFT)
# define ILI9325_FRAME_MAKER_SHIFT_FMP(n) ((uint16_t)(n) << ILI9325_FRAME_MAKER_SHIFT_FMP_SHIFT)
-/* ILI9325_RGB_DISP_INTERFACE_CTRL2, RGB Display Interface Control 2, Offset: 0x0f */
+/* ILI9325_RGB_DISP_INTERFACE_CTRL2,
+ * RGB Display Interface Control 2, Offset: 0x0f
+ */
#define ILI9325_RGB_DISP_INTERFACE_CTRL2_EPL (1 << 0)
#define ILI9325_RGB_DISP_INTERFACE_CTRL2_DPL (1 << 1)
@@ -252,13 +258,17 @@
#define ILI9325_POWER_CTRL4_VDV_MASK (0x1f << ILI9325_POWER_CTRL4_VDV_SHIFT)
# define ILI9325_POWER_CTRL4_VDV(n) ((uint16_t)(n) << ILI9325_POWER_CTRL4_VDV_SHIFT)
-/* ILI9325_HORIZONTAL_GRAM_ADDR_SET, Horizontal GRAM Address Set, Offset: 0x20 */
+/* ILI9325_HORIZONTAL_GRAM_ADDR_SET,
+ * Horizontal GRAM Address Set, Offset: 0x20
+ */
#define ILI9325_HORIZONTAL_GRAM_ADDR_SET_AD_SHIFT 0
#define ILI9325_HORIZONTAL_GRAM_ADDR_SET_AD_MASK (0xff << ILI9325_HORIZONTAL_GRAM_ADDR_SET_AD_SHIFT)
# define ILI9325_HORIZONTAL_GRAM_ADDR_SET_AD(n) ((uint16_t)(n) << ILI9325_HORIZONTAL_GRAM_ADDR_SET_AD_SHIFT)
-/* ILI9325_VERTICAL_GRAM_ADDR_SET, Vertical GRAM Address Set, Offset: 0x21 */
+/* ILI9325_VERTICAL_GRAM_ADDR_SET,
+ * Vertical GRAM Address Set, Offset: 0x21
+ */
#define ILI9325_VERTICAL_GRAM_ADDR_SET_AD_SHIFT 0
#define ILI9325_VERTICAL_GRAM_ADDR_SET_AD_MASK (0xff << ILI9325_VERTICAL_GRAM_ADDR_SET_AD_SHIFT)
@@ -270,7 +280,9 @@
#define ILI9325_POWER_CTRL7_VCM_MASK (0x3f << ILI9325_POWER_CTRL7_VCM_SHIFT)
#define ILI9325_POWER_CTRL7_VCM(n) ((uint16_t)(n) << ILI9325_POWER_CTRL7_VCM_SHIFT)
-/* ILI9325_FRAME_RATE_AND_COLOR_CTRL, Frame Rate and Color Control, Offset: 0x2b */
+/* ILI9325_FRAME_RATE_AND_COLOR_CTRL,
+ * Frame Rate and Color Control, Offset: 0x2b
+ */
#define ILI9325_FRAME_RATE_AND_COLOR_CTRL_FRS_SHIFT 0
#define ILI9325_FRAME_RATE_AND_COLOR_CTRL_FRS_MASK (0xf << ILI9325_FRAME_RATE_AND_COLOR_CTRL_FRS_SHIFT)
@@ -366,31 +378,41 @@
#define ILI9325_GAMMA_CTRL10_VRN1_MASK (0x1f << ILI9325_GAMMA_CTRL10_VRN1_SHIFT)
# define ILI9325_GAMMA_CTRL10_VRN1(n) ((uint16_t)(n) << ILI9325_GAMMA_CTRL10_VRN1_SHIFT)
-/* ILI9325_HORIZONTAL_ADDR_START, Horizontal Address Start Position, Offset: 0x50 */
+/* ILI9325_HORIZONTAL_ADDR_START,
+ * Horizontal Address Start Position, Offset: 0x50
+ */
#define ILI9325_HORIZONTAL_ADDR_START_HSA_SHIFT 0
#define ILI9325_HORIZONTAL_ADDR_START_HSA_MASK (0xff << ILI9325_HORIZONTAL_ADDR_START_HSA_SHIFT)
#define ILI9325_HORIZONTAL_ADDR_START_HSA(n) ((uint16_t)(n) << ILI9325_HORIZONTAL_ADDR_START_HSA_SHIFT)
-/* ILI9325_HORIZONTAL_ADDR_END, Horizontal Address End Position, Offset: 0x51 */
+/* ILI9325_HORIZONTAL_ADDR_END,
+ * Horizontal Address End Position, Offset: 0x51
+ */
#define ILI9325_HORIZONTAL_ADDR_END_HEA_SHIFT 0
#define ILI9325_HORIZONTAL_ADDR_END_HEA_MASK (0xff << ILI9325_HORIZONTAL_ADDR_END_HEA_SHIFT)
# define ILI9325_HORIZONTAL_ADDR_END_HEA(n) ((uint16_t)(n) << ILI9325_HORIZONTAL_ADDR_END_HEA_SHIFT)
-/* ILI9325_VERTICAL_ADDR_START, Vertical Address Start Position, Offset: 0x52 */
+/* ILI9325_VERTICAL_ADDR_START,
+ * Vertical Address Start Position, Offset: 0x52
+ */
#define ILI9325_VERTICAL_ADDR_START_VSA_SHIFT 0
#define ILI9325_VERTICAL_ADDR_START_VSA_MASK (0x1ff << ILI9325_VERTICAL_ADDR_START_VSA_SHIFT)
# define ILI9325_VERTICAL_ADDR_START_VSA(n) ((uint16_t)(n) << ILI9325_VERTICAL_ADDR_START_VSA_SHIFT)
-/* ILI9325_VERTICAL_ADDR_END, Vertical Address End Position, Offset: 0x53 */
+/* ILI9325_VERTICAL_ADDR_END,
+ * Vertical Address End Position, Offset: 0x53
+ */
#define ILI9325_VERTICAL_ADDR_END_VEA_SHIFT 0
#define ILI9325_VERTICAL_ADDR_END_VEA_MASK (0x1ff << ILI9325_VERTICAL_ADDR_END_VEA_SHIFT)
# define ILI9325_VERTICAL_ADDR_END_VEA(n) ((uint16_t)(n) << ILI9325_VERTICAL_ADDR_END_VEA_SHIFT)
-/* ILI9325_DRIVER_OUTPUT_CTRL2, Driver Output Control 2, Offset: 0x60 */
+/* ILI9325_DRIVER_OUTPUT_CTRL2,
+ * Driver Output Control 2, Offset: 0x60
+ */
#define ILI9325_DRIVER_OUTPUT_CTRL2_SCN_SHIFT 0
#define ILI9325_DRIVER_OUTPUT_CTRL2_SCN_MASK (0x3f << ILI9325_DRIVER_OUTPUT_CTRL2_SCN_SHIFT)
@@ -400,55 +422,73 @@
# define ILI9325_DRIVER_OUTPUT_CTRL2_NL(n) ((uint16_t)(n) << ILI9325_DRIVER_OUTPUT_CTRL2_NL_SHIFT)
#define ILI9325_DRIVER_OUTPUT_CTRL2_GS (1 << 15)
-/* ILI9325_BASE_IMG_DISP_CTRL, Base Image Display Control, Offset: 0x61 */
+/* ILI9325_BASE_IMG_DISP_CTRL,
+ * Base Image Display Control, Offset: 0x61
+ */
#define ILI9325_BASE_IMG_DISP_CTRL_REV (1 << 0)
#define ILI9325_BASE_IMG_DISP_CTRL_VLE (1 << 1)
#define ILI9325_BASE_IMG_DISP_CTRL_NDL (1 << 2)
-/* ILI9325_VERTICAL_SCROLL_CTRL, Vertical Scroll Control, Offset: 0x6a */
+/* ILI9325_VERTICAL_SCROLL_CTRL,
+ * Vertical Scroll Control, Offset: 0x6a
+ */
#define ILI9325_VERTICAL_SCROLL_CTRL_VL_SHIFT 0
#define ILI9325_VERTICAL_SCROLL_CTRL_VL_MASK (0x1ff << ILI9325_VERTICAL_SCROLL_CTRL_VL_SHIFT)
# define ILI9325_VERTICAL_SCROLL_CTRL_VL(n) ((uint16_t)(n) << ILI9325_VERTICAL_SCROLL_CTRL_VL_SHIFT)
-/* ILI9325_PARTIAL_IMG1_DISP_SHIFT, Partial Image 1 Display Position, Offset: 0x80 */
+/* ILI9325_PARTIAL_IMG1_DISP_SHIFT,
+ * Partial Image 1 Display Position, Offset: 0x80
+ */
#define ILI9325_PARTIAL_IMG1_DISP_SHIFT_PTDP0_SHIFT 0
#define ILI9325_PARTIAL_IMG1_DISP_SHIFT_PTDP0_MASK (0x1ff << ILI9325_PARTIAL_IMG1_DISP_SHIFT_PTDP0_SHIFT)
#define ILI9325_PARTIAL_IMG1_DISP_SHIFT_PTDP0(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG1_DISP_SHIFT_PTDP0_SHIFT)
-/* ILI9325_PARTIAL_IMG1_AREA_START_LINE, Partial Image 1 Area (Start Line), Offset: 0x81 */
+/* ILI9325_PARTIAL_IMG1_AREA_START_LINE,
+ * Partial Image 1 Area (Start Line), Offset: 0x81
+ */
#define ILI9325_PARTIAL_IMG1_AREA_START_LINE_PTSA0_SHIFT 0
#define ILI9325_PARTIAL_IMG1_AREA_START_LINE_PTSA0_MASK (0x1ff << ILI9325_PARTIAL_IMG1_AREA_START_LINE_PTSA0_SHIFT)
# define ILI9325_PARTIAL_IMG1_AREA_START_LINE_PTSA0(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG1_AREA_START_LINE_PTSA0_SHIFT)
-/* ILI9325_PARTIAL_IMG1_AREA_END_LINE, Partial Image 1 Area (End Line), Offset: 0x82 */
+/* ILI9325_PARTIAL_IMG1_AREA_END_LINE,
+ * Partial Image 1 Area (End Line), Offset: 0x82
+ */
#define ILI9325_PARTIAL_IMG1_AREA_END_LINE_PTEA0_SHIFT 0
#define ILI9325_PARTIAL_IMG1_AREA_END_LINE_PTEA0_MASK (0x1ff << ILI9325_PARTIAL_IMG1_AREA_END_LINE_PTEA0_SHIFT)
# define ILI9325_PARTIAL_IMG1_AREA_END_LINE_PTEA0(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG1_AREA_END_LINE_PTEA0_SHIFT)
-/* ILI9325_PARTIAL_IMG2_DISP_SHIFT, Partial Image 2 Display Position, Offset: 0x83 */
+/* ILI9325_PARTIAL_IMG2_DISP_SHIFT,
+ * Partial Image 2 Display Position, Offset: 0x83
+ */
#define ILI9325_PARTIAL_IMG2_DISP_SHIFT_PTDP1_SHIFT 0
#define ILI9325_PARTIAL_IMG2_DISP_SHIFT_PTDP1_MASK (0x1ff << ILI9325_PARTIAL_IMG2_DISP_SHIFT_PTDP1_SHIFT)
# define ILI9325_PARTIAL_IMG2_DISP_SHIFT_PTDP1(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG2_DISP_SHIFT_PTDP1_SHIFT)
-/* ILI9325_PARTIAL_IMG2_AREA_START_LINE, Partial Image 2 Area (Start Line), Offset: 0x84 */
+/* ILI9325_PARTIAL_IMG2_AREA_START_LINE,
+ * Partial Image 2 Area (Start Line), Offset: 0x84
+ */
#define ILI9325_PARTIAL_IMG2_AREA_START_LINE_PTSA1_SHIFT 0
#define ILI9325_PARTIAL_IMG2_AREA_START_LINE_PTSA1_MASK (0x1ff << ILI9325_PARTIAL_IMG2_AREA_START_LINE_PTSA1_SHIFT)
# define ILI9325_PARTIAL_IMG2_AREA_START_LINE_PTSA1(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG2_AREA_START_LINE_PTSA1_SHIFT)
-/* ILI9325_PARTIAL_IMG2_AREA_END_LINE, Partial Image 2 Area (End Line), Offset: 0x85 */
+/* ILI9325_PARTIAL_IMG2_AREA_END_LINE,
+ * Partial Image 2 Area (End Line), Offset: 0x85
+ */
#define ILI9325_PARTIAL_IMG2_AREA_END_LINE_PTEA1_SHIFT 0
#define ILI9325_PARTIAL_IMG2_AREA_END_LINE_PTEA1_MASK (0x1ff << ILI9325_PARTIAL_IMG2_AREA_END_LINE_PTEA1_SHIFT)
# define ILI9325_PARTIAL_IMG2_AREA_END_LINE_PTEA1(n) ((uint16_t)(n) << ILI9325_PARTIAL_IMG2_AREA_END_LINE_PTEA1_SHIFT)
-/* ILI9325_PANEL_INTERFACE_CTRL1, Panel Interface Control 1, Offset: 0x90 */
+/* ILI9325_PANEL_INTERFACE_CTRL1,
+ * Panel Interface Control 1, Offset: 0x90
+ */
#define ILI9325_PANEL_INTERFACE_CTRL1_RTNI_SHIFT 0
#define ILI9325_PANEL_INTERFACE_CTRL1_RTNI_MASK (0x1f << ILI9325_PANEL_INTERFACE_CTRL1_RTNI_SHIFT)
@@ -457,13 +497,17 @@
#define ILI9325_PANEL_INTERFACE_CTRL1_DIVI_MASK (3 << ILI9325_PANEL_INTERFACE_CTRL1_DIVI_SHIFT)
# define ILI9325_PANEL_INTERFACE_CTRL1_DIVI(n) ((uint16_t)(n) << ILI9325_PANEL_INTERFACE_CTRL1_DIVI_SHIFT)
-/* ILI9325_PANEL_INTERFACE_CTRL2, Panel Interface Control 2, Offset: 0x92 */
+/* ILI9325_PANEL_INTERFACE_CTRL2,
+ * Panel Interface Control 2, Offset: 0x92
+ */
#define ILI9325_PANEL_INTERFACE_CTRL2_NOWI_SHIFT 8
#define ILI9325_PANEL_INTERFACE_CTRL2_NOWI_MASK (7 << ILI9325_PANEL_INTERFACE_CTRL2_NOWI_SHIFT)
# define ILI9325_PANEL_INTERFACE_CTRL2_NOWI(n) ((uint16_t)(n) << ILI9325_PANEL_INTERFACE_CTRL2_NOWI_SHIFT)
-/* ILI9325_PANEL_INTERFACE_CTRL4, Panel Interface Control 4, Offset: 0x95 */
+/* ILI9325_PANEL_INTERFACE_CTRL4,
+ * Panel Interface Control 4, Offset: 0x95
+ */
#define ILI9325_PANEL_INTERFACE_CTRL4_RTNE_SHIFT 0
#define ILI9325_PANEL_INTERFACE_CTRL4_RTNE_MASK (0x3f << ILI9325_PANEL_INTERFACE_CTRL4_RTNE_SHIFT)
@@ -472,14 +516,18 @@
#define ILI9325_PANEL_INTERFACE_CTRL4_DIVE_MASK (3 << ILI9325_PANEL_INTERFACE_CTRL4_DIVE_SHIFT)
# define ILI9325_PANEL_INTERFACE_CTRL4_DIVE(n) ((uint16_t)(n) << ILI9325_PANEL_INTERFACE_CTRL4_DIVE_SHIFT)
-/* ILI9325_OTP_VCM_PROG_CTRL, OTP VCM Programming Control, Offset: 0xa1 */
+/* ILI9325_OTP_VCM_PROG_CTRL,
+ * OTP VCM Programming Control, Offset: 0xa1
+ */
#define ILI9325_OTP_VCM_PROG_CTRL_VCM_OTP_SHIFT 0
#define ILI9325_OTP_VCM_PROG_CTRL_VCM_OTP_MASK (0x3f << ILI9325_OTP_VCM_PROG_CTRL_VCM_OTP_SHIFT)
# define ILI9325_OTP_VCM_PROG_CTRL_VCM_OTP(n) ((uint16_t)(n) << ILI9325_OTP_VCM_PROG_CTRL_VCM_OTP_SHIFT)
#define ILI9325_OTP_VCM_PROG_CTRL_OTP_PGM_EN (1 << 11)
-/* ILI9325_OTP_VCM_STATUS_AND_ENABLE, OTP VCM Status and Enable, Offset: 0xa2 */
+/* ILI9325_OTP_VCM_STATUS_AND_ENABLE,
+ * OTP VCM Status and Enable, Offset: 0xa2
+ */
#define ILI9325_OTP_VCM_STATUS_AND_ENABLE_VCM_EN (1 << 0)
#define ILI9325_OTP_VCM_STATUS_AND_ENABLE_VCM_D_SHIFT 8
@@ -489,19 +537,21 @@
#define ILI9325_OTP_VCM_STATUS_AND_ENABLE_PGM_CNT_MASK (3 << ILI9325_OTP_VCM_STATUS_AND_ENABLE_PGM_CNT_SHIFT)
# define ILI9325_OTP_VCM_STATUS_AND_ENABLE_PGM_CNT(n) ((uint16_t)(n) << IILI9325_OTP_VCM_STATUS_AND_ENABLE_PGM_CNT_SHIFT)
-/* ILI9325_OTP_PROG_ID_KEY, OTP Programming ID Key, Offset: 0xa5 */
+/* ILI9325_OTP_PROG_ID_KEY,
+ * OTP Programming ID Key, Offset: 0xa5
+ */
#define ILI9325_OTP_PROG_ID_KEY_KEY_SHIFT 0
#define ILI9325_OTP_PROG_ID_KEY_KEY_MASK (0xffffu << ILI9325_OTP_PROG_ID_KEY_KEY_SHIFT)
# define ILI9325_OTP_PROG_ID_KEY_KEY(n) ((uint16_t)(n) << ILI9325_OTP_PROG_ID_KEY_KEY_SHIFT)
-/**************************************************************************************
+/****************************************************************************
* Public Types
- **************************************************************************************/
+ ****************************************************************************/
-/**************************************************************************************
+/****************************************************************************
* Public Data
- **************************************************************************************/
+ ****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@@ -511,9 +561,9 @@ extern "C"
#define EXTERN extern
#endif
-/**************************************************************************************
+/****************************************************************************
* Public Function Prototypes
- **************************************************************************************/
+ ****************************************************************************/
#undef EXTERN
#ifdef __cplusplus
diff --git a/include/nuttx/lcd/ili9341.h b/include/nuttx/lcd/ili9341.h
index ba8328b..b8a3e74 100644
--- a/include/nuttx/lcd/ili9341.h
+++ b/include/nuttx/lcd/ili9341.h
@@ -46,6 +46,7 @@
/**************************************************************************************
* Pre-processor Definitions
**************************************************************************************/
+
/* ILI9341 ID code */
#define ILI9341_DEVICE_CODE 0x9341
@@ -142,7 +143,9 @@
#define ILI9341_PUMP_RATIO_CONTROL 0xf7 /* Pump ration control */
/* ILI9341 LCD Register Bit Definitions ***********************************************/
+
/* Pixel format set */
+
#define ILI9341_PIXEL_FORMAT_SET_DPI_SHIFT (4)
#define ILI9341_PIXEL_FORMAT_SET_DPI_MASK (7 << ILI9341_PIXEL_FORMAT_SET_DPI_SHIFT)
#define ILI9341_PIXEL_FORMAT_SET_DPI(n) ((n) << ILI9341_PIXEL_FORMAT_SET_DPI_SHIFT)
@@ -239,7 +242,6 @@ struct ili9341_lcd_s
/* mcu interface specific data following */
};
-
/**************************************************************************************
* Public Data
**************************************************************************************/
diff --git a/include/nuttx/lcd/ili9488.h b/include/nuttx/lcd/ili9488.h
index be75555..31e94c9 100644
--- a/include/nuttx/lcd/ili9488.h
+++ b/include/nuttx/lcd/ili9488.h
@@ -15,15 +15,16 @@
* from this software without specific prior written permission.
*
* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
- * DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
*
****************************************************************************/
diff --git a/include/nuttx/lcd/lpm013m091a.h b/include/nuttx/lcd/lpm013m091a.h
index 2d4de1a..2a5803a 100644
--- a/include/nuttx/lcd/lpm013m091a.h
+++ b/include/nuttx/lcd/lpm013m091a.h
@@ -101,8 +101,8 @@ struct lpm013m091a_lcd_s
*
* Input Parameters:
*
- * lcd - A reference to the platform specific driver instance to control the
- * lpm013m091a display driver.
+ * lcd - A reference to the platform specific driver instance to control
+ * the lpm013m091a display driver.
* devno - This is for compat. must be zero.
*
* Returned Value:
diff --git a/include/nuttx/lcd/max7219.h b/include/nuttx/lcd/max7219.h
index c6b279b2..654e41b 100644
--- a/include/nuttx/lcd/max7219.h
+++ b/include/nuttx/lcd/max7219.h
@@ -87,7 +87,6 @@
#define MAX7219_POWER_OFF 0
#define MAX7219_POWER_ON 1
-
/****************************************************************************
* Public Types
****************************************************************************/
diff --git a/include/nuttx/lcd/mio283qt2.h b/include/nuttx/lcd/mio283qt2.h
index 3f6f4ee..8c2965e 100644
--- a/include/nuttx/lcd/mio283qt2.h
+++ b/include/nuttx/lcd/mio283qt2.h
@@ -50,7 +50,9 @@
/**************************************************************************************
* Pre-processor Definitions
**************************************************************************************/
+
/* Configuration **********************************************************************/
+
/* CONFIG_LCD_MIO283QT2 - Enables support for the MIO283QT2-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
diff --git a/include/nuttx/lcd/mio283qt9a.h b/include/nuttx/lcd/mio283qt9a.h
index 476c85d..520170b 100644
--- a/include/nuttx/lcd/mio283qt9a.h
+++ b/include/nuttx/lcd/mio283qt9a.h
@@ -51,7 +51,9 @@
/**************************************************************************************
* Pre-processor Definitions
**************************************************************************************/
+
/* Configuration **********************************************************************/
+
/* CONFIG_LCD_MIO283QT9A - Enables support for the MIO283QT9A-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
diff --git a/include/nuttx/lcd/p14201.h b/include/nuttx/lcd/p14201.h
index fc7e8e2..cdcac45 100644
--- a/include/nuttx/lcd/p14201.h
+++ b/include/nuttx/lcd/p14201.h
@@ -51,8 +51,8 @@
*
* 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_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
diff --git a/include/nuttx/lcd/pcd8544.h b/include/nuttx/lcd/pcd8544.h
index 42458cf..b938faa 100644
--- a/include/nuttx/lcd/pcd8544.h
+++ b/include/nuttx/lcd/pcd8544.h
@@ -63,7 +63,8 @@
*
* Required LCD driver settings:
* CONFIG_LCD_PCD8544 - Enable PCD8544 support
- * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+ * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be
+ * accepted.
* CONFIG_LCD_MAXPOWER should be 2: 0=off, 1=dim, 2=normal
*
* Required SPI driver settings:
@@ -108,7 +109,8 @@ extern "C"
* Input Parameters:
*
* spi - A reference to the SPI driver instance.
- * devno - A value in the range of 0 thropcd8544h CONFIG_PCD8544_NINTERFACES-1.
+ * devno - A value in the range of 0 thropcd8544h
+ * CONFIG_PCD8544_NINTERFACES-1.
* This allows support for multiple LCD devices.
*
* Returned Value:
@@ -120,7 +122,8 @@ extern "C"
struct lcd_dev_s; /* see nuttx/lcd.h */
struct spi_dev_s; /* see nuttx/spi/spi.h */
-FAR struct lcd_dev_s *pcd8544_initialize(FAR struct spi_dev_s *spi, unsigned int devno);
+FAR struct lcd_dev_s *pcd8544_initialize(FAR struct spi_dev_s *spi,
+ unsigned int devno);
#ifdef __cplusplus
}
diff --git a/include/nuttx/lcd/pcf8574_lcd_backpack.h b/include/nuttx/lcd/pcf8574_lcd_backpack.h
index ebcf3f0..24f7716 100644
--- a/include/nuttx/lcd/pcf8574_lcd_backpack.h
+++ b/include/nuttx/lcd/pcf8574_lcd_backpack.h
@@ -51,15 +51,16 @@
* Pre-processor Definitions
****************************************************************************/
-/* Configurations of some well-known boards. You may still have to modify the
- * address if was changed from the default. You will also need to specify the
- * geometry of your attached LCD display. You can support:
+/* Configurations of some well-known boards.
+ * You may still have to modify the address if was changed from the default.
+ * You will also need to specify the geometry of your attached LCD display.
+ * You can support:
* 1x8, 1x12, 1x16, 2x8, 2x12, 2x16, 2x20, 2x24, 2x40, 4x16, 4x20
- * Pretty much anything on the market except 4x40, which really consists of two
- * separate 2x40 controllers, and the I2C backpack doesn't support those due
- * to the second 'E' line being needed.
- * Additionally, you still need to set the (row,col) geometry explicitly, since
- * there is not a means of determining this dynamically.
+ * Pretty much anything on the market except 4x40, which really consists of
+ * two separate 2x40 controllers, and the I2C backpack doesn't support those
+ * due to the second 'E' line being needed.
+ * Additionally, you still need to set the (row,col) geometry explicitly,
+ * since there is not a means of determining this dynamically.
* Consider these 'informative'.
* XXX Note, actual testing has been done on LCD_I2C_BACKPACK_CFG_MJKDZ
* and LCD_I2C_BACKPACK_CFG_SAINSMART only, the others come from online
@@ -93,7 +94,7 @@
#define SLCDIOC_CREATECHAR _SLCDIOC(0x80)
- /****************************************************************************
+/****************************************************************************
* Public Types
****************************************************************************/
@@ -114,7 +115,9 @@ struct pcf8574_lcd_backpack_config_s
uint8_t d6; /* gpio bit for LCD D6 */
uint8_t d7; /* gpio bit for LCD D7 */
uint8_t bl; /* gpio bit for backlight control */
+
bool bl_active_high; /* is the backlight control active high? */
+
uint8_t rows; /* screen geometry, rows, 1, 2 or 4 */
uint8_t cols; /* screen geometry, cols, 8, 12, 16, 20, 24, 40 */
};
@@ -137,7 +140,7 @@ struct slcd_createchar_s
};
/****************************************************************************
- * Public Functions
+ * Public Functions Definitions
****************************************************************************/
/****************************************************************************
@@ -148,7 +151,8 @@ struct slcd_createchar_s
* PCF8574 I2C IO expander. It allows operation of the ever-popular HD44780
* based LCDs via I2C instead of parallel (saving a bunch of gpio lines).
*
- * There are a multitude of these available from various sources (e.g. ebay).
+ * There are a multitude of these available from various sources
+ * (e.g. ebay).
* They typically vary by gpio-to-lcd pin mapping, and I2C address, but
* otherwise are functionally identical.
*
@@ -166,14 +170,15 @@ struct slcd_createchar_s
* characters; see above for details.
*
* Input Parameters:
- * devpath - path to device node; arbitrary, but typically '/dev/lcd0' or such
+ * devpath - path to device node; arbitrary, but typically '/dev/lcd0' or
+ * such
* i2c - the low-level i2c bus onto which to bind
* cfg - the board-specific configuration
*
****************************************************************************/
int pcf8574_lcd_backpack_register(FAR const char *devpath,
- FAR struct i2c_master_s *i2c,
- FAR struct pcf8574_lcd_backpack_config_s *cfg);
+ FAR struct i2c_master_s *i2c,
+ FAR struct pcf8574_lcd_backpack_config_s *cfg);
#endif /* __INCLUDE_NUTTX_LCD_PCF8574_LCD_BACKPACK_H */
diff --git a/include/nuttx/lcd/ra8875.h b/include/nuttx/lcd/ra8875.h
index 6e654aa..cd4c7c3 100644
--- a/include/nuttx/lcd/ra8875.h
+++ b/include/nuttx/lcd/ra8875.h
@@ -50,7 +50,9 @@
/**************************************************************************************
* Pre-processor Definitions
**************************************************************************************/
+
/* Configuration **********************************************************************/
+
/* CONFIG_LCD_RA8875 - Enables support for the RA8875-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
diff --git a/include/nuttx/lcd/slcd_codec.h b/include/nuttx/lcd/slcd_codec.h
index b9f5088..0827fce 100644
--- a/include/nuttx/lcd/slcd_codec.h
+++ b/include/nuttx/lcd/slcd_codec.h
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
* include/nuttx/lcd/slcd_codec.h
* Serialize and marshaling data and events for character-based, segment LCDs
*
@@ -32,7 +32,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************************************/
+ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_SLCD_CODEC_H
#define __INCLUDE_NUTTX_LCD_SLCD_CODEC_H
diff --git a/include/nuttx/lcd/slcd_ioctl.h b/include/nuttx/lcd/slcd_ioctl.h
index 1fb1ab6..75725ef 100644
--- a/include/nuttx/lcd/slcd_ioctl.h
+++ b/include/nuttx/lcd/slcd_ioctl.h
@@ -47,6 +47,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+
/* IOCTL commands that may be supported by some SLCD drivers */
/* SLCDIOC_GETATTRIBUTES: Get the attributes of the SLCD
diff --git a/include/nuttx/lcd/ssd1289.h b/include/nuttx/lcd/ssd1289.h
index bf5d91c..1da4bef 100644
--- a/include/nuttx/lcd/ssd1289.h
+++ b/include/nuttx/lcd/ssd1289.h
@@ -50,7 +50,9 @@
/**************************************************************************************
* Pre-processor Definitions
**************************************************************************************/
+
/* Configuration **********************************************************************/
+
/* CONFIG_LCD_SSD1289 - Enables support for the SSD1289-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
diff --git a/include/nuttx/lcd/st7032.h b/include/nuttx/lcd/st7032.h
index 481a5dc..83d98d6 100644
--- a/include/nuttx/lcd/st7032.h
+++ b/include/nuttx/lcd/st7032.h
@@ -145,7 +145,7 @@ extern "C"
*
****************************************************************************/
- struct i2c_master_s; /* Forward reference */
+struct i2c_master_s; /* Forward reference */
int st7032_register(FAR const char *devpath, FAR struct i2c_master_s *i2c);
diff --git a/include/nuttx/lcd/st7567.h b/include/nuttx/lcd/st7567.h
index cbebe40..24cf762 100644
--- a/include/nuttx/lcd/st7567.h
+++ b/include/nuttx/lcd/st7567.h
@@ -67,7 +67,8 @@
*
* Required LCD driver settings:
* CONFIG_LCD_ST7567 - Enable ST7567 support
- * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+ * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be
+ * accepted.
* CONFIG_LCD_MAXPOWER should be 2: 0=off, 1=dim, 2=normal
*
* Required SPI driver settings:
@@ -112,7 +113,8 @@ extern "C"
* Input Parameters:
*
* spi - A reference to the SPI driver instance.
- * devno - A value in the range of 0 throst7567h CONFIG_ST7567_NINTERFACES-1.
+ * devno - A value in the range of 0 throst7567h
+ * CONFIG_ST7567_NINTERFACES-1.
* This allows support for multiple LCD devices.
*
* Returned Value:
@@ -124,7 +126,8 @@ extern "C"
struct lcd_dev_s; /* see nuttx/lcd.h */
struct spi_dev_s; /* see nuttx/spi/spi.h */
-FAR struct lcd_dev_s *st7567_initialize(FAR struct spi_dev_s *spi, unsigned int devno);
+FAR struct lcd_dev_s *st7567_initialize(FAR struct spi_dev_s *spi,
+ unsigned int devno);
/****************************************************************************
* Name: st7567_power
@@ -143,7 +146,7 @@ FAR struct lcd_dev_s *st7567_initialize(FAR struct spi_dev_s *spi, unsigned int
* Returned Value:
* None
*
- **************************************************************************************/
+ ****************************************************************************/
#ifdef CONFIG_ST7567_POWER
void st7567_power(unsigned int devno, bool on);
diff --git a/include/nuttx/lcd/ug-2864ambag01.h b/include/nuttx/lcd/ug-2864ambag01.h
index 6738480..f9d3862 100644
--- a/include/nuttx/lcd/ug-2864ambag01.h
+++ b/include/nuttx/lcd/ug-2864ambag01.h
@@ -1,17 +1,19 @@
-/**************************************************************************************
+/****************************************************************************
* include/nuttx/lcd/ug-2864ambag01.h
*
- * Driver for Univision UG-2864AMBAG01 OLED display (with SH1101A controller) in SPI
- * mode
+ * Driver for Univision UG-2864AMBAG01 OLED display (with SH1101A controller)
+ * in SPI mode
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gn...@nuttx.org>
*
* References:
- * 1. Product Specification (Preliminary), Part Name: OEL Display Module, Part ID:
- * UG-2864AMBAG01, Doc No: SASI-9015-A, Univision Technology Inc.
- * 2. SH1101A, 132 X 64 Dot Matrix OLED/PLED, Preliminary Segment/Common Driver with
- * Controller, Sino Wealth
+ * 1. Product Specification (Preliminary),
+ * Part Name: OEL Display Module,
+ * Part ID: UG-2864AMBAG01,
+ * Doc No: SASI-9015-A, Univision Technology Inc.
+ * 2. SH1101A, 132 X 64 Dot Matrix OLED/PLED,
+ * Preliminary Segment/Common Driver with Controller, Sino Wealth
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,14 +42,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- **************************************************************************************/
+ ****************************************************************************/
#ifndef __INCLUDE_NUTTX_UG_8264AMBAG01_H
#define __INCLUDE_NUTTX_UG_8264AMBAG01_H
-/**************************************************************************************
+/****************************************************************************
* Included Files
- **************************************************************************************/
+ ****************************************************************************/
#include <nuttx/config.h>
@@ -57,21 +59,25 @@
#ifdef CONFIG_LCD_UG2864AMBAG01
-/**************************************************************************************
+/****************************************************************************
* Pre-processor Definitions
- **************************************************************************************/
-/* Configuration **********************************************************************/
+ ****************************************************************************/
+
+/* Configuration ************************************************************/
+
/* UG-2864AMBAG01 Configuration Settings:
*
* CONFIG_UG2864AMBAG01_SPIMODE - Controls the SPI mode
* CONFIG_UG2864AMBAG01_FREQUENCY - Define to use a different bus frequency
- * CONFIG_UG2864AMBAG01_NINTERFACES - Specifies the number of physical UG-2864AMBAG01
+ * CONFIG_UG2864AMBAG01_NINTERFACES - Specifies the number of physical
+ * UG-2864AMBAG01
* devices that will be supported.
*
* Required LCD driver settings:
*
* CONFIG_LCD_UG28AMBAG01 - Enable UG-2864AMBAG01 support
- * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+ * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be
+ * accepted.
* CONFIG_LCD_MAXPOWER must be 1
*
* Option LCD driver settings:
@@ -87,8 +93,8 @@
* "The serial interface consists of serial clock SCL, serial data SI, A0 and
* CS . SI is shifted into an 8-bit shift register on every rising edge of
* SCL in the order of D7, D6, � and D0. A0 is sampled on every eighth clock
- * and the data byte in the shift register is written to the display data RAM
- * or command register in the same clock."
+ * and the data byte in the shift register is written to the display data
+ * RAM or command register in the same clock."
*
* MODE 3:
* Clock polarity: High (CPOL=1)
@@ -100,18 +106,18 @@
#endif
/* "This module determines whether the input data is interpreted as data or
- * command. When A0 = �H�, the inputs at D7 - D0 are interpreted as data and be
- * written to display RAM. When A0 = �L�, the inputs at D7 - D0 are interpreted
- * as command, they will be decoded and be written to the corresponding command
- * registers.
+ * command. When A0 = �H�, the inputs at D7 - D0 are interpreted as data and
+ * be written to display RAM. When A0 = �L�, the inputs at D7 - D0 are
+ * interpreted as command, they will be decoded and be written to the
+ * corresponding command registers.
*/
#ifndef CONFIG_SPI_CMDDATA
# error "CONFIG_SPI_CMDDATA must be defined in your NuttX configuration"
#endif
-/* CONFIG_UG2864AMBAG01_NINTERFACES determines the number of physical interfaces
- * that will be supported.
+/* CONFIG_UG2864AMBAG01_NINTERFACES determines the number of physical
+ * interfaces that will be supported.
*/
#ifndef CONFIG_UG2864AMBAG01_NINTERFACES
@@ -178,35 +184,37 @@
#define UG_Y1_BLACK 0
#define UG_Y1_WHITE 1
-/**************************************************************************************
+/****************************************************************************
* Public Types
- **************************************************************************************/
+ ****************************************************************************/
-/**************************************************************************************
+/****************************************************************************
* Public Data
- **************************************************************************************/
+ ****************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
-/**************************************************************************************
+/****************************************************************************
* Public Function Prototypes
- **************************************************************************************/
+ ****************************************************************************/
-/**************************************************************************************
+/****************************************************************************
* Name: ug2864ambag01_initialize
*
* Description:
- * Initialize the UG-2864AMBAG01 video hardware. The initial state of the
- * OLED is fully initialized, display memory cleared, and the OLED ready
- * to use, but with the power setting at 0 (full off == sleep mode).
+ * Initialize the UG-2864AMBAG01 video hardware.
+ * The initial state of the OLED is fully initialized, display memory
+ * cleared, and the OLED ready to use, but with the power setting at 0
+ * (full off == sleep mode).
*
* Input Parameters:
*
* spi - A reference to the SPI driver instance.
- * devno - A value in the range of 0 through CONFIG_UG2864AMBAG01_NINTERFACES-1.
+ * devno - A value in the range of 0 through
+ * CONFIG_UG2864AMBAG01_NINTERFACES-1.
* This allows support for multiple OLED devices.
*
* Returned Value:
@@ -214,19 +222,20 @@ extern "C"
* On success, this function returns a reference to the LCD object for
* the specified OLED. NULL is returned on any failure.
*
- **************************************************************************************/
+ ****************************************************************************/
struct lcd_dev_s; /* See include/nuttx/lcd/lcd.h */
struct spi_dev_s; /* See include/nuttx/spi/spi.h */
FAR struct lcd_dev_s *ug2864ambag01_initialize(FAR struct spi_dev_s *spi,
unsigned int devno);
-/************************************************************************************************
+/****************************************************************************
* Name: ug2864ambag01_fill
*
* Description:
- * This non-standard method can be used to clear the entire display by writing one
- * color to the display. This is much faster than writing a series of runs.
+ * This non-standard method can be used to clear the entire display by
+ * writing one color to the display. This is much faster than writing a
+ * series of runs.
*
* Input Parameters:
* priv - Reference to private driver structure
@@ -234,7 +243,7 @@ FAR struct lcd_dev_s *ug2864ambag01_initialize(FAR struct spi_dev_s *spi,
* Assumptions:
* Caller has selected the OLED section.
*
- **************************************************************************************/
+ ****************************************************************************/
void ug2864ambag01_fill(FAR struct lcd_dev_s *dev, uint8_t color);
diff --git a/include/nuttx/lcd/ug-9664hswag01.h b/include/nuttx/lcd/ug-9664hswag01.h
index d6195e9..e5080e6 100644
--- a/include/nuttx/lcd/ug-9664hswag01.h
+++ b/include/nuttx/lcd/ug-9664hswag01.h
@@ -62,7 +62,8 @@
*
* Required LCD driver settings:
* CONFIG_LCD_UG9664HSWAG01 - Enable UG-9664HSWAG01 support
- * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+ * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be
+ * accepted.
* CONFIG_LCD_MAXPOWER should be 2: 0=off, 1=dim, 2=normal
*
* Required SPI driver settings:
@@ -108,7 +109,8 @@ extern "C"
* Input Parameters:
*
* spi - A reference to the SPI driver instance.
- * devno - A value in the range of 0 through CONFIG_UG9664HSWAG01_NINTERFACES-1.
+ * devno - A value in the range of 0 through
+ * CONFIG_UG9664HSWAG01_NINTERFACES-1.
* This allows support for multiple OLED devices.
*
* Returned Value:
@@ -120,7 +122,8 @@ extern "C"
struct lcd_dev_s; /* see nuttx/lcd.h */
struct spi_dev_s; /* see nuttx/spi/spi.h */
-FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi, unsigned int devno);
+FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi,
+ unsigned int devno);
/****************************************************************************
* Name: ug_power
@@ -132,14 +135,15 @@ FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi, unsigned int devn
*
* Input Parameters:
*
- * devno - A value in the range of 0 through CONFIG_UG9664HSWAG01_NINTERFACES-1.
+ * devno - A value in the range of 0 through
+ * CONFIG_UG9664HSWAG01_NINTERFACES-1.
* This allows support for multiple OLED devices.
* on - true:turn power on, false: turn power off.
*
* Returned Value:
* None
*
- **************************************************************************************/
+ ****************************************************************************/
#ifdef CONFIG_UG9664HSWAG01_POWER
void ug_power(unsigned int devno, bool on);