LibDriver SSD1351  2.0.0
SSD1351 full function driver
ssd1351 base driver function

ssd1351 base driver modules More...

Data Structures

struct  ssd1351_handle_s
 ssd1351 handle structure definition More...
 
struct  ssd1351_info_s
 ssd1351 information structure definition More...
 

Macros

#define SSD1351_AUTO_COLOR_CONVERT   0
 ssd1351 auto color convert definition More...
 

Typedefs

typedef struct ssd1351_handle_s ssd1351_handle_t
 ssd1351 handle structure definition More...
 
typedef struct ssd1351_info_s ssd1351_info_t
 ssd1351 information structure definition More...
 

Enumerations

enum  ssd1351_color_depth_t { SSD1351_COLOR_DEPTH_256 = 0x00 , SSD1351_COLOR_DEPTH_65K = 0x01 , SSD1351_COLOR_DEPTH_262K_1ST = 0x02 , SSD1351_COLOR_DEPTH_262K_2ND = 0x03 }
 ssd1351 color depth enumeration definition More...
 
enum  ssd1351_address_increment_t { SSD1351_ADDRESS_INCREMENT_HORIZONTAL = 0x00 , SSD1351_ADDRESS_INCREMENT_VERTICAL = 0x01 }
 ssd1351 address increment enumeration definition More...
 
enum  ssd1351_seg0_mapped_t { SSD1351_SEG0_ADDRESS_0 = 0x00 , SSD1351_SEG0_ADDRESS_127 = 0x01 }
 ssd1351 seg0 mapped enumeration definition More...
 
enum  ssd1351_color_sequence_t { SSD1351_COLOR_SEQUENCE_A_B_C = 0x00 , SSD1351_COLOR_SEQUENCE_C_B_A = 0x01 }
 ssd1351 color sequence enumeration definition More...
 
enum  ssd1351_scan_mode_t { SSD1351_SCAN_MODE_COM_0_COM_N_1 = 0x00 , SSD1351_SCAN_MODE_COM_N_1_COM_0 = 0x01 }
 ssd1351 scan mode enumeration definition More...
 
enum  ssd1351_bool_t { SSD1351_BOOL_FALSE = 0x00 , SSD1351_BOOL_TRUE = 0x01 }
 ssd1351 bool enumeration definition More...
 
enum  ssd1351_display_mode_t { SSD1351_DISPLAY_MODE_ALL_OFF = 0xA4 , SSD1351_DISPLAY_MODE_ALL_ON = 0xA5 , SSD1351_DISPLAY_MODE_NORMAL = 0xA6 , SSD1351_DISPLAY_MODE_INVERSE = 0xA7 }
 ssd1351 display mode enumeration definition More...
 
enum  ssd1351_select_vdd_t { SSD1351_SELECT_VDD_EXTERNAL = 0x00 , SSD1351_SELECT_VDD_INTERNAL = 0x01 }
 ssd1351 select vdd enumeration definition More...
 
enum  ssd1351_select_parallel_bits_t { SSD1351_SELECT_PARALLEL_8_BIT = 0x00 , SSD1351_SELECT_PARALLER_16_BIT = 0x01 , SSD1351_SELECT_PARALLER_18_BIT = 0x03 }
 ssd1351 select parallel enumeration definition More...
 
enum  ssd1351_segment_low_voltage_t { SSD1351_SEGMENT_LOW_VOLTAGE_EXTERNAL_VSL = 0x00 , SSD1351_SEGMENT_LOW_VOLTAGE_INTERNAL_VSL = 0x02 }
 ssd1351 segment low voltage enumeration definition More...
 
enum  ssd1351_gpio_pin_t { SSD1351_GPIO_PIN_INPUT_DISABLED = 0x00 , SSD1351_GPIO_PIN_INPUT_ENABLED = 0x01 , SSD1351_GPIO_PIN_OUTPUT_LOW = 0x02 , SSD1351_GPIO_PIN_OUTPUT_HIGH = 0x03 }
 ssd1351 gpio pin enumeration definition More...
 
