Go to the documentation of this file.
52 #ifndef __APP_GRAPHICS_GRAPHICS_DC_H__
53 #define __APP_GRAPHICS_GRAPHICS_DC_H__
320 #define GRAPHICS_DC_CSN_PORT APP_IO_TYPE_GPIOB
321 #define GRAPHICS_DC_CSN_PIN APP_IO_PIN_11
322 #define GRAPHICS_DC_CSN_PIN_MUX APP_IO_MUX_1
324 #define GRAPHICS_DC_CLK_PORT APP_IO_TYPE_GPIOB
325 #define GRAPHICS_DC_CLK_PIN APP_IO_PIN_0
326 #define GRAPHICS_DC_CLK_PIN_MUX APP_IO_MUX_1
328 #define GRAPHICS_DC_IO0_PORT APP_IO_TYPE_GPIOB
329 #define GRAPHICS_DC_IO0_PIN APP_IO_PIN_1
330 #define GRAPHICS_DC_IO0_PIN_MUX APP_IO_MUX_1
332 #define GRAPHICS_DC_IO1_PORT APP_IO_TYPE_GPIOB
333 #define GRAPHICS_DC_IO1_PIN APP_IO_PIN_2
334 #define GRAPHICS_DC_IO1_PIN_MUX APP_IO_MUX_1
336 #define GRAPHICS_DC_IO2_PORT APP_IO_TYPE_GPIOB
337 #define GRAPHICS_DC_IO2_PIN APP_IO_PIN_3
338 #define GRAPHICS_DC_IO2_PIN_MUX APP_IO_MUX_1
340 #define GRAPHICS_DC_IO3_PORT APP_IO_TYPE_GPIOB
341 #define GRAPHICS_DC_IO3_PIN APP_IO_PIN_4
342 #define GRAPHICS_DC_IO3_PIN_MUX APP_IO_MUX_1
344 #define GRAPHICS_DC_DCX_PORT APP_IO_TYPE_GPIOB
345 #define GRAPHICS_DC_DCX_PIN APP_IO_PIN_13
346 #define GRAPHICS_DC_DCX_PIN_MUX APP_IO_MUX_5
352 #define GRAPHICS_DC_LAYER_0 0u
353 #define GRAPHICS_DC_LAYER_1 1u
359 #define GDC_IRQ_EVT_FRAME_TRANSMITION_END 0x01
360 #define GDC_IRQ_EVT_CMD_TRANSMITION_END 0x02
366 #define GRAPHICS_DC_BASEADDR 0xA3FF4000
void app_graphics_dc_dspi_send_cmd_data_in_4wire_2lane(uint16_t cmd, uint16_t data)
Send cmd &data in 4-wire mode for DSPI (DCX as SD1, and 1 more MSB Bit for cmd/data indicator)
@ GDC_SPI_FRAME_TIMING_0
8Bit CMD::24Bit ADDR::Ndata, All Sent in SPI
@ GDC_FRAME_RES_UNSUPPORT
frame format/command not support,please check config params
uint32_t size_x
Rendering Size X.
@ GDC_CLOCK_FREQ_6MHz
DC clock, 6MHz
@ GDC_CLOCK_MODE_2
DC clock mode 2.
@ MIPI_CMD16
Set cmd width to 16bit.
QSPI IO configuration Structures.
#define MIPICFG_2RGB888_OPT0
0x107
#define MIPICFG_4RGB565_OPT0
0x145
void graphics_dc_pins_reinit(void)
re-init i/o for Graphics DC dev with pre-init i/o setting
graphics_dc_tcsu_cycle_e tcsu_cycle
Specify cs setup delay, Ref Optional values of graphics_dc_tcsu_cycle_e.
app_graphics_dc_pin_t io2
Set the configuration of QSPI IO2 pin.
@ GDC_ACCESS_TYPE_SYNC
SYNC access type
@ GDC_FRAME_RES_FAIL
frame sent fail
@ GDC_TCSU_CYCLE_3
delay 3 clock cycle
void app_graphics_dc_dspi_send_cmd_in_3wire_1lane(uint8_t cmd)
Send single cmd in 3-wire mode for DSPI (no DCX and 1 more MSB Bit for cmd indicator)
@ GDC_MODE_SPI
By 1-wire SPI.
uint8_t enable
Enable or disable the pin.
@ GDC_CLOCK_FREQ_48MHz
DC clock, 48MHz.
void graphics_dc_deinit(void)
de-init Graphics DC dev, just called when needed to reboot/reset
graphics_dc_clock_mode_e
Define Clock Mode for DC.
@ GDC_ACCESS_TYPE_ASYNC
ASYNC access type.
@ GDC_TCSU_CYCLE_1
delay 1 clock cycle
graphics_dc_clock_freq_e
Define Clock Frequency for DC.
app_graphics_dc_frame_timing_e frame_timing
Specify the supported frame timing.
uint32_t address
Address phase for display timing,if no address phase, ignore this.
@ GDC_DATA_FORMAT_RGBA8888
FrameBuffer is RGBA8888, 32bit with Alpha.
void(* graphics_dc_set_refresh_area_cb)(uint32_t mark, uint32_t x_start, uint32_t x_end, uint32_t y_start, uint32_t y_end)
DC Refresh callback definition.
@ GDC_CLOCK_MODE_3
DC clock mode 3.
@ GDC_CLOCK_MODE_1
DC clock mode 1.
graphics_dc_power_state_e
Display Controller Power Mode Enumerations definition.
#define MIPICFG_2RGB888_OPT1
0x10f
@ GDC_MIPICFG_DSPI_RGB565_OPT0
Sent in DSPI Mode, Output format is RGB565 with option.0.
@ GDC_CLOCK_FREQ_3MHz
DC clock, 3MHz
@ GDC_DATA_FORMAT_TSC6
FrameBuffer is *888 compressed by TSC6
@ GDC_CLOCK_FREQ_24MHz
DC clock, 24MHz.
uint16_t resolution_x
Specify the x resolution in pixels.
app_io_pull_t
GPIO pull Enumerations definition.
app_graphics_dc_pin_t io0
Set the configuration of QSPI IO0 pin.
void app_graphics_dc_spi_send(uint8_t cmd_8bit, uint32_t address_24bit, uint8_t *data, uint32_t length)
Send 1 Byte CMD,3 Byte ADDR And N Byte Data in 1-wire SPI Mode.
@ GDC_DATA_FORMAT_RGB565
FrameBuffer is RGA565, 16bit, no Alpha
@ GDC_DATA_FORMAT_BGRA8888
FrameBuffer is BGRA8888, 32bit with Alpha.
app_graphics_dc_frame_result_e
Define frame output result for DC.
@ GDC_FRAME_ADDRESS_WIDTH_NONE
Not support
app_graphics_dc_pin_t dcx
Set the configuration of QSPI IO3 pin.
app_graphics_dc_frame_result_e app_graphics_dc_send_single_frame(uint32_t which_layer, app_graphics_dc_framelayer_t *frame_layer, app_graphics_dc_cmd_t *dc_cmd, app_graphics_dc_access_type_e access_type)
Send one whole frame by DC.
Define init params for DC.
@ GDC_MIPICFG_DSPI_RGB888_OPT1
Sent in DSPI Mode, Output format is RGB888 with option.1.
graphics_dc_data_format_e data_format
Format.
@ GDC_MIPICFG_DSPI_RGB888_OPT0
Sent in DSPI Mode, Output format is RGB888 with option.0.
@ GDC_QSPI_FRAME_TIMING_1
8Bit CMD Sent in SPI, 24Bit ADDR and All data Sent in QSPI
Define DC Frame Layer configuration.
@ HAL_GDC_ARGB8888
ARGB8888.
@ GDC_OUT_PIXEL_BITS_16
Output pixel 16 bits
graphics_dc_clock_freq_e clock_freq
Specify dc clock freq, Ref Optional values of graphics_dc_clock_freq_e.
@ GDC_CLOCK_FREQ_12MHz
DC clock, 12MHz.
graphics_dc_layer_mode_e
Define work layers for DC.
int32_t row_stride
Stride.
Header file containing functions prototypes of GPIO app library.
app_graphics_dc_pins_t pins_cfg
Specify pins state.
app_graphics_dc_pin_t clk
Set the configuration of QSPI CLK pin.
@ MIPI_CMD08
Set cmd width to 8bit.
@ MIPI_CMD24
Set cmd width to 24bit.
uint16_t resolution_y
Specify the y resolution in pixels.
@ GDC_DATA_FORMAT_TSC6A
FrameBuffer is *8888 compressed by TSC6A
Define Control Command for DC Frame.
app_graphics_dc_frame_timing_e
Define the Output Frame Timing for DC.
@ GDC_OUT_PIXEL_BITS_NOT_SUPPORT
Not support
#define MIPICFG_1RGB888_OPT0
0xc7
graphics_dc_mipi_format_e mipicfg_format
Specify mipi timing format, Ref Optional values of graphics_dc_mipi_format_e.
uint32_t resolution_x
Resolution X.
@ GDC_TCSU_CYCLE_0
delay 0 clock cycle
@ GDC_TCSU_CYCLE_4
delay 4 clock cycle
#define MIPICFG_2RGB565_OPT0
0x105
@ GDC_TWO_LAYER_MODE
2 layer mode
void app_graphics_dc_dspi_send_cmd_data_in_3wire_1lane(uint8_t cmd, uint8_t data)
Send single cmd &data in 3-wire mode for DSPI (no DCX and 1 more MSB Bit for cmd/data indicator)
@ HAL_GDC_BGRA8888
BGRA8888.
@ HAL_GDC_RGBA8888
RGBA8888.
void(* graphics_dc_irq_event_notify_cb)(uint32_t evt)
DC IRQ callback definition.
uint32_t resolution_y
Resolution Y.
@ GDC_FRAME_ADDRESS_WIDTH_08BIT
Frame address width 8bits
graphics_dc_mspi_e
Define SPI work Mode for DC.
@ GDC_FRAME_ADDRESS_WIDTH_24BIT
Frame address width 24bits
app_graphics_dc_frame_address_width_e
Define the bits of address phase for DC Frame.
#define MIPICFG_4RGB888_OPT0
0x147
@ GDC_MIPICFG_SPI_RGB565_OPT0
Sent in SPI Mode, Output format is RGB565 with option.0.
graphics_dc_data_format_e
Define the data format for frame buffer of DC.
uint8_t command
Command phase for display timing.
uint32_t size_y
Rendering Size Y.
app_graphics_dc_pin_t io3
Set the configuration of QSPI IO3 pin.
int32_t start_y
Start Rendering Y Coordinator.
@ GDC_MIPICFG_QSPI_RGB888_OPT0
Sent in QSPI Mode, Output format is RGB888 with option.0.
void * frame_baseaddr
Frame Address.
graphics_dc_clock_mode_e clock_mode
Specify dc clock mode, Ref Optional values of graphics_dc_clock_mode_e.
@ GDC_MIPICFG_SPI_RGB888_OPT0
Sent in SPI Mode, Output format is RGB565 with option.0.
@ GDC_ONE_LAYER_MODE
1 layer mode
void app_graphics_dc_freq_set(graphics_dc_clock_freq_e clock_freq)
DC clock frequency set.
app_graphics_dc_pin_t csn
Set the configuration of QSPI CS pin.
@ GDC_DATA_FORMAT_ARGB8888
FrameBuffer is ARGB8888, 32bit with Alpha.
graphics_dc_tcsu_cycle_e
Define Delay Clock for DC Tcsu.
app_graphics_dc_pin_t io1
Set the configuration of QSPI IO1 pin.
graphics_dc_mipi_format_e
Define the Output MIPI Timing for DATA Phase of DC Timing of MIPICFG_2RGB888_OPT1 is True MIPICFG_2RG...
#define MIPICFG_1RGB565_OPT0
0xc5
void app_graphics_dc_set_power_state(graphics_dc_power_state_e state)
Switch power state for DC module.
@ GDC_TCSU_CYCLE_2
delay 2 clock cycle
@ GDC_FRAME_RES_SUCCESS
frame sent success
@ GDC_MIPICFG_QSPI_RGB565_OPT0
Sent in QSPI Mode, Output format is RGB565 with option.0.
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
@ GDC_MODE_DSPI
1bit cmd + 8bit data, and DCX signal
@ HAL_GDC_ABGR8888
ABGR8888.
void app_graphics_dc_dspi_send_cmd_datas_in_4wire_2lane(uint16_t cmd, uint16_t *data, int length)
Send cmd &data in 4-wire mode for DSPI (DCX as SD1, and 1 more MSB Bit for cmd/data indicator)
@ GDC_DSPI_FRAME_TIMING_0
8Bit CMD Sent in SPI::NO ADDR::Ndata Sent in DSPI, with DCX
Header file containing functions prototypes of Graphics library.
uint8_t blendmode
Blending Mode.
Header file containing functions prototypes of Graphics library.
@ GDC_FRAME_ADDRESS_WIDTH_16BIT
Frame address width 16bits
@ GDC_MODE_QSPI
By Quad SPI.
graphics_dc_out_pixel_bits_e
Define the Output pixel bits for DC.
@ GDC_OUT_PIXEL_BITS_24
Output pixel 24 bits
app_graphics_dc_access_type_e
Define access type for DC.
@ GDC_CLOCK_MODE_0
DC clock mode 0.
@ GDC_FRAME_RES_ASYNC_WAIT
frame sent, but need to get the result in async callback
uint16_t graphics_dc_init(app_graphics_dc_params_t *dc_params, graphics_dc_irq_event_notify_cb evt_cb)
init Graphics DC dev
Header file containing functions prototypes of Graphics library.
int32_t start_x
Start Rendering X Coordinator.
@ GDC_DATA_FORMAT_ABGR8888
FrameBuffer is ABGR8888, 32bit with Alpha.
@ GDC_DATA_FORMAT_TSC4
FrameBuffer is RGB565 compressed by TSC4
@ GDC_QSPI_FRAME_TIMING_0
8Bit CMD::24Bit ADDR Sent in SPI, All Data Sent in QSPI
@ GDC_DATA_FORMAT_RGB24
FrameBuffer is RGA24, 24bit, no Alpha
graphics_dc_layer_mode_e layer_mode
Specify which layer to flush, Ref Optional values of graphics_dc_layer_mode_e.
graphics_dc_mspi_e mspi_mode
Specify spi mode, Ref Optional values of graphics_dc_mspi_e.
app_graphics_dc_frame_address_width_e address_width
Optional values: GDC_FRAME_ADDRESS_WIDTH_NONE GDC_FRAME_ADDRESS_WIDTH_08BIT GDC_FRAME_ADDRESS_WIDTH_1...