Classes | Macros | Typedefs | Enumerations | Functions
app_graphics_dc.h File Reference

Header file containing functions prototypes of DC app library. More...

`#include "gr55xx.h"`
`#include "app_io.h"`
`#include "hal_gdc.h"`
`#include "hal_gdc_regs.h"`
`#include "hal_gdc_mipi.h"`
Include dependency graph for app_graphics_dc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | app_graphics_dc_pin_t
| QSPI IO configuration Structures. More...
struct | app_graphics_dc_pins_t
| define DC pins More...
struct | app_graphics_dc_params_t
| Define init params for DC. More...
struct | app_graphics_dc_framelayer_t
| Define DC Frame Layer configuration. More...
struct | app_graphics_dc_cmd_t
| Define Control Command for DC Frame. More...

## Macros
#define | GRAPHICS_DC_CSN_PORT APP_IO_TYPE_GPIOB
| Define DC CSN PORT. More...
#define | GRAPHICS_DC_CSN_PIN APP_IO_PIN_11
| Define DC CSN PIN. More...
#define | GRAPHICS_DC_CSN_PIN_MUX APP_IO_MUX_1
| Define DC CSN PIN.MUX. More...
#define | GRAPHICS_DC_CLK_PORT APP_IO_TYPE_GPIOB
| Define DC CLK PORT. More...
#define | GRAPHICS_DC_CLK_PIN APP_IO_PIN_0
| Define DC CLK PIN. More...
#define | GRAPHICS_DC_CLK_PIN_MUX APP_IO_MUX_1
| Define DC CLK PIN.MUX. More...
#define | GRAPHICS_DC_IO0_PORT APP_IO_TYPE_GPIOB
| Define DC IO0 PORT. More...
#define | GRAPHICS_DC_IO0_PIN APP_IO_PIN_1
| Define DC IO0 PIN. More...
#define | GRAPHICS_DC_IO0_PIN_MUX APP_IO_MUX_1
| Define DC IO0 PIN.MUX. More...
#define | GRAPHICS_DC_IO1_PORT APP_IO_TYPE_GPIOB
| Define DC IO1 PORT. More...
#define | GRAPHICS_DC_IO1_PIN APP_IO_PIN_2
| Define DC IO1 PIN. More...
#define | GRAPHICS_DC_IO1_PIN_MUX APP_IO_MUX_1
| Define DC IO1 PIN.MUX. More...
#define | GRAPHICS_DC_IO2_PORT APP_IO_TYPE_GPIOB
| Define DC IO2 PORT. More...
#define | GRAPHICS_DC_IO2_PIN APP_IO_PIN_3
| Define DC IO2 PIN. More...
#define | GRAPHICS_DC_IO2_PIN_MUX APP_IO_MUX_1
| Define DC IO2 PIN.MUX. More...
#define | GRAPHICS_DC_IO3_PORT APP_IO_TYPE_GPIOB
| Define DC IO3 PORT. More...
#define | GRAPHICS_DC_IO3_PIN APP_IO_PIN_4
| Define DC IO3 PIN. More...
#define | GRAPHICS_DC_IO3_PIN_MUX APP_IO_MUX_1
| Define DC IO3 PIN.MUX. More...
#define | GRAPHICS_DC_DCX_PORT APP_IO_TYPE_GPIOB
| Define DC DCX PORT. More...
#define | GRAPHICS_DC_DCX_PIN APP_IO_PIN_13
| Define DC DCX PIN. More...
#define | GRAPHICS_DC_DCX_PIN_MUX APP_IO_MUX_5
| Define DC DCX PIN.MUX. More...
#define | GRAPHICS_DC_LAYER_0 0u
| Define DC Layer 0. More...
#define | GRAPHICS_DC_LAYER_1 1u
| Define DC Layer 1. More...
#define | GDC_IRQ_EVT_FRAME_TRANSMITION_END 0x01
| Define Frame Xfer End event. More...
#define | GDC_IRQ_EVT_CMD_TRANSMITION_END 0x02
| Define CMD Xfer End event. More...
#define | GRAPHICS_DC_BASEADDR 0xA3FF4000
| Define DC registers memory base address. More...

## Typedefs
typedef void(* | graphics_dc_irq_event_notify_cb) (uint32_t evt)
| DC IRQ callback definition. More...
typedef 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. More...

