Macros | Enumerations | Functions
hal_gdc_mipi.h File Reference

Header file containing functions prototypes of Graphics library. More...

`#include "hal_gfx_sys_defs.h"`
Include dependency graph for hal_gdc_mipi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | MIPICFG_DBI_EN (1U<<31U)
| Enables MIPI DBI/SPI interface. More...
#define | MIPICFG_FRC_CSX_0 (1U<<30U)
| Enables CSX force value. More...
#define | MIPICFG_FRC_CSX_1 ((1U<<30U)|(1U<<29U))
| Force CSX to 1. More...
#define | MIPICFG_SPI_CSX_V (1U<<29U)
| CSX active high/low. More...
#define | MIPICFG_DIS_TE (1U<<28U)
| Disables Input Tearing Signal. More...
#define | MIPICFG_SPIDC_DQSPI (1U<<27U)
| Enables the usage of SPI_DC wire as SPI_SD1. More...
#define | MIPICFG_RSTN_DBI_SPI (1U<<26U)
| DBI/SPI interfaces clear. More...
#define | MIPICFG_RESX (1U<<25U)
| Controls MIPI DBI Type-B RESX output signal. More...
#define | MIPICFG_DMA (1U<<24U)
| (unused) Enables pixel data from DMA More...
#define | MIPICFG_SPI3 (1U<<23U)
| Enables SPI 3-wire interface. More...
#define | MIPICFG_SPI4 (1U<<22U)
| Enables SPI 4-wire interface. More...
#define | MIPICFG_GPI ((1U<<23U)|(1U<<22U))
| Enables Generic Packet Interface. More...
#define | MIPICFG_EN_STALL (1U<<21U)
| Enables back-pressure from dbi_stall_i signal. More...
#define | MIPICFG_SPI_CPHA (1U<<20U)
| Sets SPI Clock Phase. More...
#define | MIPICFG_SPI_CPOL (1U<<19U)
| Sets SPI Clock Polarity. More...
#define | MIPICFG_SPI_JDI (1U<<18U)
| – reserved – More...
#define | MIPICFG_EN_DVALID (1U<<18U)
| Enables read using external data valid signal. More...
#define | MIPICFG_SPI_HOLD (1U<<17U)
| Binds scanline address with pixel data. More...
#define | MIPICFG_INV_ADDR (1U<<16U)
| Inverts scanline address. More...
#define | MIPICFG_SCAN_ADDR (1U<<15U)
| Scan address used as header of each line. More...
#define | MIPICFG_PIXCLK_OUT_EN (1U<<14U)
| Redirects pixel generation clock to the output. More...
#define | MIPICFG_EXT_CTRL (1U<<13U)
| Enables external control signals. More...
#define | MIPICFG_BLANKING_EN (1U<<12U)
| Enables horizontal blanking. More...
#define | MIPICFG_DSPI_SPIX (1U<<11U)
| Enables DSPI sub-pixel transaction. More...
#define | MIPICFG_QSPI (1U<<10U)
| Enables QSPI. More...
#define | MIPICFG_QSPI_DDR ((1U<<10U)|(1U<<9U))
| Enables QSPI DDR. More...
#define | MIPICFG_DSPI (1U<< 9U)
| Enables DSPI. More...
#define | MIPICFG_SPI (0U<< 9U)
| Enables SPI. More...
#define | MIPICFG_NULL (0x00U)
| MIPI CFG NULL. More...
#define | MIPI_DCS_RGB111 (1U)
| Color mode RGB111. More...
#define | MIPI_DCS_RGB332 (2U)
| Color mode RGB332. More...
#define | MIPI_DCS_RGB444 (3U)
| Color mode RGB444. More...
#define | MIPI_DCS_RGB565 (5U)
| Color mode RGB565. More...
#define | MIPI_DCS_RGB666 (6U)
| Color mode RGB666. More...
#define | MIPI_DCS_RGB888 (7U)
| Color mode RGB888. More...
#define | MIPICFG_PF_SPI (3U<<6U)
| Interface mode SPI. More...
#define | MIPICFG_PF_DSPI (4U<<6U)
| Interface mode DSPI. More...
#define | MIPICFG_PF_QSPI (5U<<6U)
| Interface mode QSPI. More...
#define | MIPICFG_PF_DBI8 (0U<<6U)
| Interface mode DBI8. More...
#define | MIPICFG_PF_DBI9 (1U<<6U)
| Interface mode DBI9. More...
#define | MIPICFG_PF_DBI16 (2U<<6U)
| Interface mode DBI16. More...
#define | MIPICFG_PF_GPI (6U<<6U)
| Interface mode GPI. More...
#define | MIPICFG_PF_OPT0 (0U<<3U)
| Option DBI_CFG:option 0. More...
#define | MIPICFG_PF_OPT1 (1U<<3U)
| Option DBI_CFG:option 1. More...
#define | MIPICFG_PF_OPT2 (2U<<3U)
| Option DBI_CFG:option 2. More...
#define | MIPICFG_PF_OPT3 (3U<<3U)
| Option DBI_CFG:option 3. More...
#define | MIPICFG_PF_OPT4 (4U<<3U)
| Option DBI_CFG:option 4. More...
#define | MIPICFG_1RGB111_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB111)
| 0xc1 More...
#define | MIPICFG_1RGB111_OPT1 (MIPICFG_PF_SPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB111)
| 0xc9 More...
#define | MIPICFG_1RGB111_OPT2 (MIPICFG_PF_SPI|MIPICFG_PF_OPT2|MIPI_DCS_RGB111)
| 0xd1 More...
#define | MIPICFG_1RGB111_OPT3 (MIPICFG_PF_SPI|MIPICFG_PF_OPT3|MIPI_DCS_RGB111)
| 0xd9 More...
#define | MIPICFG_1RGB111_OPT4 (MIPICFG_PF_SPI|MIPICFG_PF_OPT4|MIPI_DCS_RGB111)
| 0xe1 More...
#define | MIPICFG_1RGB332_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0xc2 More...
#define | MIPICFG_1RGB444_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0xc3 More...
#define | MIPICFG_1RGB565_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0xc5 More...
#define | MIPICFG_1RGB666_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0xc6 More...
#define | MIPICFG_1RGB888_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0xc7 More...
#define | MIPICFG_2RGB332_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0x102 More...
#define | MIPICFG_2RGB444_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0x103 More...
#define | MIPICFG_2RGB444_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB444)
| 0x10b More...
#define | MIPICFG_2RGB565_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0x105 More...
#define | MIPICFG_2RGB666_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x106 More...
#define | MIPICFG_2RGB666_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
| 0x10e More...
#define | MIPICFG_2RGB888_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0x107 More...
#define | MIPICFG_2RGB888_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB888)
| 0x10f More...
#define | MIPICFG_4RGB111_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB111)
| 0x141 More...
#define | MIPICFG_4RGB332_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0x142 More...
#define | MIPICFG_4RGB444_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0x143 More...
#define | MIPICFG_4RGB565_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0x145 More...
#define | MIPICFG_4RGB666_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x146 More...
#define | MIPICFG_4RGB888_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0x147 More...
#define | MIPICFG_8RGB332_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0x2 More...
#define | MIPICFG_8RGB444_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0x3 More...
#define | MIPICFG_8RGB565_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0x5 More...
#define | MIPICFG_8RGB666_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x6 More...
#define | MIPICFG_8RGB888_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0x7 More...
#define | MIPICFG_16RGB332_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0x82 More...
#define | MIPICFG_16RGB444_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0x83 More...
#define | MIPICFG_16RGB565_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0x85 More...
#define | MIPICFG_16RGB666_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x86 More...
#define | MIPICFG_16RGB666_OPT1 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
| 0x8e More...
#define | MIPICFG_16RGB888_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0x87 More...
#define | MIPICFG_16RGB888_OPT1 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT1|MIPI_DCS_RGB888)
| 0x8f More...
#define | MIPICFG_9RGB666_OPT0 (MIPICFG_PF_DBI9|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x46 More...
#define | MIPICFG_32RGB332_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
| 0x182 More...
#define | MIPICFG_32RGB444_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
| 0x183 More...
#define | MIPICFG_32RGB565_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
| 0x185 More...
#define | MIPICFG_32RGB666_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
| 0x186 More...
#define | MIPICFG_32RGB666_OPT1 (MIPICFG_PF_GPI |MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
| 0x18e More...
#define | MIPICFG_32RGB888_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
| 0x187 More...
#define | hal_gdc_MIPI_set_mode hal_gdc_MIPI_set_pixel_format
| for backward compatibility More...