enum  ssd1351_command_t { SSD1351_COMMAND_UNLOCK_OLED_DRIVER_IC = 0x12 , SSD1351_COMMAND_LOCK_OLED_DRIVER_IC = 0x16 , SSD1351_COMMAND_A2_B1_B3_BB_BE_INACCESSIBLE = 0xB0 , SSD1351_COMMAND_A2_B1_B3_BB_BE_ACCESSIBLE = 0xB1 }
 ssd1351 command enumeration definition More...
 
enum  ssd1351_scroll_mode_t { SSD1351_SCROLL_MODE_TEST = 0x00 , SSD1351_SCROLL_MODE_NORMAL = 0x01 , SSD1351_SCROLL_MODE_SLOW = 0x01 , SSD1351_SCROLL_MODE_SLOWEST = 0x03 }
 ssd1351 scroll mode enumeration definition More...
 
enum  ssd1351_font_t { SSD1351_FONT_12 = 0x0C , SSD1351_FONT_16 = 0x10 , SSD1351_FONT_24 = 0x18 }
 ssd1351 font size enumeration definition More...
 

Functions

uint8_t ssd1351_info (ssd1351_info_t *info)
 get chip's information More...
 
uint8_t ssd1351_init (ssd1351_handle_t *handle)
 initialize the chip More...
 
uint8_t ssd1351_deinit (ssd1351_handle_t *handle)
 close the chip More...
 
uint8_t ssd1351_clear (ssd1351_handle_t *handle)
 clear the display More...
 
uint8_t ssd1351_draw_point (ssd1351_handle_t *handle, uint8_t x, uint8_t y, uint32_t color)
 draw a point in the display More...
 
uint8_t ssd1351_write_string (ssd1351_handle_t *handle, uint8_t x, uint8_t y, char *str, uint16_t len, uint32_t color, ssd1351_font_t font)
 write a string in the display More...
 
uint8_t ssd1351_fill_rect (ssd1351_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t color)
 fill the rect More...
 
uint8_t ssd1351_draw_picture (ssd1351_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t *image)
 draw a picture More...
 
uint8_t ssd1351_draw_picture_16bits (ssd1351_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint16_t *image)
 draw a 16 bits picture More...
 
uint8_t ssd1351_set_column_address (ssd1351_handle_t *handle, uint8_t start_address, uint8_t end_address)
 set the display column address More...
 
uint8_t ssd1351_set_row_address (ssd1351_handle_t *handle, uint8_t start_address, uint8_t end_address)
 set the row address More...
 
uint8_t ssd1351_write_ram (ssd1351_handle_t *handle)
 sent the write ram command More...
 
uint8_t ssd1351_read_ram (ssd1351_handle_t *handle)
 sent the read ram command More...
 
uint8_t ssd1351_set_color_depth (ssd1351_handle_t *handle, ssd1351_color_depth_t color_depth)
 set the display color depth More...
 
uint8_t ssd1351_set_address_increment (ssd1351_handle_t *handle, ssd1351_address_increment_t increment)
 set the address increment More...
 
uint8_t ssd1351_set_seg0_map (ssd1351_handle_t *handle, ssd1351_seg0_mapped_t seg0_map)
 set the seg0 map More...
 
uint8_t ssd1351_set_color_sequence (ssd1351_handle_t *handle, ssd1351_color_sequence_t color_sequence)
 set the color sequence More...
 
uint8_t ssd1351_set_scan_mode (ssd1351_handle_t *handle, ssd1351_scan_mode_t mode)
 set the scan mode More...
 
uint8_t ssd1351_set_com_split_odd_even (ssd1351_handle_t *handle, ssd1351_bool_t enable)
 set the com split odd or even More...
 
uint8_t ssd1351_set_display_start_line (ssd1351_handle_t *handle, uint8_t l)
 set the display start line More...
 
uint8_t ssd1351_set_display_offset (ssd1351_handle_t *handle, uint8_t offset)
 set the display offset More...
 
uint8_t ssd1351_set_display_mode (ssd1351_handle_t *handle, ssd1351_display_mode_t mode)
 set the display mode More...
 
uint8_t ssd1351_set_select_vdd (ssd1351_handle_t *handle, ssd1351_select_vdd_t vdd)
 set the select vdd More...
 
uint8_t ssd1351_set_parallel_bits (ssd1351_handle_t *handle, ssd1351_select_parallel_bits_t parallel_bits)
 set the interface parallel bits More...
 
