LibDriver ST7789
Loading...
Searching...
No Matches
st7789 basic driver function

st7789 basic driver modules More...

Collaboration diagram for st7789 basic driver function:

Data Structures

struct  st7789_handle_s
 st7789 handle structure definition More...
struct  st7789_info_s
 st7789 information structure definition More...

Macros

#define ST7789_BUFFER_SIZE   (4096)
 st7789 buffer size definition

Typedefs

typedef struct st7789_handle_s st7789_handle_t
 st7789 handle structure definition
typedef struct st7789_info_s st7789_info_t
 st7789 information structure definition

Enumerations

enum  st7789_bool_t { ST7789_BOOL_FALSE = 0x00 , ST7789_BOOL_TRUE = 0x01 }
 st7789 bool enumeration definition More...
enum  st7789_font_t { ST7789_FONT_12 = 0x0C , ST7789_FONT_16 = 0x10 , ST7789_FONT_24 = 0x18 }
 st7789 font size enumeration definition More...
enum  st7789_gamma_curve_t { ST7789_GAMMA_CURVE_1 = 0x1 , ST7789_GAMMA_CURVE_2 = 0x2 , ST7789_GAMMA_CURVE_3 = 0x4 , ST7789_GAMMA_CURVE_4 = 0x8 }
 st7789 gamma curve enumeration definition More...
enum  st7789_tearing_effect_t { ST7789_TEARING_EFFECT_V_BLANKING = 0x0 , ST7789_TEARING_EFFECT_V_BLANKING_AND_H_BLANKING = 0x1 }
 st7789 tearing effect enumeration definition More...
enum  st7789_order_t {
  ST7789_ORDER_PAGE_TOP_TO_BOTTOM = (0 << 7) , ST7789_ORDER_PAGE_BOTTOM_TO_TOP = (1 << 7) , ST7789_ORDER_COLUMN_LEFT_TO_RIGHT = (0 << 6) , ST7789_ORDER_COLUMN_RIGHT_TO_LEFT = (1 << 6) ,
  ST7789_ORDER_PAGE_COLUMN_NORMAL = (0 << 5) , ST7789_ORDER_PAGE_COLUMN_REVERSE = (1 << 5) , ST7789_ORDER_LINE_TOP_TO_BOTTOM = (0 << 4) , ST7789_ORDER_LINE_BOTTOM_TO_TOP = (1 << 4) ,
  ST7789_ORDER_COLOR_RGB = (0 << 3) , ST7789_ORDER_COLOR_BGR = (1 << 3) , ST7789_ORDER_REFRESH_LEFT_TO_RIGHT = (0 << 2) , ST7789_ORDER_REFRESH_RIGHT_TO_LEFT = (1 << 2)
}
 st7789 order enumeration definition More...
enum  st7789_rgb_interface_color_format_t { ST7789_RGB_INTERFACE_COLOR_FORMAT_65K = 0x5 , ST7789_RGB_INTERFACE_COLOR_FORMAT_262K = 0x6 }
 st7789 rgb interface color format enumeration definition More...
enum  st7789_control_interface_color_format_t { ST7789_CONTROL_INTERFACE_COLOR_FORMAT_12_BIT = 0x3 , ST7789_CONTROL_INTERFACE_COLOR_FORMAT_16_BIT = 0x5 , ST7789_CONTROL_INTERFACE_COLOR_FORMAT_18_BIT = 0x6 }
 st7789 control interface color format enumeration definition More...
enum  st7789_color_enhancement_mode_t { ST7789_COLOR_ENHANCEMENT_MODE_OFF = 0x0 , ST7789_COLOR_ENHANCEMENT_MODE_USER_INTERFACE = 0x1 , ST7789_COLOR_ENHANCEMENT_MODE_STILL_PICTURE = 0x2 , ST7789_COLOR_ENHANCEMENT_MODE_MOVING_IMAGE = 0x3 }
 st7789 color enhancement mode enumeration definition More...
