mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
include: nuttx: lcd: nxstyle fixes
Nxstyle fixes to pass CI Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
647adf9fcc
commit
785cb0dffe
+373
-315
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
|
||||
|
||||
+88
-38
@@ -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
|
||||
|
||||
@@ -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
|
||||
**************************************************************************************/
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
#define MAX7219_POWER_OFF 0
|
||||
#define MAX7219_POWER_ON 1
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 <gnutt@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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user