Go to the documentation of this file.
10 #ifndef HAL_GDC_MIPI_H__
11 #define HAL_GDC_MIPI_H__
15 #pragma diag_suppress 61
24 #define MIPICFG_DBI_EN (1U<<31U)
25 #define MIPICFG_FRC_CSX_0 (1U<<30U)
26 #define MIPICFG_FRC_CSX_1 ((1U<<30U)|(1U<<29U))
27 #define MIPICFG_SPI_CSX_V (1U<<29U)
28 #define MIPICFG_DIS_TE (1U<<28U)
29 #define MIPICFG_SPIDC_DQSPI (1U<<27U)
30 #define MIPICFG_RSTN_DBI_SPI (1U<<26U)
31 #define MIPICFG_RESX (1U<<25U)
32 #define MIPICFG_DMA (1U<<24U)
33 #define MIPICFG_SPI3 (1U<<23U)
34 #define MIPICFG_SPI4 (1U<<22U)
35 #define MIPICFG_GPI ((1U<<23U)|(1U<<22U))
36 #define MIPICFG_EN_STALL (1U<<21U)
37 #define MIPICFG_SPI_CPHA (1U<<20U)
38 #define MIPICFG_SPI_CPOL (1U<<19U)
39 #define MIPICFG_SPI_JDI (1U<<18U)
40 #define MIPICFG_EN_DVALID (1U<<18U)
41 #define MIPICFG_SPI_HOLD (1U<<17U)
42 #define MIPICFG_INV_ADDR (1U<<16U)
43 #define MIPICFG_SCAN_ADDR (1U<<15U)
44 #define MIPICFG_PIXCLK_OUT_EN (1U<<14U)
45 #define MIPICFG_EXT_CTRL (1U<<13U)
46 #define MIPICFG_BLANKING_EN (1U<<12U)
47 #define MIPICFG_DSPI_SPIX (1U<<11U)
48 #define MIPICFG_QSPI (1U<<10U)
49 #define MIPICFG_QSPI_DDR ((1U<<10U)|(1U<<9U))
50 #define MIPICFG_DSPI (1U<< 9U)
51 #define MIPICFG_SPI (0U<< 9U)
52 #define MIPICFG_NULL (0x00U)
58 #define MIPI_DCS_RGB111 (1U)
59 #define MIPI_DCS_RGB332 (2U)
60 #define MIPI_DCS_RGB444 (3U)
61 #define MIPI_DCS_RGB565 (5U)
62 #define MIPI_DCS_RGB666 (6U)
63 #define MIPI_DCS_RGB888 (7U)
65 #define MIPICFG_PF_SPI (3U<<6U)
66 #define MIPICFG_PF_DSPI (4U<<6U)
67 #define MIPICFG_PF_QSPI (5U<<6U)
68 #define MIPICFG_PF_DBI8 (0U<<6U)
69 #define MIPICFG_PF_DBI9 (1U<<6U)
70 #define MIPICFG_PF_DBI16 (2U<<6U)
71 #define MIPICFG_PF_GPI (6U<<6U)
73 #define MIPICFG_PF_OPT0 (0U<<3U)
74 #define MIPICFG_PF_OPT1 (1U<<3U)
75 #define MIPICFG_PF_OPT2 (2U<<3U)
76 #define MIPICFG_PF_OPT3 (3U<<3U)
77 #define MIPICFG_PF_OPT4 (4U<<3U)
79 #define MIPICFG_1RGB111_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB111)
80 #define MIPICFG_1RGB111_OPT1 (MIPICFG_PF_SPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB111)
81 #define MIPICFG_1RGB111_OPT2 (MIPICFG_PF_SPI|MIPICFG_PF_OPT2|MIPI_DCS_RGB111)
82 #define MIPICFG_1RGB111_OPT3 (MIPICFG_PF_SPI|MIPICFG_PF_OPT3|MIPI_DCS_RGB111)
83 #define MIPICFG_1RGB111_OPT4 (MIPICFG_PF_SPI|MIPICFG_PF_OPT4|MIPI_DCS_RGB111)
84 #define MIPICFG_1RGB332_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
85 #define MIPICFG_1RGB444_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
86 #define MIPICFG_1RGB565_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
87 #define MIPICFG_1RGB666_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
88 #define MIPICFG_1RGB888_OPT0 (MIPICFG_PF_SPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
89 #define MIPICFG_2RGB332_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
90 #define MIPICFG_2RGB444_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
91 #define MIPICFG_2RGB444_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB444)
92 #define MIPICFG_2RGB565_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
93 #define MIPICFG_2RGB666_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
94 #define MIPICFG_2RGB666_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
95 #define MIPICFG_2RGB888_OPT0 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
96 #define MIPICFG_2RGB888_OPT1 (MIPICFG_PF_DSPI|MIPICFG_PF_OPT1|MIPI_DCS_RGB888)
97 #define MIPICFG_4RGB111_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB111)
98 #define MIPICFG_4RGB332_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
99 #define MIPICFG_4RGB444_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
100 #define MIPICFG_4RGB565_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
101 #define MIPICFG_4RGB666_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
102 #define MIPICFG_4RGB888_OPT0 (MIPICFG_PF_QSPI|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
104 #define MIPICFG_8RGB332_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
105 #define MIPICFG_8RGB444_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
106 #define MIPICFG_8RGB565_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
107 #define MIPICFG_8RGB666_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
108 #define MIPICFG_8RGB888_OPT0 (MIPICFG_PF_DBI8|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
109 #define MIPICFG_16RGB332_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
110 #define MIPICFG_16RGB444_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
111 #define MIPICFG_16RGB565_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
112 #define MIPICFG_16RGB666_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
113 #define MIPICFG_16RGB666_OPT1 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
114 #define MIPICFG_16RGB888_OPT0 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
115 #define MIPICFG_16RGB888_OPT1 (MIPICFG_PF_DBI16|MIPICFG_PF_OPT1|MIPI_DCS_RGB888)
116 #define MIPICFG_9RGB666_OPT0 (MIPICFG_PF_DBI9|MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
117 #define MIPICFG_32RGB332_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB332)
118 #define MIPICFG_32RGB444_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB444)
119 #define MIPICFG_32RGB565_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB565)
120 #define MIPICFG_32RGB666_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB666)
121 #define MIPICFG_32RGB666_OPT1 (MIPICFG_PF_GPI |MIPICFG_PF_OPT1|MIPI_DCS_RGB666)
122 #define MIPICFG_32RGB888_OPT0 (MIPICFG_PF_GPI |MIPICFG_PF_OPT0|MIPI_DCS_RGB888)
128 #define hal_gdc_MIPI_set_mode hal_gdc_MIPI_set_pixel_format
326 #endif // HAL_GDC_MIPI_H__
int hal_gdc_MIPI_updateregion(int start_x, int start_y, int end_x, int end_y)
Does Partial Update in MIPI.
@ MIPI_enter_partial_mode
@ MIPI_DBIB_STORE_BASE_ADDR
void hal_gdc_MIPI_cmd(int cmd)
Send DCS command to display over the physical interface.
void hal_gdc_MIPI_set_position(int minx, int miny, int maxx, int maxy)
Set the frame position. Sends set_column_address and set_page_address commands.
void hal_gdc_MIPI_set_pixel_format(int pixel_format)
Set the display pixel format. Sends set_pixel_format command to the display.
@ MIPI_read_memory_continue
@ MIPI_set_partial_columns
@ MIPI_write_memory_continue
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.
void hal_gdc_MIPI_disable(void)
Convenience function. Sends display_off and enter_sleep_mode commands.
@ MIPI_get_diagnostic_result
void hal_gdc_MIPI_cmd_params(int cmd, int n_params,...)
Similar to hal_gdc_MIPI_cmd, with command parameters.
int hal_gdc_MIPI_in(void)
Read data from MIPI interface.
@ MIPI_write_memory_start
void hal_gdc_MIPI_out(int cmd)
Send command or data to MIPI Interface.
void hal_gdc_MIPI_CFG_out(int cfg)
Configure hal_gdc's serial interace.
void hal_gdc_MIPI_start_frame_transfer(void)
Convenience function. Send a write_memory_start command in order to start transfering the frame to th...
hal_gdc_mipi_cmd_t
MIPI Command List definition.
unsigned hal_gdc_MIPI_read(int cmd, int n_params)
Read MIPI DBI Type-B parameters.
@ MIPI_set_column_address
void hal_gdc_MIPI_enable(void)
Convenience function. Sends exit_sleep and display_on commands.