enum  st7789_color_enhancement_level_t { ST7789_COLOR_ENHANCEMENT_LEVEL_LOW = 0x0 , ST7789_COLOR_ENHANCEMENT_LEVEL_MEDIUM = 0x1 , ST7789_COLOR_ENHANCEMENT_LEVEL_HIGH = 0x3 }
 st7789 color enhancement level enumeration definition More...

Functions

uint8_t st7789_info (st7789_info_t *info)
 get chip's information
uint8_t st7789_init (st7789_handle_t *handle)
 initialize the chip
uint8_t st7789_deinit (st7789_handle_t *handle)
 close the chip
uint8_t st7789_set_column (st7789_handle_t *handle, uint16_t column)
 set column
uint8_t st7789_set_row (st7789_handle_t *handle, uint16_t row)
 set row
uint8_t st7789_clear (st7789_handle_t *handle)
 clear the display
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_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_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_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
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_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_nop (st7789_handle_t *handle)
 nop
uint8_t st7789_software_reset (st7789_handle_t *handle)
 software reset
uint8_t st7789_sleep_in (st7789_handle_t *handle)
 sleep in
uint8_t st7789_sleep_out (st7789_handle_t *handle)
 sleep out
uint8_t st7789_partial_display_mode_on (st7789_handle_t *handle)
 partial display mode on
uint8_t st7789_normal_display_mode_on (st7789_handle_t *handle)
 normal display mode on
uint8_t st7789_display_inversion_off (st7789_handle_t *handle)
 display inversion off
uint8_t st7789_display_inversion_on (st7789_handle_t *handle)
 display inversion on
uint8_t st7789_set_gamma (st7789_handle_t *handle, uint8_t gamma)
 set gamma
uint8_t st7789_display_off (st7789_handle_t *handle)
 display off
uint8_t st7789_display_on (st7789_handle_t *handle)
 display on
uint8_t st7789_set_column_address (st7789_handle_t *handle, uint16_t start_address, uint16_t end_address)
 set the column address
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
uint8_t st7789_set_partial_areas (st7789_handle_t *handle, uint16_t start_row, uint16_t end_row)
 set partial areas
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_tearing_effect_line_off (st7789_handle_t *handle)
 tearing effect line off
uint8_t st7789_tearing_effect_line_on (st7789_handle_t *handle, st7789_tearing_effect_t effect)
 tearing effect line on
uint8_t st7789_set_memory_data_access_control (st7789_handle_t *handle, uint8_t order)
 set memory data access control
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_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_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_memory_continue_write (st7789_handle_t *handle, uint8_t *data, uint16_t len)
 memory continue write
uint8_t st7789_set_tear_scanline (st7789_handle_t *handle, uint16_t l)
 set tear scanline
uint8_t st7789_set_display_brightness (st7789_handle_t *handle, uint8_t brightness)
 set display brightness
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_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_set_cabc_minimum_brightness (st7789_handle_t *handle, uint8_t brightness)
 set cabc minimum brightness

Detailed Description

st7789 basic driver modules

Macro Definition Documentation

◆ ST7789_BUFFER_SIZE

#define ST7789_BUFFER_SIZE   (4096)

st7789 buffer size definition

4096

Definition at line 63 of file driver_st7789.h.

Typedef Documentation

◆ st7789_handle_t

st7789 handle structure definition

◆ st7789_info_t

typedef struct st7789_info_s st7789_info_t

st7789 information structure definition

Enumeration Type Documentation

◆ st7789_bool_t

st7789 bool enumeration definition

Enumerator
ST7789_BOOL_FALSE 

false

ST7789_BOOL_TRUE 

true

Definition at line 69 of file driver_st7789.h.

◆ st7789_color_enhancement_level_t

st7789 color enhancement level enumeration definition

Enumerator
ST7789_COLOR_ENHANCEMENT_LEVEL_LOW 

low enhancement

ST7789_COLOR_ENHANCEMENT_LEVEL_MEDIUM 

medium enhancement

ST7789_COLOR_ENHANCEMENT_LEVEL_HIGH 

high enhancement

Definition at line 157 of file driver_st7789.h.

◆ st7789_color_enhancement_mode_t

st7789 color enhancement mode enumeration definition