uint8_t ssd1351_set_sleep_mode (ssd1351_handle_t *handle, ssd1351_bool_t enable)
 set the sleep mode More...
 
uint8_t ssd1351_set_phase_period (ssd1351_handle_t *handle, uint8_t phase1_period, uint8_t phase2_period)
 set the phase period More...
 
uint8_t ssd1351_set_front_clock_oscillator_frequency (ssd1351_handle_t *handle, uint8_t d, uint8_t frequency)
 set the front clock oscillator frequency More...
 
uint8_t ssd1351_set_segment_low_voltage (ssd1351_handle_t *handle, ssd1351_segment_low_voltage_t segment)
 set the segment low voltage More...
 
uint8_t ssd1351_set_gpio (ssd1351_handle_t *handle, ssd1351_gpio_pin_t gpio0, ssd1351_gpio_pin_t gpio1)
 set the gpio pin More...
 
uint8_t ssd1351_set_second_pre_charge_period (ssd1351_handle_t *handle, uint8_t period)
 set the second pre charge period More...
 
uint8_t ssd1351_set_gray_scale_pulse_width (ssd1351_handle_t *handle, uint8_t gamma[63])
 set the gray scale pulse width More...
 
uint8_t ssd1351_set_use_built_in_linear_lut (ssd1351_handle_t *handle)
 use built in linear lut More...
 
uint8_t ssd1351_set_pre_charge_voltage (ssd1351_handle_t *handle, uint8_t voltage_level)
 set the pre charge voltage More...
 
uint8_t ssd1351_set_vcomh_voltage (ssd1351_handle_t *handle, uint8_t voltage_level)
 set the vcomh voltage More...
 
uint8_t ssd1351_set_contrast (ssd1351_handle_t *handle, uint8_t a, uint8_t b, uint8_t c)
 set the display contrast More...
 
uint8_t ssd1351_set_master_contrast_current (ssd1351_handle_t *handle, uint8_t current)
 set the master contrast current More...
 
uint8_t ssd1351_set_mux_ratio (ssd1351_handle_t *handle, uint8_t ratio)
 set the mux ratio More...
 
uint8_t ssd1351_set_command (ssd1351_handle_t *handle, ssd1351_command_t command)
 set the command More...
 
uint8_t ssd1351_set_scroll (ssd1351_handle_t *handle, int8_t scroll, uint8_t start_row, uint8_t row_len, ssd1351_scroll_mode_t mode)
 set the scroll More...
 
uint8_t ssd1351_start_moving (ssd1351_handle_t *handle)
 start the display moving More...
 
uint8_t ssd1351_stop_moving (ssd1351_handle_t *handle)
 stop the display moving More...
 

Detailed Description

ssd1351 base driver modules

Macro Definition Documentation

◆ SSD1351_AUTO_COLOR_CONVERT

#define SSD1351_AUTO_COLOR_CONVERT   0

ssd1351 auto color convert definition

not auto convert

Definition at line 65 of file driver_ssd1351.h.

Typedef Documentation

◆ ssd1351_handle_t

ssd1351 handle structure definition

◆ ssd1351_info_t

ssd1351 information structure definition

Enumeration Type Documentation

◆ ssd1351_address_increment_t

ssd1351 address increment enumeration definition

Enumerator
SSD1351_ADDRESS_INCREMENT_HORIZONTAL 

horizontal increment

SSD1351_ADDRESS_INCREMENT_VERTICAL 

vertical increment

Definition at line 82 of file driver_ssd1351.h.

◆ ssd1351_bool_t

ssd1351 bool enumeration definition

Enumerator
SSD1351_BOOL_FALSE 

false

SSD1351_BOOL_TRUE 

true

Definition at line 118 of file driver_ssd1351.h.

◆ ssd1351_color_depth_t

ssd1351 color depth enumeration definition

Enumerator
SSD1351_COLOR_DEPTH_256 

256 color depth

SSD1351_COLOR_DEPTH_65K 

65K color depth

SSD1351_COLOR_DEPTH_262K_1ST 

262K 1ST color depth

SSD1351_COLOR_DEPTH_262K_2ND 

262K 2ND color depth

Definition at line 71 of file driver_ssd1351.h.

◆ ssd1351_color_sequence_t

