MT2523 API Reference  LinkIt SDK v4
hal_display_dsi.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #include "hal_platform.h"
36 
37 #ifndef __HAL_DISPLAY_DSI_H__
38 #define __HAL_DISPLAY_DSI_H__
39 
40 #ifdef HAL_DISPLAY_DSI_MODULE_ENABLED
41 
125 #ifdef __cplusplus
126 extern "C" {
127 #endif
128 
133 typedef enum {
142 
144 typedef enum {
150 
163 typedef struct {
164  uint32_t da_hs_trail;
165  uint32_t da_hs_zero;
166  uint32_t da_hs_prep;
167  uint32_t lpx;
168  uint32_t da_hs_exit;
169  uint32_t ta_get;
170  uint32_t ta_sure;
171  uint32_t ta_go;
172  uint32_t clk_hs_trail;
173  uint32_t clk_hs_zero;
174  uint32_t clk_hs_post;
175  uint32_t clk_hs_prep;
177 
200 
209 
218 
227 
239 hal_display_dsi_status_t hal_display_dsi_set_command_queue(uint32_t *pData, uint8_t size, bool forced_update);
240 
253 hal_display_dsi_status_t hal_display_dsi_set_command_queue_ex(uint32_t command, uint32_t size, uint32_t *data, bool forced_update);
254 
266 hal_display_dsi_status_t hal_display_dsi_read_register(uint8_t command, uint8_t *buffer, uint8_t size);
267 
276 
285 
296 
307 hal_display_dsi_status_t hal_display_dsi_set_clock(uint32_t pll_clock, bool ssc_enable);
308 
318 hal_display_dsi_status_t hal_display_dsi_set_transfer_mode(hal_display_dsi_transfer_mode_t mode);
319 
329 void hal_dsiplay_dsi_start_bta_transfer(uint32_t command);
330 
338 void hal_display_dsi_start_bta_transfer(uint32_t command);
339 
340 
347 
357 
358 #ifdef __cplusplus
359 }
360 #endif
361 
367 #endif /* HAL_DISPALY_DSI_MODULE_ENABLED */
368 #endif /* __HAL_DISPLAY_DSI_H__ */
369 
uint32_t clk_hs_trail
Time that the transmitter drives the HS-0 state after the last payload clock bit of HS transmission b...
Definition: hal_display_dsi.h:172
The DSI operation completed successfully.
Definition: hal_display_dsi.h:140
This event structure presents the DSI D-PHY timing setting structure, as shown below.
Definition: hal_display_dsi.h:163
uint32_t clk_hs_zero
Time that the transmitter drives the HS-0 state prior to starting the Clock.
Definition: hal_display_dsi.h:173
hal_display_dsi_status_t hal_display_dsi_enable_te(void)
This function enables the TE detection of DSI engine.
hal_display_dsi_status_t hal_display_dsi_init(bool ssc_enable)
This function initializes the DSI engine's hardware registers.
void hal_dsiplay_dsi_start_bta_transfer(uint32_t command)
uint32_t da_hs_exit
Time that the transmitter drives LP-11 following an HS burst.
Definition: hal_display_dsi.h:168
uint32_t lpx
Transmitted length of any Low-Power state period to display module.
Definition: hal_display_dsi.h:167
uint32_t ta_sure
Time that the MCU waits after the LP-10 state before transmitting the Bridge state (LP-00) during a L...
Definition: hal_display_dsi.h:170
uint32_t clk_hs_post
Time that the transmitter continues to send HS clock after the last associated Data Lane has transiti...
Definition: hal_display_dsi.h:174
uint32_t ta_go
Time that the display module drives the Bridge state (LP-00) before releasing control during a Link T...
Definition: hal_display_dsi.h:171
uint32_t da_hs_zero
Time that the transmitter drives the HS-0 state prior to transmitting the Sync sequence.
Definition: hal_display_dsi.h:165
uint32_t ta_get
Time that the MCU drives the Bridge state (LP-00) after accepting control during a Link Turnaround...
Definition: hal_display_dsi.h:169
hal_display_dsi_status_t hal_display_dsi_read_register(uint8_t command, uint8_t *buffer, uint8_t size)
This function reads data from the LCM driver IC.
hal_display_dsi_status_t hal_display_dsi_apply_setting(void)
This function applies all settings to the DSI engine.
Invalid parameter.
Definition: hal_display_dsi.h:137
The DSI always transfers in HS mode.
Definition: hal_display_dsi.h:146
uint32_t da_hs_trail
Time that the transmitter drives the flipped differential state after last payload data bit of HS tra...
Definition: hal_display_dsi.h:164
hal_display_dsi_status_t hal_display_dsi_set_command_queue(uint32_t *pData, uint8_t size, bool forced_update)
This function sets commands/data into command queue to send to the LCM driver IC. ...
hal_display_dsi_status_t hal_display_dsi_set_clock(uint32_t pll_clock, bool ssc_enable)
This function configures the DSI D-PHY timing automatically using the PLL clock speed.
hal_display_dsi_status_t hal_display_dsi_deinit(void)
This function de-initializes the DSI engine's hardware registers.
hal_display_dsi_status_t hal_display_dsi_power_on(void)
This function enables the DSI engine power.
hal_display_dsi_status_t hal_display_dsi_set_dphy_timing(hal_display_dsi_dphy_timing_struct_t *timing)
This function configures the DSI D-PHY timing.
uint32_t da_hs_prep
Time that the transmitter drives the Data Lane LP-00 Line state immediately before the HS-0 Line stat...
Definition: hal_display_dsi.h:166
hal_display_dsi_status_t hal_display_dsi_enter_ulps(void)
This function configures the DSI engine to enter the ULPS state.
hal_display_dsi_status_t hal_display_dsi_set_command_queue_ex(uint32_t command, uint32_t size, uint32_t *data, bool forced_update)
This function sets commands/data into command queue to send to the LCM driver IC. ...
hal_display_dsi_status_t hal_display_dsi_exit_ulps(void)
This function configures the DSI engine to exit the ULPS state.
The DSI power configuration has failed.
Definition: hal_display_dsi.h:135
Unable to receive data transfer from the LCM driver IC.
Definition: hal_display_dsi.h:138
The DSI initialization has failed.
Definition: hal_display_dsi.h:134
Unable to complete sending data using a command queue.
Definition: hal_display_dsi.h:136
hal_display_dsi_status_t
The return status of DSI API.
Definition: hal_display_dsi.h:133
The number of DSI transfer modes (invalid mode).
Definition: hal_display_dsi.h:148
void hal_display_dsi_start_bta_transfer(uint32_t command)
This function starts the BTA type transfer.
void hal_display_dsi_restore_callback(void)
This function executes the restore function when exiting from deep sleep.
hal_display_dsi_transfer_mode_t
The DSI transfer mode selections.
Definition: hal_display_dsi.h:144
The DSI will switch to low power / HS mode automatically according to the command type...
Definition: hal_display_dsi.h:147
uint32_t clk_hs_prep
Time that the HS clock shall be driven by the transmitter prior to any associated Data Lane beginning...
Definition: hal_display_dsi.h:175
An error occurred; please check the DSI engine status.
Definition: hal_display_dsi.h:139
hal_display_dsi_status_t hal_display_dsi_set_transfer_mode(hal_display_dsi_transfer_mode_t mode)
This function configures the transfer mode.
The DSI always transfers in low power mode.
Definition: hal_display_dsi.h:145
hal_display_dsi_status_t hal_display_dsi_power_off(void)
This function disables DSI engine power.