Enumerator
ST7789_COLOR_ENHANCEMENT_MODE_OFF 

off

ST7789_COLOR_ENHANCEMENT_MODE_USER_INTERFACE 

user interface mode

ST7789_COLOR_ENHANCEMENT_MODE_STILL_PICTURE 

still picture

ST7789_COLOR_ENHANCEMENT_MODE_MOVING_IMAGE 

moving image

Definition at line 146 of file driver_st7789.h.

◆ st7789_control_interface_color_format_t

st7789 control interface color format enumeration definition

Enumerator
ST7789_CONTROL_INTERFACE_COLOR_FORMAT_12_BIT 

12bit/pixel

ST7789_CONTROL_INTERFACE_COLOR_FORMAT_16_BIT 

16bit/pixel

ST7789_CONTROL_INTERFACE_COLOR_FORMAT_18_BIT 

18bit/pixel

Definition at line 136 of file driver_st7789.h.

◆ st7789_font_t

st7789 font size enumeration definition

Enumerator
ST7789_FONT_12 

font 12

ST7789_FONT_16 

font 16

ST7789_FONT_24 

font 24

Definition at line 78 of file driver_st7789.h.

◆ st7789_gamma_curve_t

st7789 gamma curve enumeration definition

Enumerator
ST7789_GAMMA_CURVE_1 

g2.2

ST7789_GAMMA_CURVE_2 

g1.8

ST7789_GAMMA_CURVE_3 

g2.5

ST7789_GAMMA_CURVE_4 

g1.0

Definition at line 88 of file driver_st7789.h.

◆ st7789_order_t

st7789 order enumeration definition

Enumerator
ST7789_ORDER_PAGE_TOP_TO_BOTTOM 

top to bottom

ST7789_ORDER_PAGE_BOTTOM_TO_TOP 

bottom to top

ST7789_ORDER_COLUMN_LEFT_TO_RIGHT 

left to right

ST7789_ORDER_COLUMN_RIGHT_TO_LEFT 

right to left

ST7789_ORDER_PAGE_COLUMN_NORMAL 

normal mode

ST7789_ORDER_PAGE_COLUMN_REVERSE 

reverse mode

ST7789_ORDER_LINE_TOP_TO_BOTTOM 

lcd refresh top to bottom

ST7789_ORDER_LINE_BOTTOM_TO_TOP 

lcd refresh bottom to top

ST7789_ORDER_COLOR_RGB 

rgb

ST7789_ORDER_COLOR_BGR 

bgr

ST7789_ORDER_REFRESH_LEFT_TO_RIGHT 

lcd refresh left to right

ST7789_ORDER_REFRESH_RIGHT_TO_LEFT 

lcd refresh right to left

Definition at line 108 of file driver_st7789.h.

◆ st7789_rgb_interface_color_format_t

st7789 rgb interface color format enumeration definition

Enumerator
ST7789_RGB_INTERFACE_COLOR_FORMAT_65K 

65k of rgb interface

ST7789_RGB_INTERFACE_COLOR_FORMAT_262K 

262k of rgb interface

Definition at line 127 of file driver_st7789.h.

◆ st7789_tearing_effect_t

st7789 tearing effect enumeration definition

Enumerator
ST7789_TEARING_EFFECT_V_BLANKING 

v-blanking

ST7789_TEARING_EFFECT_V_BLANKING_AND_H_BLANKING 

v-blanking and h-blanking

Definition at line 99 of file driver_st7789.h.

Function Documentation

◆ st7789_clear()

uint8_t st7789_clear ( st7789_handle_t * handle)

clear the display

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 clear failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 format is invalid
Note
none

Definition at line 3450 of file driver_st7789.c.

◆ st7789_deinit()

