LibDriver SSD1351  2.0.0
SSD1351 full function driver
driver_ssd1351_advance.h
Go to the documentation of this file.
1 
38 #ifndef DRIVER_SSD1351_ADVANCE_H
39 #define DRIVER_SSD1351_ADVANCE_H
40 
42 
43 #ifdef __cplusplus
44 extern "C"{
45 #endif
46 
55 #define SSD1351_ADVANCE_DEFAULT_CLOCK_DIV 0x01 /* div 2 */
56 #define SSD1351_ADVANCE_DEFAULT_OSCILLATOR_FREQUENCY 0x0F /* set 0xF */
57 #define SSD1351_ADVANCE_DEFAULT_MUX_RATIO 0x7F /* set 127 */
58 #define SSD1351_ADVANCE_DEFAULT_DISPLAY_OFFSET 0x00 /* set 0 */
59 #define SSD1351_ADVANCE_DEFAULT_DISPLAY_START_LINE 0x00 /* set 0 */
60 #define SSD1351_ADVANCE_DEFAULT_ADDRESS_INCREMENT SSD1351_ADDRESS_INCREMENT_HORIZONTAL /* horizontal increment */
61 #define SSD1351_ADVANCE_DEFAULT_COLOR_DEPTH SSD1351_COLOR_DEPTH_65K /* set RGB565 */
62 #define SSD1351_ADVANCE_DEFAULT_SEG0_MAP SSD1351_SEG0_ADDRESS_0 /* seg0 map to 0 */
63 #define SSD1351_ADVANCE_DEFAULT_COLOR_SEQUENCE SSD1351_COLOR_SEQUENCE_C_B_A /* set sequence RGB */
64 #define SSD1351_ADVANCE_DEFAULT_SCAN_MODE SSD1351_SCAN_MODE_COM_N_1_COM_0 /* set scan mode com127 -com0 */
65 #define SSD1351_ADVANCE_DEFAULT_COM_SPLIT_ODD_EVEN SSD1351_BOOL_TRUE /* enable split odd even */
66 #define SSD1351_ADVANCE_DEFAULT_GPIO0_MODE SSD1351_GPIO_PIN_INPUT_DISABLED /* disable gpio0 input */
67 #define SSD1351_ADVANCE_DEFAULT_GPIO1_MODE SSD1351_GPIO_PIN_INPUT_DISABLED /* disable gpio1 input */
68 #define SSD1351_ADVANCE_DEFAULT_SELECT_VDD SSD1351_SELECT_VDD_INTERNAL /* vdd internal */
69 #define SSD1351_ADVANCE_DEFAULT_SELECT_PARALLEL SSD1351_SELECT_PARALLEL_8_BIT /* set parallel 8 bit */
70 #define SSD1351_ADVANCE_DEFAULT_SEGMENT_LOW_VOLTAGE SSD1351_SEGMENT_LOW_VOLTAGE_EXTERNAL_VSL /* set segment low voltage external VSL */
71 #define SSD1351_ADVANCE_DEFAULT_CONTRAST_A 0xC8 /* set B contrast */
72 #define SSD1351_ADVANCE_DEFAULT_CONTRAST_B 0x80 /* set G contrast */
73 #define SSD1351_ADVANCE_DEFAULT_CONTRAST_C 0xC8 /* set R contrast */
74 #define SSD1351_ADVANCE_DEFAULT_MASTER_CONTRAST_CURRENT 0x0A /* set master current 0x0A */
75 #define SSD1351_ADVANCE_DEFAULT_PHASE1_PERIOD 0x02 /* set phase1 period 0x02 */
76 #define SSD1351_ADVANCE_DEFAULT_PHASE2_PERIOD 0x03 /* set phase2 period 0x03 */
77 #define SSD1351_ADVANCE_DEFAULT_PRE_CHARGE_VOLTAGE 0x17 /* set pre charge voltage 0x17 */
78 #define SSD1351_ADVANCE_DEFAULT_VCOMH_VOLTAGE 0x05 /* set vcomh voltage 0x05 */
79 #define SSD1351_ADVANCE_DEFAULT_SECOND_PRE_CHARGE_PERIOD 0x01 /* set second pre-charge period 0x001 */
80 
88 uint8_t ssd1351_advance_init(void);
89 
97 uint8_t ssd1351_advance_deinit(void);
98 
106 uint8_t ssd1351_advance_clear(void);
107 
115 uint8_t ssd1351_advance_display_on(void);
116 
124 uint8_t ssd1351_advance_display_off(void);
125 
139 uint8_t ssd1351_advance_string(uint8_t x, uint8_t y, char *str, uint16_t len, uint32_t color, ssd1351_font_t font);
140 
151 uint8_t ssd1351_advance_write_point(uint8_t x, uint8_t y, uint32_t color);
152 
165 uint8_t ssd1351_advance_rect(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t color);
166 
179 uint8_t ssd1351_advance_draw_picture(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t *img);
180 
193 uint8_t ssd1351_advance_draw_picture_16bits(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint16_t *img);
194 
206 uint8_t ssd1351_advance_set_scroll(int8_t scroll, uint8_t start_row, uint8_t row_len, ssd1351_scroll_mode_t mode);
207 
215 uint8_t ssd1351_advance_enable_scroll(void);
216 
224 uint8_t ssd1351_advance_disable_scroll(void);
225 
230 #ifdef __cplusplus
231 }
232 #endif
233 
234 #endif
driver ssd1351 interface header file
ssd1351_scroll_mode_t
ssd1351 scroll mode enumeration definition
ssd1351_font_t
ssd1351 font size enumeration definition
uint8_t ssd1351_advance_draw_picture(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t *img)
advance example draw a picture
uint8_t ssd1351_advance_init(void)
advance example init
uint8_t ssd1351_advance_rect(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint32_t color)
advance example fill a rectangle
uint8_t ssd1351_advance_display_off(void)
advance example display off
uint8_t ssd1351_advance_display_on(void)
advance example display on
uint8_t ssd1351_advance_set_scroll(int8_t scroll, uint8_t start_row, uint8_t row_len, ssd1351_scroll_mode_t mode)
advance example set scroll
uint8_t ssd1351_advance_clear(void)
advance example clear
uint8_t ssd1351_advance_draw_picture_16bits(uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint16_t *img)
advance example draw a 16 bits picture
uint8_t ssd1351_advance_disable_scroll(void)
advance example disable scroll
uint8_t ssd1351_advance_string(uint8_t x, uint8_t y, char *str, uint16_t len, uint32_t color, ssd1351_font_t font)
advance example draw a string
uint8_t ssd1351_advance_deinit(void)
advance example deinit
uint8_t ssd1351_advance_write_point(uint8_t x, uint8_t y, uint32_t color)
advance example write a point
uint8_t ssd1351_advance_enable_scroll(void)
advance example enable scroll