## Enumerations
enum | hal_gdc_mipi_cmd_t { MIPI_enter_idle_mode = 0x39, MIPI_enter_invert_mode = 0x21, MIPI_enter_normal_mode = 0x13, MIPI_enter_partial_mode = 0x12, MIPI_enter_sleep_mode = 0x10, MIPI_exit_idle_mode = 0x38, MIPI_exit_invert_mode = 0x20, MIPI_exit_sleep_mode = 0x11, MIPI_get_3D_control = 0x3f, MIPI_get_address_mode = 0x0b, MIPI_get_blue_channel = 0x08, MIPI_get_diagnostic_result = 0x0f, MIPI_get_display_mode = 0x0d, MIPI_get_green_channel = 0x07, MIPI_get_pixel_format = 0x0c, MIPI_get_power_mode = 0x0a, MIPI_get_red_channel = 0x06, MIPI_get_scanline = 0x45, MIPI_get_signal_mode = 0x0e, MIPI_nop = 0x00, MIPI_read_DDB_continue = 0xa8, MIPI_read_DDB_start = 0xa1, MIPI_read_memory_continue = 0x3e, MIPI_read_memory_start = 0x2e, MIPI_set_3D_control = 0x3d, MIPI_set_address_mode = 0x36, MIPI_set_column_address = 0x2a, MIPI_set_display_off = 0x28, MIPI_set_display_on = 0x29, MIPI_set_gamma_curve = 0x26, MIPI_set_page_address = 0x2b, MIPI_set_partial_columns = 0x31, MIPI_set_partial_rows = 0x30, MIPI_set_pixel_format = 0x3a, MIPI_set_scroll_area = 0x33, MIPI_set_scroll_start = 0x37, MIPI_set_tear_off = 0x34, MIPI_set_tear_on = 0x35, MIPI_set_tear_scanline = 0x44, MIPI_set_vsync_timing = 0x40, MIPI_soft_reset = 0x01, MIPI_write_LUT = 0x2d, MIPI_write_memory_continue = 0x3c, MIPI_write_memory_start = 0x2c, MIPI_snapshot = 0xff, MIPI_DBIB_STORE_BASE_ADDR = (1 <<31), MIPI_DBIB_CMD = (1U<<30), MIPI_CMD08 = (0U<<28), MIPI_CMD16 = (1U<<28), MIPI_CMD24 = (1U<<29), MIPI_MASK_QSPI = (1U<<27) }
| MIPI Command List definition. More...