uint8_t st7789_deinit ( st7789_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 spi deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
  • 5 reset gpio deinit failed
  • 6 command && data deinit failed
Note
none

Definition at line 3333 of file driver_st7789.c.

◆ st7789_display_inversion_off()

uint8_t st7789_display_inversion_off ( st7789_handle_t * handle)

display inversion off

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 display inversion off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 381 of file driver_st7789.c.

◆ st7789_display_inversion_on()

uint8_t st7789_display_inversion_on ( st7789_handle_t * handle)

display inversion on

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 display inversion on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 412 of file driver_st7789.c.

◆ st7789_display_off()

uint8_t st7789_display_off ( st7789_handle_t * handle)

display off

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 display off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 481 of file driver_st7789.c.

◆ st7789_display_on()

uint8_t st7789_display_on ( st7789_handle_t * handle)

display on

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 display on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 512 of file driver_st7789.c.

◆ st7789_draw_picture_12bits()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]leftleft coordinate x
[in]toptop coordinate y
[in]rightright coordinate x
[in]bottombottom coordinate y
[in]*imagepointer to an image buffer
Returns
status code
  • 0 success
  • 1 draw picture 12bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over column
  • 5 right is over column
  • 6 left >= right
  • 7 top is over row
  • 8 bottom is over row
  • 9 top >= bottom
Note
left <= column && right <= column && left < right && top <= row && bottom <= row && top < bottom

Definition at line 3837 of file driver_st7789.c.

◆ st7789_draw_picture_16bits()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]leftleft coordinate x
[in]toptop coordinate y
[in]rightright coordinate x
[in]bottombottom coordinate y
[in]*imagepointer to an image buffer
Returns
status code
  • 0 success
  • 1 draw picture 16bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over column
  • 5 right is over column
  • 6 left >= right
  • 7 top is over row
  • 8 bottom is over row
  • 9 top >= bottom
Note
left <= column && right <= column && left < right && top <= row && bottom <= row && top < bottom

Definition at line 4018 of file driver_st7789.c.

◆ st7789_draw_picture_18bits()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]leftleft coordinate x
[in]toptop coordinate y
[in]rightright coordinate x
[in]bottombottom coordinate y
[in]*imagepointer to an image buffer
Returns
status code
  • 0 success
  • 1 draw picture 18bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over column
  • 5 right is over column
  • 6 left >= right
  • 7 top is over row
  • 8 bottom is over row
  • 9 top >= bottom
Note
left <= column && right <= column && left < right && top <= row && bottom <= row && top < bottom

Definition at line 4191 of file driver_st7789.c.

◆ st7789_draw_point()

uint8_t st7789_draw_point ( st7789_handle_t * handle,
uint16_t x,
uint16_t y,
uint32_t color )

draw a point in the display

Parameters
[in]*handlepointer to an st7789 handle structure
[in]xcoordinate x
[in]ycoordinate y
[in]colorpoint color
Returns
status code
  • 0 success
  • 1 draw point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x is over column
  • 5 y is over row
Note
x < column && y < row

Definition at line 4583 of file driver_st7789.c.

◆ st7789_fill_rect()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]leftleft coordinate x
[in]toptop coordinate y
[in]rightright coordinate x
[in]bottombottom coordinate y
[in]colordisplay color
Returns
status code
  • 0 success
  • 1 fill rect failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over column
  • 5 right is over column
  • 6 left >= right
  • 7 top is over row
  • 8 bottom is over row
  • 9 top >= bottom
Note
left <= column && right <= column && left < right && top <= row && bottom <= row && top < bottom

Definition at line 3615 of file driver_st7789.c.

◆ st7789_idle_mode_off()

uint8_t st7789_idle_mode_off ( st7789_handle_t * handle)

idle mode off

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 idle mode off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 950 of file driver_st7789.c.

◆ st7789_idle_mode_on()

uint8_t st7789_idle_mode_on ( st7789_handle_t * handle)

idle mode on

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 idle mode on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 981 of file driver_st7789.c.

◆ st7789_info()

uint8_t st7789_info ( st7789_info_t * info)

get chip's information

Parameters
[out]*infopointer to an st7789 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 4667 of file driver_st7789.c.

◆ st7789_init()