## Enumerations
enum | graphics_dc_mspi_e { GDC_MODE_SPI = 0, GDC_MODE_DSPI, GDC_MODE_QSPI }
| Define SPI work Mode for DC. More...
enum | graphics_dc_clock_freq_e { GDC_CLOCK_FREQ_48MHz = 0x00, GDC_CLOCK_FREQ_24MHz = 0x03, GDC_CLOCK_FREQ_12MHz = 0x05, GDC_CLOCK_FREQ_6MHz = 0x09, GDC_CLOCK_FREQ_3MHz = 0x11 }
| Define Clock Frequency for DC. More...
enum | graphics_dc_clock_mode_e { GDC_CLOCK_MODE_0 = 0x00, GDC_CLOCK_MODE_1 = 0x01, GDC_CLOCK_MODE_2 = 0x02, GDC_CLOCK_MODE_3 = 0x03 }
| Define Clock Mode for DC. More...
enum | graphics_dc_tcsu_cycle_e { GDC_TCSU_CYCLE_0 = 0x00, GDC_TCSU_CYCLE_1 = 0x01, GDC_TCSU_CYCLE_2 = 0x02, GDC_TCSU_CYCLE_3 = 0x03, GDC_TCSU_CYCLE_4 = 0x04 }
| Define Delay Clock for DC Tcsu. More...
enum | graphics_dc_power_state_e { GDC_POWER_STATE_SLEEP = 0, GDC_POWER_STATE_ACTIVE = 1 }
| Display Controller Power Mode Enumerations definition. More...
enum | graphics_dc_layer_mode_e { GDC_ONE_LAYER_MODE = 0x00, GDC_TWO_LAYER_MODE = 0x01 }
| Define work layers for DC. More...
enum | graphics_dc_data_format_e { GDC_DATA_FORMAT_RGB565 = HAL_GDC_RGB565, GDC_DATA_FORMAT_RGB24 = HAL_GDC_RGB24, GDC_DATA_FORMAT_RGBA8888 = HAL_GDC_RGBA8888, GDC_DATA_FORMAT_ABGR8888 = HAL_GDC_ABGR8888, GDC_DATA_FORMAT_ARGB8888 = HAL_GDC_ARGB8888, GDC_DATA_FORMAT_BGRA8888 = HAL_GDC_BGRA8888, GDC_DATA_FORMAT_TSC4 = HAL_GDC_TSC4, GDC_DATA_FORMAT_TSC6 = HAL_GDC_TSC6, GDC_DATA_FORMAT_TSC6A = HAL_GDC_TSC6A }
| Define the data format for frame buffer of DC. More...
enum | graphics_dc_mipi_format_e { GDC_MIPICFG_SPI_RGB565_OPT0 = MIPICFG_1RGB565_OPT0, GDC_MIPICFG_SPI_RGB888_OPT0 = MIPICFG_1RGB888_OPT0, GDC_MIPICFG_DSPI_RGB565_OPT0 = MIPICFG_2RGB565_OPT0, GDC_MIPICFG_DSPI_RGB888_OPT0 = MIPICFG_2RGB888_OPT1, GDC_MIPICFG_DSPI_RGB888_OPT1 = MIPICFG_2RGB888_OPT0, GDC_MIPICFG_QSPI_RGB565_OPT0 = MIPICFG_4RGB565_OPT0, GDC_MIPICFG_QSPI_RGB888_OPT0 = MIPICFG_4RGB888_OPT0 }
| Define the Output MIPI Timing for DATA Phase of DC Timing of MIPICFG_2RGB888_OPT1 is True MIPICFG_2RGB888_OPT0, and Timing of MIPICFG_2RGB888_OPT0 is True MIPICFG_2RGB888_OPT1, They need to exchange !!! More...
enum | graphics_dc_out_pixel_bits_e { GDC_OUT_PIXEL_BITS_16 = 16, GDC_OUT_PIXEL_BITS_24 = 24, GDC_OUT_PIXEL_BITS_NOT_SUPPORT = 0xFF }
| Define the Output pixel bits for DC. More...
enum | app_graphics_dc_frame_timing_e { GDC_SPI_FRAME_TIMING_0 = 0x00, GDC_DSPI_FRAME_TIMING_0, GDC_QSPI_FRAME_TIMING_0, GDC_QSPI_FRAME_TIMING_1 }
| Define the Output Frame Timing for DC. More...
enum | app_graphics_dc_frame_address_width_e { GDC_FRAME_ADDRESS_WIDTH_NONE = 0xFF, GDC_FRAME_ADDRESS_WIDTH_08BIT = MIPI_CMD08, GDC_FRAME_ADDRESS_WIDTH_16BIT = MIPI_CMD16, GDC_FRAME_ADDRESS_WIDTH_24BIT = MIPI_CMD24 }
| Define the bits of address phase for DC Frame. More...
enum | app_graphics_dc_access_type_e { GDC_ACCESS_TYPE_SYNC = 0, GDC_ACCESS_TYPE_ASYNC }
| Define access type for DC. More...
enum | app_graphics_dc_frame_result_e { GDC_FRAME_RES_SUCCESS = 0x00, GDC_FRAME_RES_ASYNC_WAIT, GDC_FRAME_RES_FAIL, GDC_FRAME_RES_UNSUPPORT }
| Define frame output result for DC. More...

## Functions
uint16_t | graphics_dc_init (app_graphics_dc_params_t *dc_params, graphics_dc_irq_event_notify_cb evt_cb)
| init Graphics DC dev More...
void | graphics_dc_deinit (void)
| de-init Graphics DC dev, just called when needed to reboot/reset More...
void | graphics_dc_pins_reinit (void)
| re-init i/o for Graphics DC dev with pre-init i/o setting More...
void | app_graphics_dc_set_power_state (graphics_dc_power_state_e state)
| Switch power state for DC module. More...
void | app_graphics_dc_freq_set (graphics_dc_clock_freq_e clock_freq)
| DC clock frequency set. More...
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. More...
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) More...
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) More...
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) More...
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) More...
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. More...

## Detailed Description

Header file containing functions prototypes of DC app library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2021 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 app_graphics_dc.h.