## Functions
void | hal_gdc_MIPI_out (int cmd)
| Send command or data to MIPI Interface. More...
void | hal_gdc_MIPI_CFG_out (int cfg)
| Configure hal_gdc's serial interace. More...
int | hal_gdc_MIPI_in (void)
| Read data from MIPI interface. More...
unsigned | hal_gdc_MIPI_read (int cmd, int n_params)
| Read MIPI DBI Type-B parameters. More...
void | hal_gdc_MIPI_cmd (int cmd)
| Send DCS command to display over the physical interface. More...
void | hal_gdc_MIPI_cmd_params (int cmd, int n_params,...)
| Similar to hal_gdc_MIPI_cmd, with command parameters. More...
int | hal_gdc_MIPI_updateregion (int start_x, int start_y, int end_x, int end_y)
| Does Partial Update in MIPI. More...
void | hal_gdc_MIPI_enable (void)
| Convenience function. More...
void | hal_gdc_MIPI_disable (void)
| Convenience function. More...
void | hal_gdc_MIPI_set_pixel_format (int pixel_format)
| Set the display pixel format. More...
void | hal_gdc_MIPI_set_position (int minx, int miny, int maxx, int maxy)
| Set the frame position. More...
void | hal_gdc_MIPI_set_partial_mode (int minx, int miny, int maxx, int maxy)
| Set the display partial area and enter Partial Display Mode. More...
void | hal_gdc_MIPI_start_frame_transfer (void)
| Convenience function. More...

## Detailed Description

Header file containing functions prototypes of Graphics library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS 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.

Definition in file hal_gdc_mipi.h.