uint8_t st7789_init ( st7789_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 reset failed
  • 5 command && data init failed
Note
none

Definition at line 3205 of file driver_st7789.c.

◆ st7789_memory_continue_write()

uint8_t st7789_memory_continue_write ( st7789_handle_t * handle,
uint8_t * data,
uint16_t len )

memory continue write

Parameters
[in]*handlepointer to an st7789 handle structure
[in]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 memory continue write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1059 of file driver_st7789.c.

◆ st7789_memory_write()

uint8_t st7789_memory_write ( st7789_handle_t * handle,
uint8_t * data,
uint16_t len )

memory write

Parameters
[in]*handlepointer to an st7789 handle structure
[in]*datapointer to a data buffer
[in]lendata length
Returns
status code
  • 0 success
  • 1 memory write failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 663 of file driver_st7789.c.

◆ st7789_nop()

uint8_t st7789_nop ( st7789_handle_t * handle)

nop

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 nop failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 193 of file driver_st7789.c.

◆ st7789_normal_display_mode_on()

uint8_t st7789_normal_display_mode_on ( st7789_handle_t * handle)

normal display mode on

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 normal display mode on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 350 of file driver_st7789.c.

◆ st7789_partial_display_mode_on()

uint8_t st7789_partial_display_mode_on ( st7789_handle_t * handle)

partial display mode on

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 partial display mode on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 319 of file driver_st7789.c.

◆ st7789_set_brightness_control_and_color_enhancement()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]color_enhancementbool value
[in]modecolor enhancement mode
[in]levelcolor enhancement level
Returns
status code
  • 0 success
  • 1 set brightness control and color enhancement failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1226 of file driver_st7789.c.

◆ st7789_set_cabc_minimum_brightness()

uint8_t st7789_set_cabc_minimum_brightness ( st7789_handle_t * handle,
uint8_t brightness )

set cabc minimum brightness

Parameters
[in]*handlepointer to an st7789 handle structure
[in]brightnessdisplay brightness
Returns
status code
  • 0 success
  • 1 set cabc minimum brightness failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1269 of file driver_st7789.c.

◆ st7789_set_column()

uint8_t st7789_set_column ( st7789_handle_t * handle,
uint16_t column )

set column

Parameters
[in]*handlepointer to an st7789 handle structure
[in]columnscreen column
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 column > 240
Note
none

Definition at line 3384 of file driver_st7789.c.

◆ st7789_set_column_address()

uint8_t st7789_set_column_address ( st7789_handle_t * handle,
uint16_t start_address,
uint16_t end_address )

set the column address

Parameters
[in]*handlepointer to an st7789 handle structure
[in]start_addressstart address
[in]end_addressend address
Returns
status code
  • 0 success
  • 1 set column address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 address is invalid
  • 5 start_address >= end_address
Note
start_address <= 319 && end_address <= 319 && start_address >= start_address

Definition at line 547 of file driver_st7789.c.

◆ st7789_set_display_brightness()

uint8_t st7789_set_display_brightness ( st7789_handle_t * handle,
uint8_t brightness )

set display brightness

Parameters
[in]*handlepointer to an st7789 handle structure
[in]brightnessdisplay brightness
Returns
status code
  • 0 success
  • 1 set display brightness failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1139 of file driver_st7789.c.

◆ st7789_set_display_control()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]brightness_control_blockbool value
[in]display_dimmingbool value
[in]backlight_controlbool value
Returns
status code
  • 0 success
  • 1 set display control failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1180 of file driver_st7789.c.

◆ st7789_set_gamma()

uint8_t st7789_set_gamma ( st7789_handle_t * handle,
uint8_t gamma )

set gamma

Parameters
[in]*handlepointer to an st7789 handle structure
[in]gammaset gamma
Returns
status code
  • 0 success
  • 1 set gamma failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 444 of file driver_st7789.c.

◆ st7789_set_interface_pixel_format()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]rgbrgb interface color format
[in]controlcontrol interface color format
Returns
status code
  • 0 success
  • 1 set interface pixel format failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1014 of file driver_st7789.c.

◆ st7789_set_memory_data_access_control()

uint8_t st7789_set_memory_data_access_control ( st7789_handle_t * handle,
uint8_t order )

set memory data access control

