37#ifndef DRIVER_ST7789_H
38#define DRIVER_ST7789_H
62#ifndef ST7789_BUFFER_SIZE
63 #define ST7789_BUFFER_SIZE (4096)
609#define DRIVER_ST7789_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
617#define DRIVER_ST7789_LINK_SPI_INIT(HANDLE, FUC) (HANDLE)->spi_init = FUC
625#define DRIVER_ST7789_LINK_SPI_DEINIT(HANDLE, FUC) (HANDLE)->spi_deinit = FUC
633#define DRIVER_ST7789_LINK_SPI_WRITE_COMMAND(HANDLE, FUC) (HANDLE)->spi_write_cmd = FUC
641#define DRIVER_ST7789_LINK_COMMAND_DATA_GPIO_INIT(HANDLE, FUC) (HANDLE)->cmd_data_gpio_init = FUC
649#define DRIVER_ST7789_LINK_COMMAND_DATA_GPIO_DEINIT(HANDLE, FUC) (HANDLE)->cmd_data_gpio_deinit = FUC
657#define DRIVER_ST7789_LINK_COMMAND_DATA_GPIO_WRITE(HANDLE, FUC) (HANDLE)->cmd_data_gpio_write = FUC
665#define DRIVER_ST7789_LINK_RESET_GPIO_INIT(HANDLE, FUC) (HANDLE)->reset_gpio_init = FUC
673#define DRIVER_ST7789_LINK_RESET_GPIO_DEINIT(HANDLE, FUC) (HANDLE)->reset_gpio_deinit = FUC
681#define DRIVER_ST7789_LINK_RESET_GPIO_WRITE(HANDLE, FUC) (HANDLE)->reset_gpio_write = FUC
689#define DRIVER_ST7789_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
697#define DRIVER_ST7789_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
1123 uint16_t scrolling_area, uint16_t bottom_fixed_area);
1396 uint8_t back_porch_normal,
1397 uint8_t front_porch_normal,
1399 uint8_t back_porch_idle,
1400 uint8_t front_porch_idle,
1401 uint8_t back_porch_partial,
1402 uint8_t front_porch_partial);
1427 uint8_t idle_frame_rate,
1429 uint8_t partial_frame_rate);
1479 uint8_t gate_on_timing_adjustment,
1480 uint8_t gate_off_timing_adjustment_rgb,
1481 uint8_t gate_off_timing_adjustment);
1865 uint8_t gate_line_number,
1866 uint8_t first_scan_line_number,
1941 uint8_t source_equalize_time,
1942 uint8_t source_pre_drive_time,
1943 uint8_t gate_equalize_time);
st7789_frame_rate_t
st7789 frame rate enumeration definition
st7789_vds_t
st7789 vds enumeration definition
uint8_t st7789_set_id_code_setting(st7789_handle_t *handle, uint8_t id[3])
set id code setting
uint8_t st7789_vrhs_convert_to_register(st7789_handle_t *handle, float v, uint8_t *reg)
convert the vrhs to the register raw data
st7789_rgb_bus_width_t
st7789 rgb bus width enumeration definition
uint8_t st7789_gate_line_convert_to_data(st7789_handle_t *handle, uint8_t reg, uint16_t *l)
convert the register raw data to the gate line
st7789_avdd_t
st7789 avdd enumeration definition
uint8_t st7789_enable_vap_van_signal_output(st7789_handle_t *handle)
enable vap van signal output
uint8_t st7789_set_program_action(st7789_handle_t *handle)
set program action
uint8_t st7789_set_gate_on_timing_adjustment(st7789_handle_t *handle, uint8_t gate_on_timing_adjustment, uint8_t gate_off_timing_adjustment_rgb, uint8_t gate_off_timing_adjustment)
set gate on timing adjustment
st7789_stp14ck_div_t
st7789 stp14ck div enumeration definition
st7789_vdv_vrh_from_t
st7789 vdv vrh from enumeration definition
uint8_t st7789_set_nvm_setting(st7789_handle_t *handle, uint8_t addr, uint8_t data)
set nvm setting
st7789_frame_rate_divided_control_t
st7789 frame rate divided control enumeration definition
st7789_pixel_type_t
st7789 pixel type enumeration definition
uint8_t st7789_vcoms_offset_convert_to_data(st7789_handle_t *handle, uint8_t reg, float *v)
convert the register raw data to the vcoms offset
uint8_t st7789_vdv_convert_to_register(st7789_handle_t *handle, float v, uint8_t *reg)
convert the vdv to the register raw data
uint8_t st7789_set_vcoms_offset(st7789_handle_t *handle, uint8_t offset)
set vcoms offset
uint8_t st7789_set_rgb_interface_control(st7789_handle_t *handle, st7789_direct_rgb_mode_t rgb_mode, st7789_rgb_if_enable_mode_t rgb_if_mode, st7789_pin_level_t vspl, st7789_pin_level_t hspl, st7789_pin_level_t dpl, st7789_pin_level_t epl, uint8_t vbp, uint8_t hbp)
set rgb interface control
uint8_t st7789_set_program_mode_enable(st7789_handle_t *handle, st7789_bool_t enable)
enable or disable program mode
uint8_t st7789_vcom_convert_to_data(st7789_handle_t *handle, uint8_t reg, float *v)
convert the register raw data to the vcom
uint8_t st7789_set_command_2_enable(st7789_handle_t *handle, st7789_bool_t enable)
enable or disable command 2
st7789_inversion_selection_t
st7789 inversion selection enumeration definition
uint8_t st7789_set_equalize_time_control(st7789_handle_t *handle, uint8_t source_equalize_time, uint8_t source_pre_drive_time, uint8_t gate_equalize_time)
set equalize time control
st7789_pin_level_t
st7789 pin level enumeration definition
st7789_vgls_t
st7789 vgls enumeration definition
st7789_inversion_partial_mode_t
st7789 inversion partial mode enumeration definition
st7789_non_display_frame_frequency_t
st7789 non display frame frequency enumeration definition
uint8_t st7789_set_positive_voltage_gamma_control(st7789_handle_t *handle, uint8_t param[14])
set positive voltage gamma control
st7789_avcl_t
st7789 avcl enumeration definition
uint8_t st7789_set_program_mode_control(st7789_handle_t *handle)
set program mode control
st7789_pwm_frequency_t
st7789 pwm frequency enumeration definition
uint8_t st7789_set_vdv_vrh_from(st7789_handle_t *handle, st7789_vdv_vrh_from_t from)
set vdv vrh from
uint8_t st7789_set_vcoms(st7789_handle_t *handle, uint8_t vcoms)
set vcoms
uint8_t st7789_set_digital_gamma(st7789_handle_t *handle, st7789_bool_t enable)
enable or disable digital gamma
st7789_sbclk_div_t
st7789 sbclk div enumeration definition
uint8_t st7789_set_frame_rate(st7789_handle_t *handle, st7789_inversion_selection_t selection, st7789_frame_rate_t rate)
set frame rate
uint8_t st7789_set_negative_voltage_gamma_control(st7789_handle_t *handle, uint8_t param[14])
set negative voltage gamma control
uint8_t st7789_set_lcm_control(st7789_handle_t *handle, st7789_bool_t xmy, st7789_bool_t xbgr, st7789_bool_t xinv, st7789_bool_t xmx, st7789_bool_t xmh, st7789_bool_t xmv, st7789_bool_t xgs)
set lcm control
uint8_t st7789_set_power_control_1(st7789_handle_t *handle, st7789_avdd_t avdd, st7789_avcl_t avcl, st7789_vds_t vds)
set power control 1
uint8_t st7789_vrhs_convert_to_data(st7789_handle_t *handle, uint8_t reg, float *v)
convert the register raw data to the vrhs
st7789_frame_type_t
st7789 frame type enumeration definition
uint8_t st7789_set_frame_rate_control(st7789_handle_t *handle, st7789_bool_t separate_fr_control, st7789_frame_rate_divided_control_t div_control, st7789_inversion_idle_mode_t idle_mode, uint8_t idle_frame_rate, st7789_inversion_partial_mode_t partial_mode, uint8_t partial_frame_rate)
set frame rate control
st7789_vghs_t
st7789 vghs enumeration definition
st7789_non_display_source_output_level_t
st7789 non display source output level enumeration definition
st7789_data_mode_t
st7789 data mode enumeration definition
uint8_t st7789_set_ram_control(st7789_handle_t *handle, st7789_ram_access_t ram_mode, st7789_display_mode_t display_mode, st7789_frame_type_t frame_type, st7789_data_mode_t data_mode, st7789_rgb_bus_width_t bus_width, st7789_pixel_type_t pixel_type)
set ram control
uint8_t st7789_vcoms_offset_convert_to_register(st7789_handle_t *handle, float v, uint8_t *reg)
convert the vcoms offset to the register raw data
uint8_t st7789_set_gate(st7789_handle_t *handle, uint8_t gate_line_number, uint8_t first_scan_line_number, st7789_gate_scan_mode_t mode, st7789_gate_scan_direction_t direction)
set gate
st7789_inversion_idle_mode_t
st7789 inversion idle mode enumeration definition
uint8_t st7789_set_gate_control(st7789_handle_t *handle, st7789_vghs_t vghs, st7789_vgls_t vgls)
set gate control
uint8_t st7789_set_cabc_control(st7789_handle_t *handle, st7789_bool_t led_on, st7789_bool_t led_pwm_init, st7789_bool_t led_pwm_fix, st7789_bool_t led_pwm_polarity)
set cabc control
st7789_direct_rgb_mode_t
st7789 direct rgb mode enumeration definition
uint8_t st7789_set_partial_mode_control(st7789_handle_t *handle, st7789_non_display_source_output_level_t level, st7789_non_display_area_scan_mode_t mode, st7789_non_display_frame_frequency_t frequency)
set partial mode control
uint8_t st7789_vdv_convert_to_data(st7789_handle_t *handle, uint8_t reg, float *v)
convert the register raw data to the vdv
st7789_non_display_area_scan_mode_t
st7789 non display area scan mode enumeration definition
st7789_rgb_if_enable_mode_t
st7789 rgb if enable mode enumeration definition
st7789_ram_access_t
st7789 ram access enumeration definition
uint8_t st7789_set_pwm_frequency(st7789_handle_t *handle, st7789_pwm_frequency_t frequency)
set pwm frequency
uint8_t st7789_set_spi2_enable(st7789_handle_t *handle, st7789_bool_t date_lane, st7789_bool_t command_table_2)
set spi2 enable
uint8_t st7789_set_porch(st7789_handle_t *handle, uint8_t back_porch_normal, uint8_t front_porch_normal, st7789_bool_t separate_porch_enable, uint8_t back_porch_idle, uint8_t front_porch_idle, uint8_t back_porch_partial, uint8_t front_porch_partial)
set porch
uint8_t st7789_set_power_control_2(st7789_handle_t *handle, st7789_sbclk_div_t sbclk, st7789_stp14ck_div_t stp14ck)
set power control 2
uint8_t st7789_vcom_convert_to_register(st7789_handle_t *handle, float v, uint8_t *reg)
convert the vcom to the register raw data
uint8_t st7789_set_vdv(st7789_handle_t *handle, uint8_t vdv)
set vdv
st7789_gate_scan_direction_t
st7789 gate scan direction enumeration definition
st7789_gate_scan_mode_t
st7789 gate scan mode enumeration definition
uint8_t st7789_set_vrhs(st7789_handle_t *handle, uint8_t vrhs)
set vrhs
uint8_t st7789_set_digital_gamma_look_up_table_blue(st7789_handle_t *handle, uint8_t param[64])
set blue digital gamma look up table
uint8_t st7789_set_digital_gamma_look_up_table_red(st7789_handle_t *handle, uint8_t param[64])
set red digital gamma look up table
uint8_t st7789_gate_line_convert_to_register(st7789_handle_t *handle, uint16_t l, uint8_t *reg)
convert the gate line to the register raw data
st7789_display_mode_t
st7789 display mode enumeration definition
@ ST7789_FRAME_RATE_58_HZ
@ ST7789_FRAME_RATE_46_HZ
@ ST7789_FRAME_RATE_45_HZ
@ ST7789_FRAME_RATE_86_HZ
@ ST7789_FRAME_RATE_111_HZ
@ ST7789_FRAME_RATE_119_HZ
@ ST7789_FRAME_RATE_62_HZ
@ ST7789_FRAME_RATE_53_HZ
@ ST7789_FRAME_RATE_39_HZ
@ ST7789_FRAME_RATE_60_HZ
@ ST7789_FRAME_RATE_42_HZ
@ ST7789_FRAME_RATE_41_HZ
@ ST7789_FRAME_RATE_40_HZ
@ ST7789_FRAME_RATE_48_HZ
@ ST7789_FRAME_RATE_69_HZ
@ ST7789_FRAME_RATE_43_HZ
@ ST7789_FRAME_RATE_94_HZ
@ ST7789_FRAME_RATE_57_HZ
@ ST7789_FRAME_RATE_67_HZ
@ ST7789_FRAME_RATE_82_HZ
@ ST7789_FRAME_RATE_90_HZ
@ ST7789_FRAME_RATE_49_HZ
@ ST7789_FRAME_RATE_72_HZ
@ ST7789_FRAME_RATE_55_HZ
@ ST7789_FRAME_RATE_64_HZ
@ ST7789_FRAME_RATE_99_HZ
@ ST7789_FRAME_RATE_50_HZ
@ ST7789_FRAME_RATE_75_HZ
@ ST7789_FRAME_RATE_105_HZ
@ ST7789_FRAME_RATE_44_HZ
@ ST7789_FRAME_RATE_78_HZ
@ ST7789_FRAME_RATE_52_HZ
@ ST7789_RGB_BUS_WIDTH_18_BIT
@ ST7789_RGB_BUS_WIDTH_6_BIT
@ ST7789_VDV_VRH_FROM_CMD
@ ST7789_VDV_VRH_FROM_NVM
@ ST7789_FRAME_RATE_DIVIDED_CONTROL_DIV_2
@ ST7789_FRAME_RATE_DIVIDED_CONTROL_DIV_4
@ ST7789_FRAME_RATE_DIVIDED_CONTROL_DIV_1
@ ST7789_FRAME_RATE_DIVIDED_CONTROL_DIV_8
@ ST7789_INVERSION_SELECTION_DOT
@ ST7789_INVERSION_SELECTION_COLUMN
@ ST7789_VGLS_NEGATIVE_7P16
@ ST7789_VGLS_NEGATIVE_12P50
@ ST7789_VGLS_NEGATIVE_8P87
@ ST7789_VGLS_NEGATIVE_10P43
@ ST7789_VGLS_NEGATIVE_8P23
@ ST7789_VGLS_NEGATIVE_11P38
@ ST7789_VGLS_NEGATIVE_7P67
@ ST7789_VGLS_NEGATIVE_9P60
@ ST7789_INVERSION_PARTIAL_MODE_COLUMN
@ ST7789_INVERSION_PARTIAL_MODE_DOT
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_3
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_11
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_9
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_21
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_15
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_17
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_23
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_29
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_25
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_31
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_EVERY
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_19
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_13
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_5
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_7
@ ST7789_NON_DISPLAY_FRAME_FREQUENCY_1_DIV_27
@ ST7789_AVCL_NEGTIVE_4P4_V
@ ST7789_AVCL_NEGTIVE_5P0_V
@ ST7789_AVCL_NEGTIVE_4P8_V
@ ST7789_AVCL_NEGTIVE_4P6_V
@ ST7789_PWM_FREQUENCY_9P80_KHZ
@ ST7789_PWM_FREQUENCY_39P7_KHZ
@ ST7789_PWM_FREQUENCY_83P3_KHZ
@ ST7789_PWM_FREQUENCY_40P3_KHZ
@ ST7789_PWM_FREQUENCY_10P1_KHZ
@ ST7789_PWM_FREQUENCY_79P4_KHZ
@ ST7789_PWM_FREQUENCY_1428P6_KHZ
@ ST7789_PWM_FREQUENCY_20P2_KHZ
@ ST7789_PWM_FREQUENCY_4P9_KHZ
@ ST7789_PWM_FREQUENCY_0P62_KHZ
@ ST7789_PWM_FREQUENCY_5P00_KHZ
@ ST7789_PWM_FREQUENCY_9P9_KHZ
@ ST7789_PWM_FREQUENCY_80P6_KHZ
@ ST7789_PWM_FREQUENCY_333P3_KHZ
@ ST7789_PWM_FREQUENCY_322P6_KHZ
@ ST7789_PWM_FREQUENCY_10P4_KHZ
@ ST7789_PWM_FREQUENCY_9P8_KHZ
@ ST7789_PWM_FREQUENCY_39P4_KHZ
@ ST7789_PWM_FREQUENCY_41P7_KHZ
@ ST7789_PWM_FREQUENCY_89P3_KHZ
@ ST7789_PWM_FREQUENCY_161P3_KHZ
@ ST7789_PWM_FREQUENCY_166P7_KHZ
@ ST7789_PWM_FREQUENCY_2P48_KHZ
@ ST7789_PWM_FREQUENCY_11P2_KHZ
@ ST7789_PWM_FREQUENCY_44P6_KHZ
@ ST7789_PWM_FREQUENCY_4P90_KHZ
@ ST7789_PWM_FREQUENCY_714P3_KHZ
@ ST7789_PWM_FREQUENCY_1P24_KHZ
@ ST7789_PWM_FREQUENCY_39P2_KHZ
@ ST7789_PWM_FREQUENCY_2P5_KHZ
@ ST7789_PWM_FREQUENCY_0P31_KHZ
@ ST7789_PWM_FREQUENCY_1P23_KHZ
@ ST7789_PWM_FREQUENCY_2P45_KHZ
@ ST7789_PWM_FREQUENCY_666P7_KHZ
@ ST7789_PWM_FREQUENCY_357P1_KHZ
@ ST7789_PWM_FREQUENCY_19P7_KHZ
@ ST7789_PWM_FREQUENCY_2P25_KHZ
@ ST7789_PWM_FREQUENCY_22P3_KHZ
@ ST7789_PWM_FREQUENCY_0P61_KHZ
@ ST7789_PWM_FREQUENCY_5P0_KHZ
@ ST7789_PWM_FREQUENCY_78P7_KHZ
@ ST7789_PWM_FREQUENCY_19P8_KHZ
@ ST7789_PWM_FREQUENCY_178P6_KHZ
@ ST7789_PWM_FREQUENCY_19P6_KHZ
@ ST7789_PWM_FREQUENCY_20P8_KHZ
@ ST7789_PWM_FREQUENCY_5P2_KHZ
@ ST7789_PWM_FREQUENCY_158P7_KHZ
@ ST7789_PWM_FREQUENCY_1P230_KHZ
@ ST7789_NON_DISPLAY_SOURCE_OUTPUT_LEVEL_V63
@ ST7789_NON_DISPLAY_SOURCE_OUTPUT_LEVEL_V0
@ ST7789_INVERSION_IDLE_MODE_DOT
@ ST7789_INVERSION_IDLE_MODE_COLUMN
@ ST7789_DIRECT_RGB_MODE_MEM
@ ST7789_DIRECT_RGB_MODE_SHIFT
@ ST7789_NON_DISPLAY_AREA_SCAN_MODE_INTERVAL
@ ST7789_NON_DISPLAY_AREA_SCAN_MODE_NORMAL
@ ST7789_RGB_IF_ENABLE_MODE_MCU
@ ST7789_RGB_IF_ENABLE_MODE_DE
@ ST7789_RGB_IF_ENABLE_MODE_HV
@ ST7789_GATE_SCAN_DIRECTION_319_0
@ ST7789_GATE_SCAN_DIRECTION_0_319
@ ST7789_GATE_SCAN_MODE_NON_INTERLACE
@ ST7789_GATE_SCAN_MODE_INTERLACE
@ ST7789_DISPLAY_MODE_RGB
@ ST7789_DISPLAY_MODE_VSYNC
@ ST7789_DISPLAY_MODE_MCU
uint8_t st7789_display_inversion_off(st7789_handle_t *handle)
display inversion off
st7789_font_t
st7789 font size enumeration definition
uint8_t st7789_draw_picture_18bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t *image)
draw a picture
uint8_t st7789_set_vertical_scrolling(st7789_handle_t *handle, uint16_t top_fixed_area, uint16_t scrolling_area, uint16_t bottom_fixed_area)
set vertical scrolling
uint8_t st7789_display_on(st7789_handle_t *handle)
display on
uint8_t st7789_tearing_effect_line_on(st7789_handle_t *handle, st7789_tearing_effect_t effect)
tearing effect line on
uint8_t st7789_set_vertical_scroll_start_address(st7789_handle_t *handle, uint16_t start_address)
set the vertical scroll start address
uint8_t st7789_init(st7789_handle_t *handle)
initialize the chip
uint8_t st7789_set_tear_scanline(st7789_handle_t *handle, uint16_t l)
set tear scanline
uint8_t st7789_draw_picture_12bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
st7789_color_enhancement_mode_t
st7789 color enhancement mode enumeration definition
uint8_t st7789_set_column_address(st7789_handle_t *handle, uint16_t start_address, uint16_t end_address)
set the column address
struct st7789_handle_s st7789_handle_t
st7789 handle structure definition
#define ST7789_BUFFER_SIZE
st7789 buffer size definition
uint8_t st7789_set_row(st7789_handle_t *handle, uint16_t row)
set row
uint8_t st7789_normal_display_mode_on(st7789_handle_t *handle)
normal display mode on
uint8_t st7789_write_string(st7789_handle_t *handle, uint16_t x, uint16_t y, char *str, uint16_t len, uint32_t color, st7789_font_t font)
write a string in the display
uint8_t st7789_software_reset(st7789_handle_t *handle)
software reset
uint8_t st7789_set_partial_areas(st7789_handle_t *handle, uint16_t start_row, uint16_t end_row)
set partial areas
st7789_rgb_interface_color_format_t
st7789 rgb interface color format enumeration definition
st7789_gamma_curve_t
st7789 gamma curve enumeration definition
uint8_t st7789_set_display_control(st7789_handle_t *handle, st7789_bool_t brightness_control_block, st7789_bool_t display_dimming, st7789_bool_t backlight_control)
set display control
uint8_t st7789_fill_rect(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t color)
fill the rect
uint8_t st7789_set_cabc_minimum_brightness(st7789_handle_t *handle, uint8_t brightness)
set cabc minimum brightness
uint8_t st7789_tearing_effect_line_off(st7789_handle_t *handle)
tearing effect line off
uint8_t st7789_set_interface_pixel_format(st7789_handle_t *handle, st7789_rgb_interface_color_format_t rgb, st7789_control_interface_color_format_t control)
set interface pixel format
uint8_t st7789_idle_mode_off(st7789_handle_t *handle)
idle mode off
uint8_t st7789_idle_mode_on(st7789_handle_t *handle)
idle mode on
uint8_t st7789_deinit(st7789_handle_t *handle)
close the chip
uint8_t st7789_nop(st7789_handle_t *handle)
nop
uint8_t st7789_partial_display_mode_on(st7789_handle_t *handle)
partial display mode on
uint8_t st7789_set_brightness_control_and_color_enhancement(st7789_handle_t *handle, st7789_bool_t color_enhancement, st7789_color_enhancement_mode_t mode, st7789_color_enhancement_level_t level)
set brightness control and color enhancement
uint8_t st7789_info(st7789_info_t *info)
get chip's information
st7789_color_enhancement_level_t
st7789 color enhancement level enumeration definition
uint8_t st7789_draw_picture_16bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
uint8_t st7789_clear(st7789_handle_t *handle)
clear the display
uint8_t st7789_memory_continue_write(st7789_handle_t *handle, uint8_t *data, uint16_t len)
memory continue write
uint8_t st7789_display_off(st7789_handle_t *handle)
display off
st7789_bool_t
st7789 bool enumeration definition
uint8_t st7789_set_row_address(st7789_handle_t *handle, uint16_t start_address, uint16_t end_address)
set the row address
uint8_t st7789_memory_write(st7789_handle_t *handle, uint8_t *data, uint16_t len)
memory write
st7789_tearing_effect_t
st7789 tearing effect enumeration definition
struct st7789_info_s st7789_info_t
st7789 information structure definition
uint8_t st7789_sleep_in(st7789_handle_t *handle)
sleep in
uint8_t st7789_set_gamma(st7789_handle_t *handle, uint8_t gamma)
set gamma
st7789_control_interface_color_format_t
st7789 control interface color format enumeration definition
uint8_t st7789_set_display_brightness(st7789_handle_t *handle, uint8_t brightness)
set display brightness
uint8_t st7789_set_column(st7789_handle_t *handle, uint16_t column)
set column
uint8_t st7789_display_inversion_on(st7789_handle_t *handle)
display inversion on
st7789_order_t
st7789 order enumeration definition
uint8_t st7789_draw_point(st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
draw a point in the display
uint8_t st7789_sleep_out(st7789_handle_t *handle)
sleep out
uint8_t st7789_set_memory_data_access_control(st7789_handle_t *handle, uint8_t order)
set memory data access control
@ ST7789_COLOR_ENHANCEMENT_MODE_OFF
@ ST7789_COLOR_ENHANCEMENT_MODE_MOVING_IMAGE
@ ST7789_COLOR_ENHANCEMENT_MODE_USER_INTERFACE
@ ST7789_COLOR_ENHANCEMENT_MODE_STILL_PICTURE
@ ST7789_RGB_INTERFACE_COLOR_FORMAT_65K
@ ST7789_RGB_INTERFACE_COLOR_FORMAT_262K
@ ST7789_COLOR_ENHANCEMENT_LEVEL_HIGH
@ ST7789_COLOR_ENHANCEMENT_LEVEL_LOW
@ ST7789_COLOR_ENHANCEMENT_LEVEL_MEDIUM
@ ST7789_TEARING_EFFECT_V_BLANKING
@ ST7789_TEARING_EFFECT_V_BLANKING_AND_H_BLANKING
@ ST7789_CONTROL_INTERFACE_COLOR_FORMAT_12_BIT
@ ST7789_CONTROL_INTERFACE_COLOR_FORMAT_16_BIT
@ ST7789_CONTROL_INTERFACE_COLOR_FORMAT_18_BIT
@ ST7789_ORDER_LINE_TOP_TO_BOTTOM
@ ST7789_ORDER_PAGE_TOP_TO_BOTTOM
@ ST7789_ORDER_REFRESH_LEFT_TO_RIGHT
@ ST7789_ORDER_COLUMN_RIGHT_TO_LEFT
@ ST7789_ORDER_PAGE_COLUMN_NORMAL
@ ST7789_ORDER_LINE_BOTTOM_TO_TOP
@ ST7789_ORDER_COLUMN_LEFT_TO_RIGHT
@ ST7789_ORDER_REFRESH_RIGHT_TO_LEFT
@ ST7789_ORDER_PAGE_BOTTOM_TO_TOP
@ ST7789_ORDER_PAGE_COLUMN_REVERSE
uint8_t st7789_write_data(st7789_handle_t *handle, uint8_t data)
write the data
uint8_t st7789_write_cmd(st7789_handle_t *handle, uint8_t cmd)
write the command
st7789 handle structure definition
uint8_t(* spi_init)(void)
uint8_t(* cmd_data_gpio_init)(void)
void(* delay_ms)(uint32_t ms)
uint8_t(* cmd_data_gpio_deinit)(void)
uint8_t(* reset_gpio_deinit)(void)
void(* debug_print)(const char *const fmt,...)
uint8_t(* spi_deinit)(void)
uint8_t(* reset_gpio_init)(void)
uint8_t(* cmd_data_gpio_write)(uint8_t value)
uint8_t(* spi_write_cmd)(uint8_t *buf, uint16_t len)
uint8_t buf[ST7789_BUFFER_SIZE+8]
uint8_t(* reset_gpio_write)(uint8_t value)
st7789 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v