ssd1351 color sequence enumeration definition

Enumerator
SSD1351_COLOR_SEQUENCE_A_B_C 

color sequence a b c

SSD1351_COLOR_SEQUENCE_C_B_A 

color sequence c b a

Definition at line 100 of file driver_ssd1351.h.

◆ ssd1351_command_t

ssd1351 command enumeration definition

Enumerator
SSD1351_COMMAND_UNLOCK_OLED_DRIVER_IC 

unlock the oled driver ic

SSD1351_COMMAND_LOCK_OLED_DRIVER_IC 

lock the oled driver ic

SSD1351_COMMAND_A2_B1_B3_BB_BE_INACCESSIBLE 

a2 b1 b3 bb be inaccessible

SSD1351_COMMAND_A2_B1_B3_BB_BE_ACCESSIBLE 

a2 b1 b3 bb be accessible

Definition at line 177 of file driver_ssd1351.h.

◆ ssd1351_display_mode_t

ssd1351 display mode enumeration definition

Enumerator
SSD1351_DISPLAY_MODE_ALL_OFF 

all off mode

SSD1351_DISPLAY_MODE_ALL_ON 

all on mode

SSD1351_DISPLAY_MODE_NORMAL 

normal mode

SSD1351_DISPLAY_MODE_INVERSE 

inverse mode

Definition at line 127 of file driver_ssd1351.h.

◆ ssd1351_font_t

ssd1351 font size enumeration definition

Enumerator
SSD1351_FONT_12 

font 12

SSD1351_FONT_16 

font 16

SSD1351_FONT_24 

font 24

Definition at line 199 of file driver_ssd1351.h.

◆ ssd1351_gpio_pin_t

ssd1351 gpio pin enumeration definition

Enumerator
SSD1351_GPIO_PIN_INPUT_DISABLED 

gpio pin input disabled

SSD1351_GPIO_PIN_INPUT_ENABLED 

gpio pin input enabled

SSD1351_GPIO_PIN_OUTPUT_LOW 

gpio pin output low

SSD1351_GPIO_PIN_OUTPUT_HIGH 

gpio pin output high

Definition at line 166 of file driver_ssd1351.h.

◆ ssd1351_scan_mode_t

ssd1351 scan mode enumeration definition

Enumerator
SSD1351_SCAN_MODE_COM_0_COM_N_1 

scan mode com0 - com n-1

SSD1351_SCAN_MODE_COM_N_1_COM_0 

scan mode com n-1 com 0

Definition at line 109 of file driver_ssd1351.h.

◆ ssd1351_scroll_mode_t

ssd1351 scroll mode enumeration definition

Enumerator
SSD1351_SCROLL_MODE_TEST 

test scroll mode

SSD1351_SCROLL_MODE_NORMAL 

normal scroll mode

SSD1351_SCROLL_MODE_SLOW 

slow scroll mode

SSD1351_SCROLL_MODE_SLOWEST 

slowest scroll mode

Definition at line 188 of file driver_ssd1351.h.

◆ ssd1351_seg0_mapped_t

ssd1351 seg0 mapped enumeration definition

Enumerator
SSD1351_SEG0_ADDRESS_0 

seg0 mapped to address 0

SSD1351_SEG0_ADDRESS_127 

seg0 mapped to address 127

Definition at line 91 of file driver_ssd1351.h.

◆ ssd1351_segment_low_voltage_t

ssd1351 segment low voltage enumeration definition

Enumerator
SSD1351_SEGMENT_LOW_VOLTAGE_EXTERNAL_VSL 

segment low voltage external vsl

SSD1351_SEGMENT_LOW_VOLTAGE_INTERNAL_VSL 

segment low voltage internal vsl

Definition at line 157 of file driver_ssd1351.h.

◆ ssd1351_select_parallel_bits_t

ssd1351 select parallel enumeration definition

Enumerator
SSD1351_SELECT_PARALLEL_8_BIT 

select parallel 8 bit

SSD1351_SELECT_PARALLER_16_BIT 

select parallel 16 bit

SSD1351_SELECT_PARALLER_18_BIT 

select parallel 18 bit

Definition at line 147 of file driver_ssd1351.h.

◆ ssd1351_select_vdd_t

ssd1351 select vdd enumeration definition