Parameters
[in]*handlepointer to an st7789 handle structure
[in]ordermemory data access control order
Returns
status code
  • 0 success
  • 1 set memory data access control failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 864 of file driver_st7789.c.

◆ st7789_set_partial_areas()

uint8_t st7789_set_partial_areas ( st7789_handle_t * handle,
uint16_t start_row,
uint16_t end_row )

set partial areas

Parameters
[in]*handlepointer to an st7789 handle structure
[in]start_rowstart row
[in]end_rowend row
Returns
status code
  • 0 success
  • 1 set partial areas failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 702 of file driver_st7789.c.

◆ st7789_set_row()

uint8_t st7789_set_row ( st7789_handle_t * handle,
uint16_t row )

set row

Parameters
[in]*handlepointer to an st7789 handle structure
[in]rowscreen row
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 row > 320
Note
none

Definition at line 3417 of file driver_st7789.c.

◆ st7789_set_row_address()

uint8_t st7789_set_row_address ( st7789_handle_t * handle,
uint16_t start_address,
uint16_t end_address )

set the row address

Parameters
[in]*handlepointer to an st7789 handle structure
[in]start_addressstart address
[in]end_addressend address
Returns
status code
  • 0 success
  • 1 set row address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 address is invalid
  • 5 start_address >= end_address
Note
start_address <= 319 && end_address <= 319 && start_address >= start_address

Definition at line 606 of file driver_st7789.c.

◆ st7789_set_tear_scanline()

uint8_t st7789_set_tear_scanline ( st7789_handle_t * handle,
uint16_t l )

set tear scanline

Parameters
[in]*handlepointer to an st7789 handle structure
[in]ltear line
Returns
status code
  • 0 success
  • 1 set tear scanline failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1097 of file driver_st7789.c.

◆ st7789_set_vertical_scroll_start_address()

uint8_t st7789_set_vertical_scroll_start_address ( st7789_handle_t * handle,
uint16_t start_address )

set the vertical scroll start address

Parameters
[in]*handlepointer to an st7789 handle structure
[in]start_addressstart address
Returns
status code
  • 0 success
  • 1 set vertical scroll start address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 address is invalid
Note
none

Definition at line 903 of file driver_st7789.c.

◆ st7789_set_vertical_scrolling()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]top_fixed_areatop fixed area line
[in]scrolling_areascrolling area line
[in]bottom_fixed_areabottom fixed area line
Returns
status code
  • 0 success
  • 1 set vertical scrolling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 748 of file driver_st7789.c.

◆ st7789_sleep_in()

uint8_t st7789_sleep_in ( st7789_handle_t * handle)

sleep in

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 sleep in failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 256 of file driver_st7789.c.

◆ st7789_sleep_out()

uint8_t st7789_sleep_out ( st7789_handle_t * handle)

sleep out

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 sleep out failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 287 of file driver_st7789.c.

◆ st7789_software_reset()

uint8_t st7789_software_reset ( st7789_handle_t * handle)

software reset

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 software reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 224 of file driver_st7789.c.

◆ st7789_tearing_effect_line_off()

uint8_t st7789_tearing_effect_line_off ( st7789_handle_t * handle)

tearing effect line off

Parameters
[in]*handlepointer to an st7789 handle structure
Returns
status code
  • 0 success
  • 1 tearing effect line off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 794 of file driver_st7789.c.

◆ st7789_tearing_effect_line_on()

uint8_t st7789_tearing_effect_line_on ( st7789_handle_t * handle,
st7789_tearing_effect_t effect )

tearing effect line on

Parameters
[in]*handlepointer to an st7789 handle structure
[in]effecttearing effect
Returns
status code
  • 0 success
  • 1 tearing effect line on failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 826 of file driver_st7789.c.

◆ st7789_write_string()

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

Parameters
[in]*handlepointer to an st7789 handle structure
[in]xcoordinate x
[in]ycoordinate y
[in]*strpointer to a write string address
[in]lenlength of the string
[in]colordisplay color
[in]fontstring font
Returns
status code
  • 0 success
  • 1 draw point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
x < column && y < row

Definition at line 4528 of file driver_st7789.c.