mirror of
https://github.com/STMicroelectronics/STM32CubeF7.git
synced 2025-04-24 13:48:54 +08:00
Update STM32F769I-Discovery BSP drivers to support new nt35510 component available on new LCD DSI daughter board MB1166 RevA09 and above versions.
This commit is contained in:
parent
6a3b9bb8d0
commit
6eed5bb153
55
Drivers/BSP/Components/nt35510/Release_Notes.html
Normal file
55
Drivers/BSP/Components/nt35510/Release_Notes.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for NT35510 Component Drivers</title>
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../../../_htmresc/mini-st.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<div class="card fluid">
|
||||
<div class="sectione dark">
|
||||
<center>
|
||||
<h1 id="release-notes-for-nt35510-component-drivers"><small>Release Notes for</small> <mark>NT35510 Component Drivers</mark></h1>
|
||||
<p>Copyright © 2020 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="../../../../_htmresc/st_logo.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<h1 id="license">License</h1>
|
||||
<p>Licensed by ST under BSD 3-Clause license (the "License"). You may not use this package except in compliance with the License. You may obtain a copy of the License at:</p>
|
||||
<p><a href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a></p>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This directory contains the NT35510 LCD DSI component drivers.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1_0_0" checked aria-hidden="true"> <label for="collapse-section1_0_0" aria-hidden="true">V1.0.0 / 11-December-2020</label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First official release</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <a href="http://www.st.com/STM32">http://www.st.com/STM32</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
252
Drivers/BSP/Components/nt35510/nt35510.c
Normal file
252
Drivers/BSP/Components/nt35510/nt35510.c
Normal file
@ -0,0 +1,252 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file nt35510.c
|
||||
* @author MCD Application Team
|
||||
* @brief This file provides the LCD Driver for Frida Techshine 3K138 (WVGA)
|
||||
* DSI LCD Display NT35510.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "nt35510.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup NT35510 NT35510
|
||||
* @brief This file provides a set of functions needed to drive the
|
||||
* NT35510 IC display driver.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Private types -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup NT35510_Private_Constants NT35510 Private Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*
|
||||
* @brief Constant tables of register settings used to transmit DSI
|
||||
* command packets as power up initialization sequence of the Frida 3K138
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
/** @defgroup NT35510_Exported_Variables
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported functions ---------------------------------------------------------*/
|
||||
/** @defgroup NT35510_Exported_Functions OTM8009A Exported Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Initializes the LCD Frida display part by communication in DSI mode in Video Mode
|
||||
* with IC Display Driver NT35510 (see IC Driver specification for more information).
|
||||
* @param hdsi_eval : pointer on DSI configuration structure
|
||||
* @param hdsivideo_handle : pointer on DSI video mode configuration structure
|
||||
* @retval Status
|
||||
*/
|
||||
uint8_t NT35510_Init(uint32_t ColorCoding, uint32_t orientation)
|
||||
{
|
||||
NT35510_IO_Delay(120);
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* Proprietary Initialization */
|
||||
/* ************************************************************************** */
|
||||
const uint8_t nt35510_reg[] = {0x55, 0xAA, 0x52, 0x08, 0x01, 0xF0};
|
||||
const uint8_t nt35510_reg1[] = {0x03, 0x03, 0x03, 0xB0};
|
||||
const uint8_t nt35510_reg2[] = {0x46, 0x46, 0x46, 0xB6};
|
||||
const uint8_t nt35510_reg3[] = {0x03, 0x03, 0x03, 0xB1};
|
||||
const uint8_t nt35510_reg4[] = {0x36, 0x36, 0x36, 0xB7};
|
||||
const uint8_t nt35510_reg5[] = {0x00, 0x00, 0x02, 0xB2};
|
||||
const uint8_t nt35510_reg6[] = {0x26, 0x26, 0x26, 0xB8};
|
||||
const uint8_t nt35510_reg7[] = {0xBF, 0x01};
|
||||
const uint8_t nt35510_reg8[] = {0x09, 0x09, 0x09, 0xB3};
|
||||
const uint8_t nt35510_reg9[] = {0x36, 0x36, 0x36, 0xB9};
|
||||
const uint8_t nt35510_reg10[] = {0x08, 0x08, 0x08, 0xB5};
|
||||
const uint8_t nt35510_reg12[] = {0x26, 0x26, 0x26, 0xBA};
|
||||
const uint8_t nt35510_reg13[] = {0x00, 0x80, 0x00, 0xBC};
|
||||
const uint8_t nt35510_reg14[] = {0x00, 0x80, 0x00, 0xBD};
|
||||
const uint8_t nt35510_reg15[] = {0x00, 0x50, 0xBE};
|
||||
const uint8_t nt35510_reg16[] = {0x55, 0xAA, 0x52, 0x08, 0x00, 0xF0};
|
||||
const uint8_t nt35510_reg17[] = {0xFC, 0x00, 0xB1};
|
||||
const uint8_t nt35510_reg18[] = {0xB6, 0x03};
|
||||
const uint8_t nt35510_reg19[] = {0xB5, 0x51};
|
||||
const uint8_t nt35510_reg20[] = {0x00, 0x00, 0xB7};
|
||||
const uint8_t nt35510_reg21[] = {0x01, 0x02, 0x02, 0x02, 0xB8};
|
||||
const uint8_t nt35510_reg22[] = {0x00, 0x00, 0x00, 0xBC};
|
||||
const uint8_t nt35510_reg23[] = {0x03, 0x00, 0x00, 0xCC};
|
||||
const uint8_t nt35510_reg24[] = {0xBA, 0x01};
|
||||
const uint8_t nt35510_madctl_portrait[] = {NT35510_CMD_MADCTL ,0x00};
|
||||
const uint8_t nt35510_caset_portrait[] = {0x00, 0x00, 0x01, 0xDF ,NT35510_CMD_CASET};
|
||||
const uint8_t nt35510_raset_portrait[] = {0x00, 0x00, 0x03, 0x1F ,NT35510_CMD_RASET};
|
||||
const uint8_t nt35510_madctl_landscape[] = {NT35510_CMD_MADCTL, 0x60};
|
||||
const uint8_t nt35510_caset_landscape[] = {0x00, 0x00, 0x03, 0x1F ,NT35510_CMD_CASET};
|
||||
const uint8_t nt35510_raset_landscape[] = {0x00, 0x00, 0x01, 0xDF ,NT35510_CMD_RASET};
|
||||
const uint8_t nt35510_reg26[] = {NT35510_CMD_TEEON, 0x00}; /* Tear on */
|
||||
const uint8_t nt35510_reg27[] = {NT35510_CMD_SLPOUT, 0x00}; /* Sleep out */
|
||||
const uint8_t nt35510_reg30[] = {NT35510_CMD_DISPON, 0x00};
|
||||
|
||||
const uint8_t nt35510_reg31[] = {NT35510_CMD_WRDISBV, 0x7F};
|
||||
const uint8_t nt35510_reg32[] = {NT35510_CMD_WRCTRLD, 0x2C};
|
||||
const uint8_t nt35510_reg33[] = {NT35510_CMD_WRCABC, 0x02};
|
||||
const uint8_t nt35510_reg34[] = {NT35510_CMD_WRCABCMB, 0xFF};
|
||||
const uint8_t nt35510_reg35[] = {NT35510_CMD_RAMWR, 0x00};
|
||||
const uint8_t nt35510_reg36[] = {NT35510_CMD_COLMOD, NT35510_COLMOD_RGB565};
|
||||
const uint8_t nt35510_reg37[] = {NT35510_CMD_COLMOD, NT35510_COLMOD_RGB888};
|
||||
|
||||
DSI_IO_WriteCmd(5, (uint8_t *)nt35510_reg); /* LV2: Page 1 enable */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg1);/* AVDD: 5.2V */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg2);/* AVDD: Ratio */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg3);/* AVEE: -5.2V */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg4);/* AVEE: Ratio */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg5);/* VCL: -2.5V */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg6);/* VCL: Ratio */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg7);/* VGH: 15V (Free Pump) */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg8);
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg9);/* VGH: Ratio */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg10);/* VGL_REG: -10V */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg12);/* VGLX: Ratio */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg13);/* VGMP/VGSP: 4.5V/0V */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg14);/* VGMN/VGSN:-4.5V/0V */
|
||||
DSI_IO_WriteCmd(2, (uint8_t *)nt35510_reg15);/* VCOM: -1.325V */
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* Proprietary DCS Initialization */
|
||||
/* ************************************************************************** */
|
||||
DSI_IO_WriteCmd(5, (uint8_t *)nt35510_reg16);/* LV2: Page 0 enable */
|
||||
DSI_IO_WriteCmd(2, (uint8_t *)nt35510_reg17);/* Display control */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg18);/* Src hold time */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg19);
|
||||
DSI_IO_WriteCmd(2, (uint8_t *)nt35510_reg20);/* Gate EQ control */
|
||||
DSI_IO_WriteCmd(4, (uint8_t *)nt35510_reg21);/* Src EQ control(Mode2) */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg22);/* Inv. mode(2-dot) */
|
||||
DSI_IO_WriteCmd(3, (uint8_t *)nt35510_reg23);
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg24);
|
||||
/* Tear on */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg26);
|
||||
/* Set Pixel color format to RGB888 */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg37);
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* Standard DCS Initialization */
|
||||
/* ************************************************************************** */
|
||||
|
||||
/* Add a delay, otherwise MADCTL not taken */
|
||||
NT35510_IO_Delay(200);
|
||||
|
||||
/* Configure orientation */
|
||||
if(orientation == NT35510_ORIENTATION_PORTRAIT)
|
||||
{
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_madctl_portrait);
|
||||
DSI_IO_WriteCmd(4, (uint8_t *)nt35510_caset_portrait);
|
||||
DSI_IO_WriteCmd(4, (uint8_t *)nt35510_raset_portrait);
|
||||
}
|
||||
else
|
||||
{
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_madctl_landscape);
|
||||
DSI_IO_WriteCmd(4, (uint8_t *)nt35510_caset_landscape);
|
||||
DSI_IO_WriteCmd(4, (uint8_t *)nt35510_raset_landscape);
|
||||
}
|
||||
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg27);
|
||||
/* Wait for sleep out exit */
|
||||
NT35510_IO_Delay(120);
|
||||
|
||||
switch(ColorCoding)
|
||||
{
|
||||
case NT35510_FORMAT_RBG565 :
|
||||
/* Set Pixel color format to RGB565 */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg36);
|
||||
break;
|
||||
case NT35510_FORMAT_RGB888 :
|
||||
/* Set Pixel color format to RGB888 */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg37);
|
||||
break;
|
||||
default :
|
||||
/* Set Pixel color format to RGB888 */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg37);
|
||||
break;
|
||||
}
|
||||
|
||||
/** CABC : Content Adaptive Backlight Control section start >> */
|
||||
/* Note : defaut is 0 (lowest Brightness), 0xFF is highest Brightness, try 0x7F : intermediate value */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg31);
|
||||
/* defaut is 0, try 0x2C - Brightness Control Block, Display Dimming & BackLight on */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg32);
|
||||
/* defaut is 0, try 0x02 - image Content based Adaptive Brightness [Still Picture] */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg33);
|
||||
/* defaut is 0 (lowest Brightness), 0xFF is highest Brightness */
|
||||
DSI_IO_WriteCmd(1, (uint8_t *)nt35510_reg34);
|
||||
/** CABC : Content Adaptive Backlight Control section end << */
|
||||
|
||||
/* Display on */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg30);
|
||||
|
||||
/* Send Command GRAM memory write (no parameters) : this initiates frame write via other DSI commands sent by */
|
||||
/* DSI host from LTDC incoming pixels in video mode */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg35);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
uint8_t NT35510_DeInit(void)
|
||||
{
|
||||
const uint8_t nt35510_reg30b[] = {NT35510_CMD_DISPOFF, 0x00};
|
||||
const uint8_t nt35510_reg27b[] = {NT35510_CMD_SLPIN, 0x00};
|
||||
/* Display off */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg30b);
|
||||
NT35510_IO_Delay(120);
|
||||
/* Sleep in */
|
||||
DSI_IO_WriteCmd(0, (uint8_t *)nt35510_reg27b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
249
Drivers/BSP/Components/nt35510/nt35510.h
Normal file
249
Drivers/BSP/Components/nt35510/nt35510.h
Normal file
@ -0,0 +1,249 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file nt35510.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the constants parameters for the NT35510
|
||||
* which is the LCD Driver for Frida Techshine 3K138 (WVGA)
|
||||
* DSI LCD Display.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __NT35510_H
|
||||
#define __NT35510_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup nt35510
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup NT35510_Exported_Variables
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if defined ( __GNUC__ )
|
||||
#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
#endif /* __weak */
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
/**
|
||||
* @brief LCD_OrientationTypeDef
|
||||
* Possible values of Display Orientation
|
||||
*/
|
||||
#define NT35510_ORIENTATION_PORTRAIT ((uint32_t)0x00) /* Portrait orientation choice of LCD screen */
|
||||
#define NT35510_ORIENTATION_LANDSCAPE ((uint32_t)0x01) /* Landscape orientation choice of LCD screen */
|
||||
|
||||
/**
|
||||
* @brief Possible values of
|
||||
* pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets
|
||||
*/
|
||||
#define NT35510_FORMAT_RGB888 ((uint32_t)0x00) /* Pixel format chosen is RGB888 : 24 bpp */
|
||||
#define NT35510_FORMAT_RBG565 ((uint32_t)0x02) /* Pixel format chosen is RGB565 : 16 bpp */
|
||||
|
||||
/**
|
||||
* @brief nt35510_480x800 Size
|
||||
*/
|
||||
|
||||
/* Width and Height in Portrait mode */
|
||||
#define NT35510_480X800_WIDTH ((uint16_t)480) /* LCD PIXEL WIDTH */
|
||||
#define NT35510_480X800_HEIGHT ((uint16_t)800) /* LCD PIXEL HEIGHT */
|
||||
|
||||
/* Width and Height in Landscape mode */
|
||||
#define NT35510_800X480_WIDTH ((uint16_t)800) /* LCD PIXEL WIDTH */
|
||||
#define NT35510_800X480_HEIGHT ((uint16_t)480) /* LCD PIXEL HEIGHT */
|
||||
|
||||
/**
|
||||
* @brief NT35510_480X800 Timing parameters for Portrait orientation mode
|
||||
*/
|
||||
#define NT35510_480X800_HSYNC ((uint16_t)2) /* Horizontal synchronization */
|
||||
#define NT35510_480X800_HBP ((uint16_t)34) /* Horizontal back porch */
|
||||
#define NT35510_480X800_HFP ((uint16_t)34) /* Horizontal front porch */
|
||||
|
||||
#define NT35510_480X800_VSYNC ((uint16_t)120) /* Vertical synchronization */
|
||||
#define NT35510_480X800_VBP ((uint16_t)150) /* Vertical back porch */
|
||||
#define NT35510_480X800_VFP ((uint16_t)150) /* Vertical front porch */
|
||||
|
||||
/**
|
||||
* @brief NT35510_800X480 Timing parameters for Landscape orientation mode
|
||||
* Same values as for Portrait mode in fact.
|
||||
*/
|
||||
#define NT35510_800X480_HSYNC NT35510_480X800_VSYNC /* Horizontal synchronization */
|
||||
#define NT35510_800X480_HBP NT35510_480X800_VBP /* Horizontal back porch */
|
||||
#define NT35510_800X480_HFP NT35510_480X800_VFP /* Horizontal front porch */
|
||||
#define NT35510_800X480_VSYNC NT35510_480X800_HSYNC /* Vertical synchronization */
|
||||
#define NT35510_800X480_VBP NT35510_480X800_HBP /* Vertical back porch */
|
||||
#define NT35510_800X480_VFP NT35510_480X800_HFP /* Vertical front porch */
|
||||
|
||||
|
||||
/* List of NT35510 used commands */
|
||||
/* Detailed in NT35510 Data Sheet v0.80 */
|
||||
/* Version of 10/28/2011 */
|
||||
/* Command, NumberOfArguments */
|
||||
|
||||
#define NT35510_CMD_NOP 0x00 /* NOP */
|
||||
#define NT35510_CMD_SWRESET 0x01 /* SW reset */
|
||||
#define NT35510_CMD_RDDID 0x04 /* Read display ID */
|
||||
#define NT35510_CMD_RDNUMED 0x05 /* Read number of errors on DSI */
|
||||
#define NT35510_CMD_RDDPM 0x0A /* Read display power mode */
|
||||
#define NT35510_CMD_RDDMADCTL 0x0B /* Read display MADCTL */
|
||||
#define NT35510_CMD_RDDCOLMOD 0x0C /* Read display pixel format */
|
||||
#define NT35510_CMD_RDDIM 0x0D /* Read display image mode */
|
||||
#define NT35510_CMD_RDDSM 0x0E /* Read display signal mode */
|
||||
#define NT35510_CMD_RDDSDR 0x0F /* Read display self-diagnostics result */
|
||||
#define NT35510_CMD_SLPIN 0x10 /* Sleep in */
|
||||
#define NT35510_CMD_SLPOUT 0x11 /* Sleep out */
|
||||
#define NT35510_CMD_PTLON 0x12 /* Partial mode on */
|
||||
#define NT35510_CMD_NORON 0x13 /* Normal display mode on */
|
||||
#define NT35510_CMD_INVOFF 0x20 /* Display inversion off */
|
||||
#define NT35510_CMD_INVON 0x21 /* Display inversion on */
|
||||
#define NT35510_CMD_ALLPOFF 0x22 /* All pixel off */
|
||||
#define NT35510_CMD_ALLPON 0x23 /* All pixel on */
|
||||
#define NT35510_CMD_GAMSET 0x26 /* Gamma set */
|
||||
#define NT35510_CMD_DISPOFF 0x28 /* Display off */
|
||||
#define NT35510_CMD_DISPON 0x29 /* Display on */
|
||||
#define NT35510_CMD_CASET 0x2A /* Column address set */
|
||||
#define NT35510_CMD_RASET 0x2B /* Row address set */
|
||||
#define NT35510_CMD_RAMWR 0x2C /* Memory write */
|
||||
#define NT35510_CMD_RAMRD 0x2E /* Memory read */
|
||||
#define NT35510_CMD_PLTAR 0x30 /* Partial area */
|
||||
#define NT35510_CMD_TOPC 0x32 /* Turn On Peripheral Command */
|
||||
#define NT35510_CMD_TEOFF 0x34 /* Tearing effect line off */
|
||||
#define NT35510_CMD_TEEON 0x35 /* Tearing effect line on */
|
||||
#define NT35510_CMD_MADCTL 0x36 /* Memory data access control */
|
||||
#define NT35510_CMD_IDMOFF 0x38 /* Idle mode off */
|
||||
#define NT35510_CMD_IDMON 0x39 /* Idle mode on */
|
||||
#define NT35510_CMD_COLMOD 0x3A /* Interface pixel format */
|
||||
#define NT35510_CMD_RAMWRC 0x3C /* Memory write continue */
|
||||
#define NT35510_CMD_RAMRDC 0x3E /* Memory read continue */
|
||||
#define NT35510_CMD_STESL 0x44 /* Set tearing effect scan line */
|
||||
#define NT35510_CMD_GSL 0x45 /* Get scan line */
|
||||
|
||||
#define NT35510_CMD_DSTBON 0x4F /* Deep standby mode on */
|
||||
#define NT35510_CMD_WRPFD 0x50 /* Write profile value for display */
|
||||
#define NT35510_CMD_WRDISBV 0x51 /* Write display brightness */
|
||||
#define NT35510_CMD_RDDISBV 0x52 /* Read display brightness */
|
||||
#define NT35510_CMD_WRCTRLD 0x53 /* Write CTRL display */
|
||||
#define NT35510_CMD_RDCTRLD 0x54 /* Read CTRL display value */
|
||||
#define NT35510_CMD_WRCABC 0x55 /* Write content adaptative brightness control */
|
||||
#define NT35510_CMD_RDCABC 0x56 /* Read content adaptive brightness control */
|
||||
#define NT35510_CMD_WRHYSTE 0x57 /* Write hysteresis */
|
||||
#define NT35510_CMD_WRGAMMSET 0x58 /* Write gamme setting */
|
||||
#define NT35510_CMD_RDFSVM 0x5A /* Read FS value MSBs */
|
||||
#define NT35510_CMD_RDFSVL 0x5B /* Read FS value LSBs */
|
||||
#define NT35510_CMD_RDMFFSVM 0x5C /* Read median filter FS value MSBs */
|
||||
#define NT35510_CMD_RDMFFSVL 0x5D /* Read median filter FS value LSBs */
|
||||
#define NT35510_CMD_WRCABCMB 0x5E /* Write CABC minimum brightness */
|
||||
#define NT35510_CMD_RDCABCMB 0x5F /* Read CABC minimum brightness */
|
||||
#define NT35510_CMD_WRLSCC 0x65 /* Write light sensor compensation coefficient value */
|
||||
#define NT35510_CMD_RDLSCCM 0x66 /* Read light sensor compensation coefficient value MSBs */
|
||||
#define NT35510_CMD_RDLSCCL 0x67 /* Read light sensor compensation coefficient value LSBs */
|
||||
#define NT35510_CMD_RDBWLB 0x70 /* Read black/white low bits */
|
||||
#define NT35510_CMD_RDBKX 0x71 /* Read Bkx */
|
||||
#define NT35510_CMD_RDBKY 0x72 /* Read Bky */
|
||||
#define NT35510_CMD_RDWX 0x73 /* Read Wx */
|
||||
#define NT35510_CMD_RDWY 0x74 /* Read Wy */
|
||||
#define NT35510_CMD_RDRGLB 0x75 /* Read red/green low bits */
|
||||
#define NT35510_CMD_RDRX 0x76 /* Read Rx */
|
||||
#define NT35510_CMD_RDRY 0x77 /* Read Ry */
|
||||
#define NT35510_CMD_RDGX 0x78 /* Read Gx */
|
||||
#define NT35510_CMD_RDGY 0x79 /* Read Gy */
|
||||
#define NT35510_CMD_RDBALB 0x7A /* Read blue/acolor low bits */
|
||||
#define NT35510_CMD_RDBX 0x7B /* Read Bx */
|
||||
#define NT35510_CMD_RDBY 0x7C /* Read By */
|
||||
#define NT35510_CMD_RDAX 0x7D /* Read Ax */
|
||||
#define NT35510_CMD_RDAY 0x7E /* Read Ay */
|
||||
#define NT35510_CMD_RDDDBS 0xA1 /* Read DDB start */
|
||||
#define NT35510_CMD_RDDDBC 0xA8 /* Read DDB continue */
|
||||
#define NT35510_CMD_RDDCS 0xAA /* Read first checksum */
|
||||
#define NT35510_CMD_RDCCS 0xAF /* Read continue checksum */
|
||||
#define NT35510_CMD_RDID1 0xDA /* Read ID1 value */
|
||||
#define NT35510_CMD_RDID2 0xDB /* Read ID2 value */
|
||||
#define NT35510_CMD_RDID3 0xDC /* Read ID3 value */
|
||||
|
||||
/* Parameter TELOM : Tearing Effect Line Output Mode : possible values */
|
||||
#define NT35510_TEEON_TELOM_VBLANKING_INFO_ONLY 0x00
|
||||
#define NT35510_TEEON_TELOM_VBLANKING_AND_HBLANKING_INFO 0x01
|
||||
|
||||
/* Possible used values of MADCTR */
|
||||
#define NT35510_MADCTR_MODE_PORTRAIT 0x00
|
||||
#define NT35510_MADCTR_MODE_LANDSCAPE 0x60 /* MY = 0, MX = 1, MV = 1, ML = 0, RGB = 0 */
|
||||
|
||||
/* Possible values of COLMOD parameter corresponding to used pixel formats */
|
||||
#define NT35510_COLMOD_RGB565 0x55
|
||||
#define NT35510_COLMOD_RGB888 0x77
|
||||
|
||||
/**
|
||||
* @brief NT35510_480X800 frequency divider
|
||||
*/
|
||||
#define NT35510_480X800_FREQUENCY_DIVIDER 2 /* LCD Frequency divider */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
|
||||
/** @defgroup NT35510_Exported_Macros NT35510 Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
|
||||
/** @addtogroup NT35510_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
void DSI_IO_WriteCmd(uint32_t NbrParams, uint8_t *pParams);
|
||||
uint8_t NT35510_Init(uint32_t ColorCoding, uint32_t orientation);
|
||||
uint8_t NT35510_DeInit(void);
|
||||
void NT35510_IO_Delay(uint32_t Delay);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NT35510_H */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
@ -136,6 +136,7 @@ void TS_IO_Delay(uint32_t Delay);
|
||||
|
||||
/* LCD Display IO functions */
|
||||
void OTM8009A_IO_Delay(uint32_t Delay);
|
||||
void NT35510_IO_Delay(uint32_t Delay);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -735,6 +736,16 @@ void OTM8009A_IO_Delay(uint32_t Delay)
|
||||
HAL_Delay(Delay);
|
||||
}
|
||||
|
||||
/**************************** LINK NT35510 (Display driver) ******************/
|
||||
/**
|
||||
* @brief NT35510 delay
|
||||
* @param Delay: Delay in ms
|
||||
*/
|
||||
void NT35510_IO_Delay(uint32_t Delay)
|
||||
{
|
||||
HAL_Delay(Delay);
|
||||
}
|
||||
|
||||
/**************************** LINK ADV7533 DSI-HDMI (Display driver) **********/
|
||||
/**
|
||||
* @brief Initializes HDMI IO low level.
|
||||
|
@ -17,6 +17,11 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* IMPORTANT: One of the following flags must be defined in the preprocessor */
|
||||
/* options in order to select the target board revision: !!!!!!!!!! */
|
||||
/* USE_STM32F769I_DISCO */ /* Applicable for all boards execept STM32F769I DISCOVERY REVB03 */
|
||||
/* USE_STM32F769I_DISCO_REVB03 */ /* Applicable only for STM32F769I DISCOVERY w/ MB1166-A09 LCD daughter board connected on */
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __STM32F769I_DISCOVERY_H
|
||||
#define __STM32F769I_DISCOVERY_H
|
||||
@ -48,8 +53,9 @@
|
||||
/**
|
||||
* @brief Define for STM32F769I_DISCOVERY board
|
||||
*/
|
||||
#if !defined (USE_STM32F769I_DISCO)
|
||||
#define USE_STM32F769I_DISCO
|
||||
#if !defined(USE_STM32F769I_DISCO) && \
|
||||
!defined(USE_STM32F769I_DISCO_REVB03)
|
||||
#define USE_STM32F769I_DISCO
|
||||
#endif
|
||||
|
||||
/** @brief Led_TypeDef
|
||||
|
@ -356,12 +356,21 @@ uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation)
|
||||
VACT = lcd_y_size;
|
||||
|
||||
/* The following values are same for portrait and landscape orientations */
|
||||
VSA = OTM8009A_480X800_VSYNC; /* 12 */
|
||||
VBP = OTM8009A_480X800_VBP; /* 12 */
|
||||
VFP = OTM8009A_480X800_VFP; /* 12 */
|
||||
HSA = OTM8009A_480X800_HSYNC; /* 63 */
|
||||
HBP = OTM8009A_480X800_HBP; /* 120 */
|
||||
HFP = OTM8009A_480X800_HFP; /* 120 */
|
||||
#if defined (USE_STM32F769I_DISCO_REVB03)
|
||||
VSA = NT35510_480X800_VSYNC;
|
||||
VBP = NT35510_480X800_VBP;
|
||||
VFP = NT35510_480X800_VFP;
|
||||
HSA = NT35510_480X800_HSYNC;
|
||||
HBP = NT35510_480X800_HBP;
|
||||
HFP = NT35510_480X800_HFP;
|
||||
#else
|
||||
VSA = OTM8009A_480X800_VSYNC;
|
||||
VBP = OTM8009A_480X800_VBP;
|
||||
VFP = OTM8009A_480X800_VFP;
|
||||
HSA = OTM8009A_480X800_HSYNC;
|
||||
HBP = OTM8009A_480X800_HBP;
|
||||
HFP = OTM8009A_480X800_HFP;
|
||||
#endif /* USE_STM32F769I_DISCO_REVB03 */
|
||||
|
||||
hdsivideo_handle.VirtualChannelID = LCD_OTM8009A_ID;
|
||||
hdsivideo_handle.ColorCoding = LCD_DSI_PIXEL_DATA_FMT_RBG888;
|
||||
@ -459,6 +468,15 @@ uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation)
|
||||
|
||||
/************************End LTDC Initialization*******************************/
|
||||
|
||||
#if defined(USE_STM32F769I_DISCO_REVB03)
|
||||
/***********************NT35510 Initialization********************************/
|
||||
|
||||
/* Initialize the NT35510 LCD Display IC Driver (TechShine LCD IC Driver)
|
||||
* depending on configuration set in 'hdsivideo_handle'.
|
||||
*/
|
||||
NT35510_Init(NT35510_FORMAT_RGB888, orientation);
|
||||
/***********************End NT35510 Initialization****************************/
|
||||
#else
|
||||
|
||||
/***********************OTM8009A Initialization********************************/
|
||||
|
||||
@ -468,6 +486,8 @@ uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation)
|
||||
OTM8009A_Init(OTM8009A_FORMAT_RGB888, orientation);
|
||||
|
||||
/***********************End OTM8009A Initialization****************************/
|
||||
#endif /* USE_STM32F769I_DISCO_REVB03 */
|
||||
|
||||
|
||||
return LCD_OK;
|
||||
}
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
/* Include OTM8009A LCD Driver IC driver code */
|
||||
#include "../Components/otm8009a/otm8009a.h"
|
||||
/* Include NT35510 LCD Driver IC driver code */
|
||||
#include "../Components/nt35510/nt35510.h"
|
||||
/* Include ADV7533 HDMI Driver IC driver code */
|
||||
#include "../Components/adv7533/adv7533.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user