Enumerator
SSD1351_SELECT_VDD_EXTERNAL 

select external vdd

SSD1351_SELECT_VDD_INTERNAL 

select internal vdd

Definition at line 138 of file driver_ssd1351.h.

Function Documentation

◆ ssd1351_clear()

uint8_t ssd1351_clear ( ssd1351_handle_t handle)

clear the display

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

Definition at line 1499 of file driver_ssd1351.c.

◆ ssd1351_deinit()

uint8_t ssd1351_deinit ( ssd1351_handle_t handle)

close the chip

Parameters
[in]*handlepoints to an ssd1351 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 3199 of file driver_ssd1351.c.

◆ ssd1351_draw_picture()

uint8_t ssd1351_draw_picture ( ssd1351_handle_t handle,
uint8_t  left,
uint8_t  top,
uint8_t  right,
uint8_t  bottom,
uint32_t *  image 
)

draw a picture

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]leftis the left coordinate x
[in]topis the top coordinate y
[in]rightis the right coordinate x
[in]bottomis the bottom coordinate y
[in]*imagepoints to a display image buffer
Returns
status code
  • 0 success
  • 1 draw picture failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over 127
  • 5 right is over 127
  • 6 left >= right
  • 7 top is over 127
  • 8 bottom is over 127
  • 9 top >= bottom
Note
left <= 127 && right <= 127 && left < right && top <= 127 && bottom <= 127 && top < bottom

Definition at line 2829 of file driver_ssd1351.c.

◆ ssd1351_draw_picture_16bits()

uint8_t ssd1351_draw_picture_16bits ( ssd1351_handle_t handle,
uint8_t  left,
uint8_t  top,
uint8_t  right,
uint8_t  bottom,
uint16_t *  image 
)

draw a 16 bits picture

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]leftis the left coordinate x
[in]topis the top coordinate y
[in]rightis the right coordinate x
[in]bottomis the bottom coordinate y
[in]*imagepoints to a display image buffer
Returns
status code
  • 0 success
  • 1 draw picture failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over 127
  • 5 right is over 127
  • 6 left >= right
  • 7 top is over 127
  • 8 bottom is over 127
  • 9 top >= bottom
Note
left <= 127 && right <= 127 && left < right && top <= 127 && bottom <= 127 && top < bottom

Definition at line 2900 of file driver_ssd1351.c.

◆ ssd1351_draw_point()

uint8_t ssd1351_draw_point ( ssd1351_handle_t handle,
uint8_t  x,
uint8_t  y,
uint32_t  color 
)

draw a point in the display

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]xis the coordinate x
[in]yis the coordinate y
[in]coloris the point color
Returns
status code
  • 0 success
  • 1 draw point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x is over 127
  • 5 y is over 127
Note
x <= 127 && y <= 127

Definition at line 2654 of file driver_ssd1351.c.

◆ ssd1351_fill_rect()

uint8_t ssd1351_fill_rect ( ssd1351_handle_t handle,
uint8_t  left,
uint8_t  top,
uint8_t  right,
uint8_t  bottom,
uint32_t  color 
)

fill the rect

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]leftis the left coordinate x
[in]topis the top coordinate y
[in]rightis the right coordinate x
[in]bottomis the bottom coordinate y
[in]coloris the display color
Returns
status code
  • 0 success
  • 1 fill rect failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left is over 127
  • 5 right is over 127
  • 6 left >= right
  • 7 top is over 127
  • 8 bottom is over 127
  • 9 top >= bottom
Note
left <= 127 && right <= 127 && left < right && top <= 127 && bottom <= 127 && top < bottom

Definition at line 2758 of file driver_ssd1351.c.

◆ ssd1351_info()

uint8_t ssd1351_info ( ssd1351_info_t info)

get chip's information

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

Definition at line 3253 of file driver_ssd1351.c.

◆ ssd1351_init()

uint8_t ssd1351_init ( ssd1351_handle_t handle)

initialize the chip

Parameters
[in]*handlepoints to an ssd1351 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 3072 of file driver_ssd1351.c.

◆ ssd1351_read_ram()

uint8_t ssd1351_read_ram ( ssd1351_handle_t handle)

sent the read ram command

