43 static uint8_t gs_gamma[64] = { 0x02, 0x03, 0x04, 0x05,
44 0x06, 0x07, 0x08, 0x09,
45 0x0A, 0x0B, 0x0C, 0x0D,
46 0x0E, 0x0F, 0x10, 0x11,
47 0x12, 0x13, 0x15, 0x17,
48 0x19, 0x1B, 0x1D, 0x1F,
49 0x21, 0x23, 0x25, 0x27,
50 0x2A, 0x2D, 0x30, 0x33,
51 0x36, 0x39, 0x3C, 0x3F,
52 0x42, 0x45, 0x48, 0x4C,
53 0x50, 0x54, 0x58, 0x5C,
54 0x60, 0x64, 0x68, 0x6C,
55 0x70, 0x74, 0x78, 0x7D,
56 0x82, 0x87, 0x8C, 0x91,
57 0x96, 0x9B, 0xA0, 0xA5,
58 0xAA, 0xAF, 0xB4, 0x00 };
72 char test_str1[] =
"libdriver";
73 char test_str2[] =
"ssd1306";
74 char test_str3[] =
"ABCabc";
75 char test_str4[] =
"123?!#$%";
600 for (i = 0; i < 128; i++)
602 for (j = 0; j < 128; j++)
driver ssd1351 display image header file
driver ssd1351 display test header file
uint8_t ssd1351_set_master_contrast_current(ssd1351_handle_t *handle, uint8_t current)
set the master contrast current
uint8_t ssd1351_set_scan_mode(ssd1351_handle_t *handle, ssd1351_scan_mode_t mode)
set the scan mode
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
uint8_t ssd1351_set_color_sequence(ssd1351_handle_t *handle, ssd1351_color_sequence_t color_sequence)
set the color sequence
uint8_t ssd1351_set_contrast(ssd1351_handle_t *handle, uint8_t a, uint8_t b, uint8_t c)
set the display contrast
uint8_t ssd1351_clear(ssd1351_handle_t *handle)
clear the display
uint8_t ssd1351_set_display_offset(ssd1351_handle_t *handle, uint8_t offset)
set the display offset
uint8_t ssd1351_set_command(ssd1351_handle_t *handle, ssd1351_command_t command)
set the command
uint8_t ssd1351_set_color_depth(ssd1351_handle_t *handle, ssd1351_color_depth_t color_depth)
set the display color depth
uint8_t ssd1351_init(ssd1351_handle_t *handle)
initialize the chip
uint8_t ssd1351_set_parallel_bits(ssd1351_handle_t *handle, ssd1351_select_parallel_bits_t parallel_bits)
set the interface parallel bits
uint8_t ssd1351_set_gpio(ssd1351_handle_t *handle, ssd1351_gpio_pin_t gpio0, ssd1351_gpio_pin_t gpio1)
set the gpio pin
uint8_t ssd1351_set_com_split_odd_even(ssd1351_handle_t *handle, ssd1351_bool_t enable)
set the com split odd or even
uint8_t ssd1351_set_second_pre_charge_period(ssd1351_handle_t *handle, uint8_t period)
set the second pre charge period
uint8_t ssd1351_set_front_clock_oscillator_frequency(ssd1351_handle_t *handle, uint8_t d, uint8_t frequency)
set the front clock oscillator frequency
uint8_t ssd1351_set_pre_charge_voltage(ssd1351_handle_t *handle, uint8_t voltage_level)
set the pre charge voltage
uint8_t ssd1351_set_vcomh_voltage(ssd1351_handle_t *handle, uint8_t voltage_level)
set the vcomh voltage
uint8_t ssd1351_set_phase_period(ssd1351_handle_t *handle, uint8_t phase1_period, uint8_t phase2_period)
set the phase period
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
uint8_t ssd1351_set_display_start_line(ssd1351_handle_t *handle, uint8_t l)
set the display start line
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
uint8_t ssd1351_info(ssd1351_info_t *info)
get chip's information
uint8_t ssd1351_set_display_mode(ssd1351_handle_t *handle, ssd1351_display_mode_t mode)
set the display mode
uint8_t ssd1351_set_select_vdd(ssd1351_handle_t *handle, ssd1351_select_vdd_t vdd)
set the select vdd
uint8_t ssd1351_set_seg0_map(ssd1351_handle_t *handle, ssd1351_seg0_mapped_t seg0_map)
set the seg0 map
uint8_t ssd1351_set_sleep_mode(ssd1351_handle_t *handle, ssd1351_bool_t enable)
set the sleep mode
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
uint8_t ssd1351_set_mux_ratio(ssd1351_handle_t *handle, uint8_t ratio)
set the mux ratio
uint8_t ssd1351_set_address_increment(ssd1351_handle_t *handle, ssd1351_address_increment_t increment)
set the address increment
uint8_t ssd1351_start_moving(ssd1351_handle_t *handle)
start the display moving
uint8_t ssd1351_draw_point(ssd1351_handle_t *handle, uint8_t x, uint8_t y, uint32_t color)
draw a point in the display
uint8_t ssd1351_stop_moving(ssd1351_handle_t *handle)
stop the display moving
uint8_t ssd1351_set_gray_scale_pulse_width(ssd1351_handle_t *handle, uint8_t gamma[63])
set the gray scale pulse width
uint8_t ssd1351_set_segment_low_voltage(ssd1351_handle_t *handle, ssd1351_segment_low_voltage_t segment)
set the segment low voltage
uint8_t ssd1351_deinit(ssd1351_handle_t *handle)
close the chip
@ SSD1351_SELECT_VDD_INTERNAL
@ SSD1351_COLOR_SEQUENCE_C_B_A
@ SSD1351_COMMAND_A2_B1_B3_BB_BE_ACCESSIBLE
@ SSD1351_COMMAND_UNLOCK_OLED_DRIVER_IC
@ SSD1351_SCROLL_MODE_NORMAL
@ SSD1351_GPIO_PIN_INPUT_DISABLED
@ SSD1351_SEGMENT_LOW_VOLTAGE_EXTERNAL_VSL
@ SSD1351_SCAN_MODE_COM_N_1_COM_0
@ SSD1351_DISPLAY_MODE_NORMAL
@ SSD1351_SELECT_PARALLEL_8_BIT
@ SSD1351_ADDRESS_INCREMENT_HORIZONTAL
@ SSD1351_COLOR_DEPTH_65K
uint8_t ssd1351_interface_cmd_data_gpio_init(void)
interface command && data gpio init
void ssd1351_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t ssd1351_interface_reset_gpio_init(void)
interface reset gpio init
uint8_t ssd1351_interface_spi_init(void)
interface spi bus init
void ssd1351_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t ssd1351_interface_reset_gpio_deinit(void)
interface reset gpio deinit
uint8_t ssd1351_interface_cmd_data_gpio_write(uint8_t value)
interface command && data gpio write
uint8_t ssd1351_interface_reset_gpio_write(uint8_t value)
interface reset gpio write
uint8_t ssd1351_interface_spi_write_cmd(uint8_t *buf, uint16_t len)
interface spi bus write
uint8_t ssd1351_interface_spi_deinit(void)
interface spi bus deinit
uint8_t ssd1351_interface_cmd_data_gpio_deinit(void)
interface command && data gpio deinit
#define DRIVER_SSD1351_LINK_COMMAND_DATA_GPIO_DEINIT(HANDLE, FUC)
link cmd_data_gpio_deinit function
#define DRIVER_SSD1351_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_SSD1351_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_SSD1351_LINK_RESET_GPIO_DEINIT(HANDLE, FUC)
link reset_gpio_deinit function
#define DRIVER_SSD1351_LINK_RESET_GPIO_INIT(HANDLE, FUC)
link reset_gpio_init function
#define DRIVER_SSD1351_LINK_RESET_GPIO_WRITE(HANDLE, FUC)
link reset_gpio_write function
#define DRIVER_SSD1351_LINK_SPI_WRITE_COMMAND(HANDLE, FUC)
link spi_write_cmd function
#define DRIVER_SSD1351_LINK_COMMAND_DATA_GPIO_WRITE(HANDLE, FUC)
link cmd_data_gpio_write function
#define DRIVER_SSD1351_LINK_SPI_DEINIT(HANDLE, FUC)
link spi_deinit function
#define DRIVER_SSD1351_LINK_INIT(HANDLE, STRUCTURE)
initialize ssd1351_handle_t structure
#define DRIVER_SSD1351_LINK_SPI_INIT(HANDLE, FUC)
link spi_init function
#define DRIVER_SSD1351_LINK_COMMAND_DATA_GPIO_INIT(HANDLE, FUC)
link cmd_data_gpio_init function
uint8_t ssd1351_display_test(void)
display test
ssd1351 handle structure definition
ssd1351 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v