Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s
166 lines
5.9 KiB
C
166 lines
5.9 KiB
C
|
|
/**
|
|
******************************************************************************
|
|
* @file otm8009a_reg.h
|
|
* @author MCD Application Team
|
|
* @brief This file contains all the constants parameters for the OTM8009A
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* Copyright (c) 2019 STMicroelectronics.
|
|
* All rights reserved.
|
|
*
|
|
* This software is licensed under terms that can be found in the LICENSE file
|
|
* in the root directory of this software component.
|
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef OTM8009A_REG_H
|
|
#define OTM8009A_REG_H
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#include <cmsis_compiler.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** @addtogroup BSP
|
|
* @{
|
|
*/
|
|
|
|
/** @addtogroup Components
|
|
* @{
|
|
*/
|
|
|
|
/** @addtogroup OTM8009A
|
|
* @{
|
|
*/
|
|
|
|
|
|
/** @defgroup OTM8009A_Exported_Constants
|
|
* @{
|
|
*/
|
|
|
|
/* List of OTM8009A used commands */
|
|
/* Detailed in OTM8009A Data Sheet 'DATA_SHEET_OTM8009A_V0 92.pdf' */
|
|
/* Version of 14 June 2012 */
|
|
#define OTM8009A_CMD_NOP 0x00 /* NOP command */
|
|
#define OTM8009A_CMD_SWRESET 0x01 /* Sw reset command */
|
|
#define OTM8009A_CMD_RDDMADCTL 0x0B /* Read Display MADCTR command : read memory display access ctrl */
|
|
#define OTM8009A_CMD_RDDCOLMOD 0x0C /* Read Display pixel format */
|
|
#define OTM8009A_CMD_SLPIN 0x10 /* Sleep In command */
|
|
#define OTM8009A_CMD_SLPOUT 0x11 /* Sleep Out command */
|
|
#define OTM8009A_CMD_PTLON 0x12 /* Partial mode On command */
|
|
|
|
#define OTM8009A_CMD_DISPOFF 0x28 /* Display Off command */
|
|
#define OTM8009A_CMD_DISPON 0x29 /* Display On command */
|
|
|
|
#define OTM8009A_CMD_CASET 0x2A /* Column address set command */
|
|
#define OTM8009A_CMD_PASET 0x2B /* Page address set command */
|
|
|
|
#define OTM8009A_CMD_RAMWR 0x2C /* Memory (GRAM) write command */
|
|
#define OTM8009A_CMD_RAMRD 0x2E /* Memory (GRAM) read command */
|
|
|
|
#define OTM8009A_CMD_PLTAR 0x30 /* Partial area command (4 parameters) */
|
|
|
|
#define OTM8009A_CMD_TEOFF 0x34 /* Tearing Effect Line Off command : command with no parameter */
|
|
|
|
#define OTM8009A_CMD_TEEON 0x35 /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */
|
|
|
|
/* Parameter TELOM : Tearing Effect Line Output Mode : possible values */
|
|
#define OTM8009A_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00
|
|
#define OTM8009A_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01
|
|
|
|
#define OTM8009A_CMD_MADCTR 0x36 /* Memory Access write control command */
|
|
|
|
/* Possible used values of MADCTR */
|
|
#define OTM8009A_MADCTR_MODE_PORTRAIT 0x00
|
|
#define OTM8009A_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */
|
|
|
|
#define OTM8009A_CMD_IDMOFF 0x38 /* Idle mode Off command */
|
|
#define OTM8009A_CMD_IDMON 0x39 /* Idle mode On command */
|
|
|
|
#define OTM8009A_CMD_COLMOD 0x3A /* Interface Pixel format command */
|
|
|
|
/* Possible values of COLMOD parameter corresponding to used pixel formats */
|
|
#define OTM8009A_COLMOD_RGB565 0x55
|
|
#define OTM8009A_COLMOD_RGB888 0x77
|
|
|
|
#define OTM8009A_CMD_RAMWRC 0x3C /* Memory write continue command */
|
|
#define OTM8009A_CMD_RAMRDC 0x3E /* Memory read continue command */
|
|
|
|
#define OTM8009A_CMD_WRTESCN 0x44 /* Write Tearing Effect Scan line command */
|
|
#define OTM8009A_CMD_RDSCNL 0x45 /* Read Tearing Effect Scan line command */
|
|
|
|
/* CABC Management : ie : Content Adaptive Back light Control in IC OTM8009a */
|
|
#define OTM8009A_CMD_WRDISBV 0x51 /* Write Display Brightness command */
|
|
#define OTM8009A_CMD_WRCTRLD 0x53 /* Write CTRL Display command */
|
|
#define OTM8009A_CMD_WRCABC 0x55 /* Write Content Adaptive Brightness command */
|
|
#define OTM8009A_CMD_WRCABCMB 0x5E /* Write CABC Minimum Brightness command */
|
|
|
|
#define OTM8009A_CMD_ID1 0xDA /* Read ID1 command */
|
|
#define OTM8009A_CMD_ID2 0xDB /* Read ID2 command */
|
|
#define OTM8009A_CMD_ID3 0xDC /* Read ID3 command */
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
|
|
/** @defgroup OTM8009A_Exported_Macros OTM8009A Exported Macros
|
|
* @{
|
|
*/
|
|
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
/* Exported functions --------------------------------------------------------*/
|
|
|
|
/** @addtogroup OTM8009A_Exported_Functions
|
|
* @{
|
|
*/
|
|
/************** Generic Function *******************/
|
|
|
|
typedef int32_t (*OTM8009A_Write_Func)(void *, uint16_t, uint8_t*, uint16_t);
|
|
typedef int32_t (*OTM8009A_Read_Func) (void *, uint16_t, uint8_t*, uint16_t);
|
|
|
|
typedef struct
|
|
{
|
|
OTM8009A_Write_Func WriteReg;
|
|
OTM8009A_Read_Func ReadReg;
|
|
void *handle;
|
|
} otm8009a_ctx_t;
|
|
|
|
/*******************************************************************************
|
|
* Register : Generic - All
|
|
* Address : Generic - All
|
|
* Bit Group Name: None
|
|
* Permission : W
|
|
*******************************************************************************/
|
|
int32_t otm8009a_read_reg(otm8009a_ctx_t *ctx, uint16_t reg, uint8_t *pdata, uint16_t length);
|
|
int32_t otm8009a_write_reg(otm8009a_ctx_t *ctx, uint16_t reg, const uint8_t *pdata, uint16_t length);
|
|
/**
|
|
* @}
|
|
*/
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* OTM8009A_REG_H */
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
/**
|
|
* @}
|
|
*/
|