Parameters
[in]*handlepoints to an ssd1351 handle structure
Returns
status code
  • 0 success
  • 1 read ram failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 282 of file driver_ssd1351.c.

◆ ssd1351_set_address_increment()

uint8_t ssd1351_set_address_increment ( ssd1351_handle_t handle,
ssd1351_address_increment_t  increment 
)

set the address increment

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]incrementis the address increment param
Returns
status code
  • 0 success
  • 1 set address increment failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 354 of file driver_ssd1351.c.

◆ ssd1351_set_color_depth()

uint8_t ssd1351_set_color_depth ( ssd1351_handle_t handle,
ssd1351_color_depth_t  color_depth 
)

set the display color depth

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]color_depthis the color depth
Returns
status code
  • 0 success
  • 1 set color depth failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 314 of file driver_ssd1351.c.

◆ ssd1351_set_color_sequence()

uint8_t ssd1351_set_color_sequence ( ssd1351_handle_t handle,
ssd1351_color_sequence_t  color_sequence 
)

set the color sequence

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]color_sequenceis the display color sequence
Returns
status code
  • 0 success
  • 1 set color sequence failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 434 of file driver_ssd1351.c.

◆ ssd1351_set_column_address()

uint8_t ssd1351_set_column_address ( ssd1351_handle_t handle,
uint8_t  start_address,
uint8_t  end_address 
)

set the display column address

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]start_addressis the start address
[in]end_addressis the end 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 <= 127 && end_address <= 127 && start_address >= start_address

Definition at line 137 of file driver_ssd1351.c.

◆ ssd1351_set_com_split_odd_even()

uint8_t ssd1351_set_com_split_odd_even ( ssd1351_handle_t handle,
ssd1351_bool_t  enable 
)

set the com split odd or even

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]enableis a bool value
Returns
status code
  • 0 success
  • 1 set com split odd even failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 514 of file driver_ssd1351.c.

◆ ssd1351_set_command()

uint8_t ssd1351_set_command ( ssd1351_handle_t handle,
ssd1351_command_t  command 
)

set the command

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]commandis the send command
Returns
status code
  • 0 success
  • 1 set command failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1377 of file driver_ssd1351.c.

◆ ssd1351_set_contrast()

uint8_t ssd1351_set_contrast ( ssd1351_handle_t handle,
uint8_t  a,
uint8_t  b,
uint8_t  c 
)

set the display contrast

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]ais the contrast a
[in]bis the contrast b
[in]cis the contrast c
Returns
status code
  • 0 success
  • 1 set contrast failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1230 of file driver_ssd1351.c.

◆ ssd1351_set_display_mode()

uint8_t ssd1351_set_display_mode ( ssd1351_handle_t handle,
ssd1351_display_mode_t  mode 
)

set the display mode

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]modeis the display mode
Returns
status code
  • 0 success
  • 1 set display mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 644 of file driver_ssd1351.c.

◆ ssd1351_set_display_offset()

uint8_t ssd1351_set_display_offset ( ssd1351_handle_t handle,
uint8_t  offset 
)

set the display offset

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]offsetis the display offset
Returns
status code
  • 0 success
  • 1 set display offset failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 offset is over 127
Note
offset <= 127

Definition at line 600 of file driver_ssd1351.c.

◆ ssd1351_set_display_start_line()

uint8_t ssd1351_set_display_start_line ( ssd1351_handle_t handle,
uint8_t  l 
)

set the display start line

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]lis the start line
Returns
status code
  • 0 success
  • 1 set display start line failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 line is over 127
Note
line <= 127

Definition at line 555 of file driver_ssd1351.c.

◆ ssd1351_set_front_clock_oscillator_frequency()

uint8_t ssd1351_set_front_clock_oscillator_frequency ( ssd1351_handle_t handle,
uint8_t  d,
uint8_t  frequency 
)

set the front clock oscillator frequency

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]dis the clock div
[in]frequencyis the clock frequency
Returns
status code
  • 0 success
  • 1 set front clock oscillator frequency failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 div is over 11
  • 5 frequency is over 15
Note
div < 11 && frequency <= 15

Definition at line 878 of file driver_ssd1351.c.

◆ ssd1351_set_gpio()

uint8_t ssd1351_set_gpio ( ssd1351_handle_t handle,
ssd1351_gpio_pin_t  gpio0,
ssd1351_gpio_pin_t  gpio1 
)

set the gpio pin

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]gpio0is the gpio 0 pin
[in]gpio1is the gpio 1 pin
Returns
status code
  • 0 success
  • 1 set gpio failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 979 of file driver_ssd1351.c.

◆ ssd1351_set_gray_scale_pulse_width()

uint8_t ssd1351_set_gray_scale_pulse_width ( ssd1351_handle_t handle,
uint8_t  gamma[63] 
)

set the gray scale pulse width

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]*gammapoints to a gamma table buffer
Returns
status code
  • 0 success
  • 1 set gray scale pulse width failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1064 of file driver_ssd1351.c.

◆ ssd1351_set_master_contrast_current()

uint8_t ssd1351_set_master_contrast_current ( ssd1351_handle_t handle,
uint8_t  current 
)

set the master contrast current

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]currentis the master contrast current
Returns
status code
  • 0 success
  • 1 set master contrast current failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 master contrast current is over 0x0F
Note
current <= 0x0F

Definition at line 1281 of file driver_ssd1351.c.

◆ ssd1351_set_mux_ratio()

uint8_t ssd1351_set_mux_ratio ( ssd1351_handle_t handle,
uint8_t  ratio 
)

set the mux ratio

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]ratiois the mux ratio
Returns
status code
  • 0 success
  • 1 set mux ratio failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 ratio < 15
  • 5 ratio > 127
Note
15 <= ratio <= 127

Definition at line 1327 of file driver_ssd1351.c.

◆ ssd1351_set_parallel_bits()

uint8_t ssd1351_set_parallel_bits ( ssd1351_handle_t handle,
ssd1351_select_parallel_bits_t  parallel_bits 
)

set the interface parallel bits

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]parallel_bitsis the interface parallel bits
Returns
status code
  • 0 success
  • 1 set parallel bits failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 716 of file driver_ssd1351.c.

◆ ssd1351_set_phase_period()

uint8_t ssd1351_set_phase_period ( ssd1351_handle_t handle,
uint8_t  phase1_period,
uint8_t  phase2_period 
)

set the phase period

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]phase1_periodis the phase 1 period
[in]phase2_periodis the phase 2 period
Returns
status code
  • 0 success
  • 1 set phase period failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 phase1_period is less than 2
  • 5 phase1_period is over 15
  • 6 phase2_period is less than 3
  • 7 phase2_period is over 15
Note
2 <= phase1_period <=15 && 3 <= phase1_period <= 15

Definition at line 813 of file driver_ssd1351.c.

◆ ssd1351_set_pre_charge_voltage()

uint8_t ssd1351_set_pre_charge_voltage ( ssd1351_handle_t handle,
uint8_t  voltage_level 
)

set the pre charge voltage

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]voltage_levelis the pre charge voltage level
Returns
status code
  • 0 success
  • 1 set pre charge voltage failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 voltage level is over 0x1F
Note
voltage_level <= 0x1F

Definition at line 1139 of file driver_ssd1351.c.

◆ ssd1351_set_row_address()

uint8_t ssd1351_set_row_address ( ssd1351_handle_t handle,
uint8_t  start_address,
uint8_t  end_address 
)

set the row address

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]start_addressis the start address
[in]end_addressis the end 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 <= 127 && end_address <= 127 && start_address >= start_address

Definition at line 196 of file driver_ssd1351.c.

◆ ssd1351_set_scan_mode()

uint8_t ssd1351_set_scan_mode ( ssd1351_handle_t handle,
ssd1351_scan_mode_t  mode 
)

set the scan mode

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]modeis the scan mode
Returns
status code
  • 0 success
  • 1 set scan mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 474 of file driver_ssd1351.c.

◆ ssd1351_set_scroll()

uint8_t ssd1351_set_scroll ( ssd1351_handle_t handle,
int8_t  scroll,
uint8_t  start_row,
uint8_t  row_len,
ssd1351_scroll_mode_t  mode 
)

set the scroll

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]scrollis the display scroll
[in]start_rowis the scroll start row
[in]row_lenis the scroll row len
[in]modeis the scroll mode
Returns
status code
  • 0 success
  • 1 set scroll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start row is over 127
  • 5 start_row + row_len is over 128
Note
start_row <= 127 && start_row + row_len <= 128

Definition at line 1420 of file driver_ssd1351.c.

◆ ssd1351_set_second_pre_charge_period()

uint8_t ssd1351_set_second_pre_charge_period ( ssd1351_handle_t handle,
uint8_t  period 
)

set the second pre charge period

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]periodis the pre charge period
Returns
status code
  • 0 success
  • 1 set second pre charge period failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 period is over 15
Note
none

Definition at line 1020 of file driver_ssd1351.c.

◆ ssd1351_set_seg0_map()

uint8_t ssd1351_set_seg0_map ( ssd1351_handle_t handle,
ssd1351_seg0_mapped_t  seg0_map 
)

set the seg0 map

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]seg0_mapis the seg0 map
Returns
status code
  • 0 success
  • 1 set seg0 map failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 394 of file driver_ssd1351.c.

◆ ssd1351_set_segment_low_voltage()

uint8_t ssd1351_set_segment_low_voltage ( ssd1351_handle_t handle,
ssd1351_segment_low_voltage_t  segment 
)

set the segment low voltage

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]segmentis the segment low voltage
Returns
status code
  • 0 success
  • 1 set segment low voltage failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 928 of file driver_ssd1351.c.

◆ ssd1351_set_select_vdd()

uint8_t ssd1351_set_select_vdd ( ssd1351_handle_t handle,
ssd1351_select_vdd_t  vdd 
)

set the select vdd

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]vddis the chip vdd
Returns
status code
  • 0 success
  • 1 set select vdd failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 676 of file driver_ssd1351.c.

◆ ssd1351_set_sleep_mode()

uint8_t ssd1351_set_sleep_mode ( ssd1351_handle_t handle,
ssd1351_bool_t  enable 
)

set the sleep mode

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]enableis a bool value
Returns
status code
  • 0 success
  • 1 set sleep mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 756 of file driver_ssd1351.c.

◆ ssd1351_set_use_built_in_linear_lut()

uint8_t ssd1351_set_use_built_in_linear_lut ( ssd1351_handle_t handle)

use built in linear lut

Parameters
[in]*handlepoints to an ssd1351 handle structure
Returns
status code
  • 0 success
  • 1 set use built in linear lut failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1106 of file driver_ssd1351.c.

◆ ssd1351_set_vcomh_voltage()

uint8_t ssd1351_set_vcomh_voltage ( ssd1351_handle_t handle,
uint8_t  voltage_level 
)

set the vcomh voltage

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]voltage_levelis the vcomh voltage level
Returns
status code
  • 0 success
  • 1 set vcomh voltage failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 voltage level is over 0x07
Note
voltage_level <= 0x07

Definition at line 1184 of file driver_ssd1351.c.

◆ ssd1351_start_moving()

uint8_t ssd1351_start_moving ( ssd1351_handle_t handle)

start the display moving

Returns
status code
  • 0 success
  • 1 start moving failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2959 of file driver_ssd1351.c.

◆ ssd1351_stop_moving()

uint8_t ssd1351_stop_moving ( ssd1351_handle_t handle)

stop the display moving

Returns
status code
  • 0 success
  • 1 stop moving failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2989 of file driver_ssd1351.c.

◆ ssd1351_write_ram()

uint8_t ssd1351_write_ram ( ssd1351_handle_t handle)

sent the write ram command

Parameters
[in]*handlepoints to an ssd1351 handle structure
Returns
status code
  • 0 success
  • 1 write ram failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 251 of file driver_ssd1351.c.

◆ ssd1351_write_string()

uint8_t ssd1351_write_string ( ssd1351_handle_t handle,
uint8_t  x,
uint8_t  y,
char *  str,
uint16_t  len,
uint32_t  color,
ssd1351_font_t  font 
)

write a string in the display

Parameters
[in]*handlepoints to an ssd1351 handle structure
[in]xis the coordinate x
[in]yis the coordinate y
[in]*strpoints to a written string address
[in]lenis the length of the string
[in]coloris the display color
[in]fontis the string 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 <= 127 && y <= 127

Definition at line 2697 of file driver_ssd1351.c.