LibDriver SSD1315
Loading...
Searching...
No Matches
ssd1315 base driver function

ssd1315 base driver modules More...

Collaboration diagram for ssd1315 base driver function:

Data Structures

struct  ssd1315_handle_s
 ssd1315 handle structure definition More...
struct  ssd1315_info_s
 ssd1315 information structure definition More...

Typedefs

typedef struct ssd1315_handle_s ssd1315_handle_t
 ssd1315 handle structure definition
typedef struct ssd1315_info_s ssd1315_info_t
 ssd1315 information structure definition

Enumerations

enum  ssd1315_interface_t { SSD1315_INTERFACE_IIC = 0x00 , SSD1315_INTERFACE_SPI = 0x01 }
 ssd1315 interface enumeration definition More...
enum  ssd1315_address_t { SSD1315_ADDR_SA0_0 = 0x78 , SSD1315_ADDR_SA0_1 = 0x7A }
 ssd1315 address pin enumeration definition More...
enum  ssd1315_memory_addressing_mode_t { SSD1315_MEMORY_ADDRESSING_MODE_HORIZONTAL = 0x00 , SSD1315_MEMORY_ADDRESSING_MODE_VERTICAL = 0x01 , SSD1315_MEMORY_ADDRESSING_MODE_PAGE = 0x02 }
 ssd1315 memory addressing mode enumeration definition More...
enum  ssd1315_fade_blinking_mode_t { SSD1315_FADE_BLINKING_MODE_DISABLE = 0x00 , SSD1315_FADE_BLINKING_MODE_FADE_OUT = 0x02 , SSD1315_FADE_BLINKING_MODE_BLINKING = 0x03 }
 ssd1315 fade blinking mode enumeration definition More...
enum  ssd1315_horizontal_scroll_t { SSD1315_HORIZONTAL_SCROLL_DISABLE = 0x00 , SSD1315_HORIZONTAL_SCROLL_ENABLE = 0x01 }
 ssd1315 horizontal scroll enumeration definition More...
enum  ssd1315_scroll_frame_t {
  SSD1315_SCROLL_FRAME_2 = 0x07 , SSD1315_SCROLL_FRAME_3 = 0x04 , SSD1315_SCROLL_FRAME_4 = 0x05 , SSD1315_SCROLL_FRAME_5 = 0x06 ,
  SSD1315_SCROLL_FRAME_6 = 0x00 , SSD1315_SCROLL_FRAME_32 = 0x01 , SSD1315_SCROLL_FRAME_64 = 0x02 , SSD1315_SCROLL_FRAME_128 = 0x03
}
 ssd1315 scroll frame enumeration definition More...
enum  ssd1315_charge_pump_t { SSD1315_CHARGE_PUMP_DISABLE = 0x00 , SSD1315_CHARGE_PUMP_ENABLE = 0x01 }
 ssd1315 charge pump enumeration definition More...
enum  ssd1315_charge_pump_mode_t { SSD1315_CHARGE_PUMP_MODE_7P5V = 0x00 , SSD1315_CHARGE_PUMP_MODE_8P5V = 0x02 , SSD1315_CHARGE_PUMP_MODE_9P0V = 0x03 }
 ssd1315 charge pump mode enumeration definition More...
enum  ssd1315_segment_column_remap_t { SSD1315_SEGMENT_COLUMN_ADDRESS_0 = 0x00 , SSD1315_SEGMENT_COLUMN_ADDRESS_127 = 0x01 }
 ssd1315 segment column remap enumeration definition More...
enum  ssd1315_entire_display_t { SSD1315_ENTIRE_DISPLAY_OFF = 0x00 , SSD1315_ENTIRE_DISPLAY_ON = 0x01 }
 ssd1315 entire display enumeration definition More...
enum  ssd1315_display_mode_t { SSD1315_DISPLAY_MODE_NORMAL = 0x00 , SSD1315_DISPLAY_MODE_INVERSE = 0x01 }
 ssd1315 display mode enumeration definition More...
enum  ssd1315_display_t { SSD1315_DISPLAY_OFF = 0x00 , SSD1315_DISPLAY_ON = 0x01 }
 ssd1315 display enumeration definition More...
enum  ssd1315_scan_direction_t { SSD1315_SCAN_DIRECTION_COM0_START = 0x00 , SSD1315_SCAN_DIRECTION_COMN_1_START = 0x01 }
 ssd1315 scan direction enumeration definition More...
enum  ssd1315_zoom_in_t { SSD1315_ZOOM_IN_DISABLE = 0x00 , SSD1315_ZOOM_IN_ENABLE = 0x01 }
 ssd1315 zoom in enumeration definition More...
enum  ssd1315_pin_conf_t { SSD1315_PIN_CONF_SEQUENTIAL = 0x00 , SSD1315_PIN_CONF_ALTERNATIVE = 0x01 }
 ssd1315 pin conf enumeration definition More...
enum  ssd1315_left_right_remap_t { SSD1315_LEFT_RIGHT_REMAP_DISABLE = 0x00 , SSD1315_LEFT_RIGHT_REMAP_ENABLE = 0x01 }
 ssd1315 left right remap enumeration definition More...
enum  ssd1315_deselect_level_t { SSD1315_DESELECT_LEVEL_0P65 = 0x00 , SSD1315_DESELECT_LEVEL_0P77 = 0x02 , SSD1315_DESELECT_LEVEL_0P83 = 0x03 }
 ssd1315 deselect level enumeration definition More...
enum  ssd1315_iref_t { SSD1315_IREF_DISABLE = 0x00 , SSD1315_IREF_ENABLE = 0x01 }
 ssd1315 iref enumeration definition More...
enum  ssd1315_iref_value_t { SSD1315_IREF_VALUE_19UA_150UA = 0x00 , SSD1315_IREF_VALUE_30UA_240UA = 0x01 }
 ssd1315 iref value enumeration definition More...
enum  ssd1315_font_t { SSD1315_FONT_12 = 0x0C , SSD1315_FONT_16 = 0x10 , SSD1315_FONT_24 = 0x18 }
 ssd1315 font enumeration definition More...

Functions

uint8_t ssd1315_info (ssd1315_info_t *info)
 get chip's information
uint8_t ssd1315_set_interface (ssd1315_handle_t *handle, ssd1315_interface_t interface)
 set the chip interface
uint8_t ssd1315_get_interface (ssd1315_handle_t *handle, ssd1315_interface_t *interface)
 get the chip interface
uint8_t ssd1315_set_addr_pin (ssd1315_handle_t *handle, ssd1315_address_t addr_pin)
 set the chip iic address
uint8_t ssd1315_get_addr_pin (ssd1315_handle_t *handle, ssd1315_address_t *addr_pin)
 get the chip iic address
uint8_t ssd1315_init (ssd1315_handle_t *handle)
 initialize the chip
uint8_t ssd1315_deinit (ssd1315_handle_t *handle)
 close the chip
uint8_t ssd1315_clear (ssd1315_handle_t *handle)
 clear the screen
uint8_t ssd1315_gram_update (ssd1315_handle_t *handle)
 update the gram data
uint8_t ssd1315_write_point (ssd1315_handle_t *handle, uint8_t x, uint8_t y, uint8_t data)
 write a point
uint8_t ssd1315_read_point (ssd1315_handle_t *handle, uint8_t x, uint8_t y, uint8_t *data)
 read a point
uint8_t ssd1315_gram_write_point (ssd1315_handle_t *handle, uint8_t x, uint8_t y, uint8_t data)
 write a point in the gram
uint8_t ssd1315_gram_read_point (ssd1315_handle_t *handle, uint8_t x, uint8_t y, uint8_t *data)
 read a point from the gram
uint8_t ssd1315_gram_write_string (ssd1315_handle_t *handle, uint8_t x, uint8_t y, char *str, uint16_t len, uint8_t color, ssd1315_font_t font)
 draw a string in the gram
uint8_t ssd1315_gram_fill_rect (ssd1315_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t color)
 fill a rectangle in the gram
uint8_t ssd1315_gram_draw_picture (ssd1315_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t *img)
 draw a picture in the gram
uint8_t ssd1315_set_low_column_start_address (ssd1315_handle_t *handle, uint8_t addr)
 set the low column start address
uint8_t ssd1315_set_high_column_start_address (ssd1315_handle_t *handle, uint8_t addr)
 set the high column start address
uint8_t ssd1315_set_memory_addressing_mode (ssd1315_handle_t *handle, ssd1315_memory_addressing_mode_t mode)
 set the memory addressing mode
uint8_t ssd1315_set_column_address_range (ssd1315_handle_t *handle, uint8_t start_addr, uint8_t end_addr)
 set the column address range
uint8_t ssd1315_set_page_address_range (ssd1315_handle_t *handle, uint8_t start_addr, uint8_t end_addr)
 set the page address range
uint8_t ssd1315_set_fade_blinking_mode (ssd1315_handle_t *handle, ssd1315_fade_blinking_mode_t mode, uint8_t frames)
 set the fade blinking mode
uint8_t ssd1315_set_right_horizontal_scroll (ssd1315_handle_t *handle, uint8_t start_page_addr, uint8_t end_page_addr, ssd1315_scroll_frame_t frames)
 set the right horizontal scroll
uint8_t ssd1315_set_left_horizontal_scroll (ssd1315_handle_t *handle, uint8_t start_page_addr, uint8_t end_page_addr, ssd1315_scroll_frame_t frames)
 set the left horizontal scroll
uint8_t ssd1315_set_vertical_right_horizontal_scroll (ssd1315_handle_t *handle, ssd1315_horizontal_scroll_t enable, uint8_t start_page_addr, uint8_t end_page_addr, uint8_t vertical_scrolling_offset, ssd1315_scroll_frame_t frames, uint8_t start_column_addr, uint8_t end_column_addr)
 set the vertical right horizontal scroll
uint8_t ssd1315_set_vertical_left_horizontal_scroll (ssd1315_handle_t *handle, ssd1315_horizontal_scroll_t enable, uint8_t start_page_addr, uint8_t end_page_addr, uint8_t vertical_scrolling_offset, ssd1315_scroll_frame_t frames, uint8_t start_column_addr, uint8_t end_column_addr)
 set the vertical left horizontal scroll
uint8_t ssd1315_deactivate_scroll (ssd1315_handle_t *handle)
 deactivate the scroll
uint8_t ssd1315_activate_scroll (ssd1315_handle_t *handle)
 activate the scroll
uint8_t ssd1315_set_display_start_line (ssd1315_handle_t *handle, uint8_t l)
 set the display start line
uint8_t ssd1315_set_contrast (ssd1315_handle_t *handle, uint8_t contrast)
 set the display contrast
uint8_t ssd1315_set_charge_pump (ssd1315_handle_t *handle, ssd1315_charge_pump_t enable, ssd1315_charge_pump_mode_t mode)
 enable or disable the charge pump
uint8_t ssd1315_set_segment_remap (ssd1315_handle_t *handle, ssd1315_segment_column_remap_t remap)
 set the segment remap
uint8_t ssd1315_set_vertical_scroll_area (ssd1315_handle_t *handle, uint8_t start_row, uint8_t end_row)
 set the vertical scroll area
uint8_t ssd1315_set_entire_display (ssd1315_handle_t *handle, ssd1315_entire_display_t enable)
 enable or disable the entire display
uint8_t ssd1315_set_display_mode (ssd1315_handle_t *handle, ssd1315_display_mode_t mode)
 set the display mode
uint8_t ssd1315_set_multiplex_ratio (ssd1315_handle_t *handle, uint8_t multiplex)
 set the multiplex ratio
uint8_t ssd1315_set_display (ssd1315_handle_t *handle, ssd1315_display_t on_off)
 enable or disable the display
uint8_t ssd1315_set_page_address (ssd1315_handle_t *handle, uint8_t addr)
 set the page address
uint8_t ssd1315_set_scan_direction (ssd1315_handle_t *handle, ssd1315_scan_direction_t dir)
 set the scan direction
uint8_t ssd1315_set_display_offset (ssd1315_handle_t *handle, uint8_t offset)
 set the display offset
uint8_t ssd1315_set_display_clock (ssd1315_handle_t *handle, uint8_t oscillator_frequency, uint8_t clock_divide)
 set the display clock
uint8_t ssd1315_set_zoom_in (ssd1315_handle_t *handle, ssd1315_zoom_in_t zoom)
 set the display zoom in
uint8_t ssd1315_set_precharge_period (ssd1315_handle_t *handle, uint8_t phase1_period, uint8_t phase2_period)
 set the pre charge period
uint8_t ssd1315_set_com_pins_hardware_conf (ssd1315_handle_t *handle, ssd1315_pin_conf_t conf, ssd1315_left_right_remap_t remap)
 set the hardware com pins
uint8_t ssd1315_set_deselect_level (ssd1315_handle_t *handle, ssd1315_deselect_level_t level)
 set the deselect level
uint8_t ssd1315_set_iref (ssd1315_handle_t *handle, ssd1315_iref_t enable, ssd1315_iref_value_t iref)
 set iref
uint8_t ssd1315_set_right_horizontal_scroll_one_column (ssd1315_handle_t *handle, uint8_t start_page, uint8_t end_page, uint8_t start_column_addr, uint8_t end_column_addr)
 set right horizontal scroll by one column
uint8_t ssd1315_set_left_horizontal_scroll_one_column (ssd1315_handle_t *handle, uint8_t start_page, uint8_t end_page, uint8_t start_column_addr, uint8_t end_column_addr)
 set left horizontal scroll by one column

Detailed Description

ssd1315 base driver modules

Typedef Documentation

◆ ssd1315_handle_t

ssd1315 handle structure definition

◆ ssd1315_info_t

ssd1315 information structure definition

Enumeration Type Documentation

◆ ssd1315_address_t

ssd1315 address pin enumeration definition

Enumerator
SSD1315_ADDR_SA0_0 

address pin GND

SSD1315_ADDR_SA0_1 

address pin VCC

Definition at line 71 of file driver_ssd1315.h.

◆ ssd1315_charge_pump_mode_t

ssd1315 charge pump mode enumeration definition

Enumerator
SSD1315_CHARGE_PUMP_MODE_7P5V 

7.5V

SSD1315_CHARGE_PUMP_MODE_8P5V 

8.5V

SSD1315_CHARGE_PUMP_MODE_9P0V 

9.0V

Definition at line 133 of file driver_ssd1315.h.

◆ ssd1315_charge_pump_t

ssd1315 charge pump enumeration definition

Enumerator
SSD1315_CHARGE_PUMP_DISABLE 

charge pump disable

SSD1315_CHARGE_PUMP_ENABLE 

charge pump enable

Definition at line 124 of file driver_ssd1315.h.

◆ ssd1315_deselect_level_t

ssd1315 deselect level enumeration definition

Enumerator
SSD1315_DESELECT_LEVEL_0P65 

deselect level 0.65

SSD1315_DESELECT_LEVEL_0P77 

deselect level 0.77

SSD1315_DESELECT_LEVEL_0P83 

deselect level 0.83

Definition at line 215 of file driver_ssd1315.h.

◆ ssd1315_display_mode_t

ssd1315 display mode enumeration definition

Enumerator
SSD1315_DISPLAY_MODE_NORMAL 

display mode normal

SSD1315_DISPLAY_MODE_INVERSE 

display mode inverse

Definition at line 161 of file driver_ssd1315.h.

◆ ssd1315_display_t

ssd1315 display enumeration definition

Enumerator
SSD1315_DISPLAY_OFF 

close display

SSD1315_DISPLAY_ON 

open display

Definition at line 170 of file driver_ssd1315.h.

◆ ssd1315_entire_display_t

ssd1315 entire display enumeration definition

Enumerator
SSD1315_ENTIRE_DISPLAY_OFF 

entire display off

SSD1315_ENTIRE_DISPLAY_ON 

entire display on

Definition at line 152 of file driver_ssd1315.h.

◆ ssd1315_fade_blinking_mode_t

ssd1315 fade blinking mode enumeration definition

Enumerator
SSD1315_FADE_BLINKING_MODE_DISABLE 

disable fade blinking mode

SSD1315_FADE_BLINKING_MODE_FADE_OUT 

fade out fade blinking mode

SSD1315_FADE_BLINKING_MODE_BLINKING 

blinking fade blinking mode

Definition at line 90 of file driver_ssd1315.h.

◆ ssd1315_font_t

ssd1315 font enumeration definition

Enumerator
SSD1315_FONT_12 

font 12

SSD1315_FONT_16 

font 16

SSD1315_FONT_24 

font 24

Definition at line 243 of file driver_ssd1315.h.

◆ ssd1315_horizontal_scroll_t

ssd1315 horizontal scroll enumeration definition

Enumerator
SSD1315_HORIZONTAL_SCROLL_DISABLE 

disable horizontal scroll

SSD1315_HORIZONTAL_SCROLL_ENABLE 

enable horizontal scroll

Definition at line 100 of file driver_ssd1315.h.

◆ ssd1315_interface_t

ssd1315 interface enumeration definition

Enumerator
SSD1315_INTERFACE_IIC 

interface iic

SSD1315_INTERFACE_SPI 

interface spi

Definition at line 62 of file driver_ssd1315.h.

◆ ssd1315_iref_t

ssd1315 iref enumeration definition

Enumerator
SSD1315_IREF_DISABLE 

disable iref

SSD1315_IREF_ENABLE 

enable iref

Definition at line 225 of file driver_ssd1315.h.

◆ ssd1315_iref_value_t

ssd1315 iref value enumeration definition

Enumerator
SSD1315_IREF_VALUE_19UA_150UA 

internal iref setting: 19uA, output maximum iseg 150uA

SSD1315_IREF_VALUE_30UA_240UA 

internal iref setting: 30uA, output maximum iseg 240uA

Definition at line 234 of file driver_ssd1315.h.

◆ ssd1315_left_right_remap_t

ssd1315 left right remap enumeration definition

Enumerator
SSD1315_LEFT_RIGHT_REMAP_DISABLE 

disable left right remap

SSD1315_LEFT_RIGHT_REMAP_ENABLE 

enable left right remap

Definition at line 206 of file driver_ssd1315.h.

◆ ssd1315_memory_addressing_mode_t

ssd1315 memory addressing mode enumeration definition

Enumerator
SSD1315_MEMORY_ADDRESSING_MODE_HORIZONTAL 

horizontal addressing mode

SSD1315_MEMORY_ADDRESSING_MODE_VERTICAL 

vertical addressing mode

SSD1315_MEMORY_ADDRESSING_MODE_PAGE 

page addressing mode

Definition at line 80 of file driver_ssd1315.h.

◆ ssd1315_pin_conf_t

ssd1315 pin conf enumeration definition

Enumerator
SSD1315_PIN_CONF_SEQUENTIAL 

pin conf sequential

SSD1315_PIN_CONF_ALTERNATIVE 

pin conf alternative

Definition at line 197 of file driver_ssd1315.h.

◆ ssd1315_scan_direction_t

ssd1315 scan direction enumeration definition

Enumerator
SSD1315_SCAN_DIRECTION_COM0_START 

scan direction com 0 start

SSD1315_SCAN_DIRECTION_COMN_1_START 

scan direction com N-1 start

Definition at line 179 of file driver_ssd1315.h.

◆ ssd1315_scroll_frame_t

ssd1315 scroll frame enumeration definition

Enumerator
SSD1315_SCROLL_FRAME_2 

scroll frame 2

SSD1315_SCROLL_FRAME_3 

scroll frame 3

SSD1315_SCROLL_FRAME_4 

scroll frame 4

SSD1315_SCROLL_FRAME_5 

scroll frame 5

SSD1315_SCROLL_FRAME_6 

scroll frame 6

SSD1315_SCROLL_FRAME_32 

scroll frame 32

SSD1315_SCROLL_FRAME_64 

scroll frame 64

SSD1315_SCROLL_FRAME_128 

scroll frame 128

Definition at line 109 of file driver_ssd1315.h.

◆ ssd1315_segment_column_remap_t

ssd1315 segment column remap enumeration definition

Enumerator
SSD1315_SEGMENT_COLUMN_ADDRESS_0 

segment column remap address 0

SSD1315_SEGMENT_COLUMN_ADDRESS_127 

segment column remap address 127

Definition at line 143 of file driver_ssd1315.h.

◆ ssd1315_zoom_in_t

ssd1315 zoom in enumeration definition

Enumerator
SSD1315_ZOOM_IN_DISABLE 

disable zoom in

SSD1315_ZOOM_IN_ENABLE 

enable zoom in

Definition at line 188 of file driver_ssd1315.h.

Function Documentation

◆ ssd1315_activate_scroll()

uint8_t ssd1315_activate_scroll ( ssd1315_handle_t * handle)

activate the scroll

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

Definition at line 1711 of file driver_ssd1315.c.

◆ ssd1315_clear()

uint8_t ssd1315_clear ( ssd1315_handle_t * handle)

clear the screen

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

Definition at line 336 of file driver_ssd1315.c.

◆ ssd1315_deactivate_scroll()

uint8_t ssd1315_deactivate_scroll ( ssd1315_handle_t * handle)

deactivate the scroll

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

Definition at line 1687 of file driver_ssd1315.c.

◆ ssd1315_deinit()

uint8_t ssd1315_deinit ( ssd1315_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an ssd1315 handle structure
Returns
status code
  • 0 success
  • 1 iic or 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
  • 7 interface param is invalid
Note
none

Definition at line 1035 of file driver_ssd1315.c.

◆ ssd1315_get_addr_pin()

uint8_t ssd1315_get_addr_pin ( ssd1315_handle_t * handle,
ssd1315_address_t * addr_pin )

get the chip iic address

Parameters
[in]*handlepointer to an ssd1315 handle structure
[out]*addr_pinpointer to an iic address buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1175 of file driver_ssd1315.c.

◆ ssd1315_get_interface()

uint8_t ssd1315_get_interface ( ssd1315_handle_t * handle,
ssd1315_interface_t * interface )

get the chip interface

Parameters
[in]*handlepointer to an ssd1315 handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1133 of file driver_ssd1315.c.

◆ ssd1315_gram_draw_picture()

uint8_t ssd1315_gram_draw_picture ( ssd1315_handle_t * handle,
uint8_t left,
uint8_t top,
uint8_t right,
uint8_t bottom,
uint8_t * img )

draw a picture in the gram

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]leftleft coordinate x
[in]toptop coordinate y
[in]rightright coordinate x
[in]bottombottom coordinate y
[in]*imgpointer to an image buffer
Returns
status code
  • 0 success
  • 1 gram draw picture failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left or top is invalid
  • 5 right or bottom is invalid
  • 6 left > right or top > bottom
Note
none

Definition at line 808 of file driver_ssd1315.c.

◆ ssd1315_gram_fill_rect()

uint8_t ssd1315_gram_fill_rect ( ssd1315_handle_t * handle,
uint8_t left,
uint8_t top,
uint8_t right,
uint8_t bottom,
uint8_t color )

fill a rectangle in the gram

Parameters
[in]*handlepointer to an ssd1315 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 gram fill rect failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 left or top is invalid
  • 5 right or bottom is invalid
  • 6 left > right or top > bottom
Note
none

Definition at line 745 of file driver_ssd1315.c.

◆ ssd1315_gram_read_point()

uint8_t ssd1315_gram_read_point ( ssd1315_handle_t * handle,
uint8_t x,
uint8_t y,
uint8_t * data )

read a point from the gram

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]xcoordinate x
[in]ycoordinate y
[out]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 gram read point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
none

Definition at line 634 of file driver_ssd1315.c.

◆ ssd1315_gram_update()

uint8_t ssd1315_gram_update ( ssd1315_handle_t * handle)

update the gram data

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

Definition at line 395 of file driver_ssd1315.c.

◆ ssd1315_gram_write_point()

uint8_t ssd1315_gram_write_point ( ssd1315_handle_t * handle,
uint8_t x,
uint8_t y,
uint8_t data )

write a point in the gram

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]xcoordinate x
[in]ycoordinate y
[in]datawritten data
Returns
status code
  • 0 success
  • 1 gram write point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
none

Definition at line 584 of file driver_ssd1315.c.

◆ ssd1315_gram_write_string()

uint8_t ssd1315_gram_write_string ( ssd1315_handle_t * handle,
uint8_t x,
uint8_t y,
char * str,
uint16_t len,
uint8_t color,
ssd1315_font_t font )

draw a string in the gram

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]xcoordinate x
[in]ycoordinate y
[in]*strpointer to a write string address
[in]lenlength of the string
[in]colordisplay color
[in]fontdisplay font size
Returns
status code
  • 0 success
  • 1 gram write string failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
none

Definition at line 687 of file driver_ssd1315.c.

◆ ssd1315_info()

uint8_t ssd1315_info ( ssd1315_info_t * info)

get chip's information

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

Definition at line 2551 of file driver_ssd1315.c.

◆ ssd1315_init()

uint8_t ssd1315_init ( ssd1315_handle_t * handle)

initialize the chip

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

Definition at line 867 of file driver_ssd1315.c.

◆ ssd1315_read_point()

uint8_t ssd1315_read_point ( ssd1315_handle_t * handle,
uint8_t x,
uint8_t y,
uint8_t * data )

read a point

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]xcoordinate x
[in]ycoordinate y
[out]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 read point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
none

Definition at line 534 of file driver_ssd1315.c.

◆ ssd1315_set_addr_pin()

uint8_t ssd1315_set_addr_pin ( ssd1315_handle_t * handle,
ssd1315_address_t addr_pin )

set the chip iic address

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]addr_piniic address
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1154 of file driver_ssd1315.c.

◆ ssd1315_set_charge_pump()

uint8_t ssd1315_set_charge_pump ( ssd1315_handle_t * handle,
ssd1315_charge_pump_t enable,
ssd1315_charge_pump_mode_t mode )

enable or disable the charge pump

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]enablebool value
[in]modecharge pump mode
Returns
status code
  • 0 success
  • 1 set charge pump failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1799 of file driver_ssd1315.c.

◆ ssd1315_set_column_address_range()

uint8_t ssd1315_set_column_address_range ( ssd1315_handle_t * handle,
uint8_t start_addr,
uint8_t end_addr )

set the column address range

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_addrcolumn start address
[in]end_addrcolumn end address
Returns
status code
  • 0 success
  • 1 set column address range failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start addr is invalid
  • 5 end addr is invalid
Note
start addr and end addr can't be over 0x7F

Definition at line 1295 of file driver_ssd1315.c.

◆ ssd1315_set_com_pins_hardware_conf()

uint8_t ssd1315_set_com_pins_hardware_conf ( ssd1315_handle_t * handle,
ssd1315_pin_conf_t conf,
ssd1315_left_right_remap_t remap )

set the hardware com pins

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]confpin conf
[in]remapleft right remap
Returns
status code
  • 0 success
  • 1 set com pins hardware conf failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2277 of file driver_ssd1315.c.

◆ ssd1315_set_contrast()

uint8_t ssd1315_set_contrast ( ssd1315_handle_t * handle,
uint8_t contrast )

set the display contrast

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

Definition at line 1768 of file driver_ssd1315.c.

◆ ssd1315_set_deselect_level()

uint8_t ssd1315_set_deselect_level ( ssd1315_handle_t * handle,
ssd1315_deselect_level_t level )

set the deselect level

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]leveldeselect level
Returns
status code
  • 0 success
  • 1 set deselect level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2307 of file driver_ssd1315.c.

◆ ssd1315_set_display()

uint8_t ssd1315_set_display ( ssd1315_handle_t * handle,
ssd1315_display_t on_off )

enable or disable the display

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

Definition at line 2023 of file driver_ssd1315.c.

◆ ssd1315_set_display_clock()

uint8_t ssd1315_set_display_clock ( ssd1315_handle_t * handle,
uint8_t oscillator_frequency,
uint8_t clock_divide )

set the display clock

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]oscillator_frequencyoscillator frequency
[in]clock_divideclock divide
Returns
status code
  • 0 success
  • 1 set display clock failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 oscillator frequency is invalid
  • 5 clock divide is invalid
Note
oscillator_frequency <= 0x0F, clock_divide <= 0x0F

Definition at line 2159 of file driver_ssd1315.c.

◆ ssd1315_set_display_mode()

uint8_t ssd1315_set_display_mode ( ssd1315_handle_t * handle,
ssd1315_display_mode_t mode )

set the display mode

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]modedisplay 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 1947 of file driver_ssd1315.c.

◆ ssd1315_set_display_offset()

uint8_t ssd1315_set_display_offset ( ssd1315_handle_t * handle,
uint8_t offset )

set the display offset

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]offsetdisplay offset
Returns
status code
  • 0 success
  • 1 set display offset failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 offset is invalid
Note
offset <= 0x3F

Definition at line 2120 of file driver_ssd1315.c.

◆ ssd1315_set_display_start_line()

uint8_t ssd1315_set_display_start_line ( ssd1315_handle_t * handle,
uint8_t l )

set the display start line

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]lstart line
Returns
status code
  • 0 success
  • 1 set display start line failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 line is invalid
Note
line <= 0x3F

Definition at line 1737 of file driver_ssd1315.c.

◆ ssd1315_set_entire_display()

uint8_t ssd1315_set_entire_display ( ssd1315_handle_t * handle,
ssd1315_entire_display_t enable )

enable or disable the entire display

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

Definition at line 1915 of file driver_ssd1315.c.

◆ ssd1315_set_fade_blinking_mode()

uint8_t ssd1315_set_fade_blinking_mode ( ssd1315_handle_t * handle,
ssd1315_fade_blinking_mode_t mode,
uint8_t frames )

set the fade blinking mode

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]modefade blinking mode
[in]framesfade or blinking frames
Returns
status code
  • 0 success
  • 1 set fade blinking mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 frames is invalid
Note
frames max is 0x0F and div is (frames + 1) * 8

Definition at line 1386 of file driver_ssd1315.c.

◆ ssd1315_set_high_column_start_address()

uint8_t ssd1315_set_high_column_start_address ( ssd1315_handle_t * handle,
uint8_t addr )

set the high column start address

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]addrhigh column start address
Returns
status code
  • 0 success
  • 1 set high column start address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 addr is invalid
Note
addr <= 0x7

Definition at line 1231 of file driver_ssd1315.c.

◆ ssd1315_set_interface()

uint8_t ssd1315_set_interface ( ssd1315_handle_t * handle,
ssd1315_interface_t interface )

set the chip interface

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1112 of file driver_ssd1315.c.

◆ ssd1315_set_iref()

uint8_t ssd1315_set_iref ( ssd1315_handle_t * handle,
ssd1315_iref_t enable,
ssd1315_iref_value_t iref )

set iref

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]enablebool value
[in]irefset iref
Returns
status code
  • 0 success
  • 1 set iref failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2338 of file driver_ssd1315.c.

◆ ssd1315_set_left_horizontal_scroll()

uint8_t ssd1315_set_left_horizontal_scroll ( ssd1315_handle_t * handle,
uint8_t start_page_addr,
uint8_t end_page_addr,
ssd1315_scroll_frame_t frames )

set the left horizontal scroll

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_page_addrstart page address
[in]end_page_addrend page address
[in]framesscroll frames
Returns
status code
  • 0 success
  • 1 set left horizontal scroll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_page_addr is invalid
  • 5 end_page_addr is invalid
Note
start_page_addr <= 0x07, end_page_addr <= 0x07

Definition at line 1478 of file driver_ssd1315.c.

◆ ssd1315_set_left_horizontal_scroll_one_column()

uint8_t ssd1315_set_left_horizontal_scroll_one_column ( ssd1315_handle_t * handle,
uint8_t start_page,
uint8_t end_page,
uint8_t start_column_addr,
uint8_t end_column_addr )

set left horizontal scroll by one column

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_pagestart page
[in]end_pageend page
[in]start_column_addrstart column address
[in]end_column_addrend column address
Returns
status code
  • 0 success
  • 1 set left horizontal scroll by one column failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_page > 5
  • 5 end_page > 5
  • 6 start_column_addr > 0x7F
  • 7 end_column_addr > 0x7F
Note
start_page <= 5, end_page <= 5, start_column_addr <= 0x7F, end_column_addr <= 0x7F

Definition at line 2442 of file driver_ssd1315.c.

◆ ssd1315_set_low_column_start_address()

uint8_t ssd1315_set_low_column_start_address ( ssd1315_handle_t * handle,
uint8_t addr )

set the low column start address

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]addrlow column start address
Returns
status code
  • 0 success
  • 1 set low column start address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 addr is invalid
Note
addr <= 0xF

Definition at line 1199 of file driver_ssd1315.c.

◆ ssd1315_set_memory_addressing_mode()

uint8_t ssd1315_set_memory_addressing_mode ( ssd1315_handle_t * handle,
ssd1315_memory_addressing_mode_t mode )

set the memory addressing mode

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]modememory addressing mode
Returns
status code
  • 0 success
  • 1 set memory addressing mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1262 of file driver_ssd1315.c.

◆ ssd1315_set_multiplex_ratio()

uint8_t ssd1315_set_multiplex_ratio ( ssd1315_handle_t * handle,
uint8_t multiplex )

set the multiplex ratio

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]multiplexmultiplex ratio
Returns
status code
  • 0 success
  • 1 set multiplex ratio failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 multiplex is too small
  • 5 multiplex is too large
Note
multiplex must be over 0x0E and less than 0x40

Definition at line 1981 of file driver_ssd1315.c.

◆ ssd1315_set_page_address()

uint8_t ssd1315_set_page_address ( ssd1315_handle_t * handle,
uint8_t addr )

set the page address

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]addrpage address
Returns
status code
  • 0 success
  • 1 set page address failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 addr is invalid
Note
addr <= 0x07

Definition at line 2056 of file driver_ssd1315.c.

◆ ssd1315_set_page_address_range()

uint8_t ssd1315_set_page_address_range ( ssd1315_handle_t * handle,
uint8_t start_addr,
uint8_t end_addr )

set the page address range

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_addrpage start address
[in]end_addrpage end address
Returns
status code
  • 0 success
  • 1 set page address range failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start addr is invalid
  • 5 end addr is invalid
Note
start addr and end addr can't be over 0x07

Definition at line 1341 of file driver_ssd1315.c.

◆ ssd1315_set_precharge_period()

uint8_t ssd1315_set_precharge_period ( ssd1315_handle_t * handle,
uint8_t phase1_period,
uint8_t phase2_period )

set the pre charge period

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]phase1_periodphase1 period
[in]phase2_periodphase2 period
Returns
status code
  • 0 success
  • 1 set pre charge period failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 phase1 period is invalid
  • 5 phase2 period is invalid
Note
phase1_period <= 0x0F, phase2_period <= 0x0F

Definition at line 2234 of file driver_ssd1315.c.

◆ ssd1315_set_right_horizontal_scroll()

uint8_t ssd1315_set_right_horizontal_scroll ( ssd1315_handle_t * handle,
uint8_t start_page_addr,
uint8_t end_page_addr,
ssd1315_scroll_frame_t frames )

set the right horizontal scroll

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_page_addrstart page address
[in]end_page_addrend page address
[in]framesscroll frames
Returns
status code
  • 0 success
  • 1 set right horizontal scroll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start page addr is invalid
  • 5 end page addr is invalid
Note
start_page_addr <= 0x07, end_page_addr <= 0x07

Definition at line 1426 of file driver_ssd1315.c.

◆ ssd1315_set_right_horizontal_scroll_one_column()

uint8_t ssd1315_set_right_horizontal_scroll_one_column ( ssd1315_handle_t * handle,
uint8_t start_page,
uint8_t end_page,
uint8_t start_column_addr,
uint8_t end_column_addr )

set right horizontal scroll by one column

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_pagestart page
[in]end_pageend page
[in]start_column_addrstart column address
[in]end_column_addrend column address
Returns
status code
  • 0 success
  • 1 set right horizontal scroll by one column failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_page > 5
  • 5 end_page > 5
  • 6 start_column_addr > 0x7F
  • 7 end_column_addr > 0x7F
Note
start_page <= 5, end_page <= 5, start_column_addr <= 0x7F, end_column_addr <= 0x7F

Definition at line 2375 of file driver_ssd1315.c.

◆ ssd1315_set_scan_direction()

uint8_t ssd1315_set_scan_direction ( ssd1315_handle_t * handle,
ssd1315_scan_direction_t dir )

set the scan direction

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]dirscan direction
Returns
status code
  • 0 success
  • 1 set scan direction failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2087 of file driver_ssd1315.c.

◆ ssd1315_set_segment_remap()

uint8_t ssd1315_set_segment_remap ( ssd1315_handle_t * handle,
ssd1315_segment_column_remap_t remap )

set the segment remap

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]remapsegment remap param
Returns
status code
  • 0 success
  • 1 set segment remap failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1830 of file driver_ssd1315.c.

◆ ssd1315_set_vertical_left_horizontal_scroll()

uint8_t ssd1315_set_vertical_left_horizontal_scroll ( ssd1315_handle_t * handle,
ssd1315_horizontal_scroll_t enable,
uint8_t start_page_addr,
uint8_t end_page_addr,
uint8_t vertical_scrolling_offset,
ssd1315_scroll_frame_t frames,
uint8_t start_column_addr,
uint8_t end_column_addr )

set the vertical left horizontal scroll

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]enablebool value
[in]start_page_addrstart page address
[in]end_page_addrend page address
[in]vertical_scrolling_offsetvertical scrolling offset
[in]framesscroll frames
[in]start_column_addrstart column address
[in]end_column_addrend column address
Returns
status code
  • 0 success
  • 1 set vertical left horizontal scroll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_page_addr is invalid
  • 5 end_page_addr is invalid
  • 6 vertical scrolling offset is invalid
  • 7 start column addr is invalid
  • 8 end column addr is invalid
Note
start_page_addr <= 0x07, end_page_addr <= 0x07, vertical_scrolling_offset <= 0x3F start_column_addr <= 0x7F, end_column_addr <= 0x7F

Definition at line 1619 of file driver_ssd1315.c.

◆ ssd1315_set_vertical_right_horizontal_scroll()

uint8_t ssd1315_set_vertical_right_horizontal_scroll ( ssd1315_handle_t * handle,
ssd1315_horizontal_scroll_t enable,
uint8_t start_page_addr,
uint8_t end_page_addr,
uint8_t vertical_scrolling_offset,
ssd1315_scroll_frame_t frames,
uint8_t start_column_addr,
uint8_t end_column_addr )

set the vertical right horizontal scroll

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]enablebool value
[in]start_page_addrstart page address
[in]end_page_addrend page address
[in]vertical_scrolling_offsetvertical scrolling offset
[in]framesscroll frames
[in]start_column_addrstart column address
[in]end_column_addrend column address
Returns
status code
  • 0 success
  • 1 set vertical right horizontal scroll failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_page_addr is invalid
  • 5 end_page_addr is invalid
  • 6 vertical scrolling offset is invalid
  • 7 start column addr is invalid
  • 8 end column addr is invalid
Note
start_page_addr <= 0x07, end_page_addr <= 0x07, vertical_scrolling_offset <= 0x3F start_column_addr <= 0x7F, end_column_addr <= 0x7F

Definition at line 1538 of file driver_ssd1315.c.

◆ ssd1315_set_vertical_scroll_area()

uint8_t ssd1315_set_vertical_scroll_area ( ssd1315_handle_t * handle,
uint8_t start_row,
uint8_t end_row )

set the vertical scroll area

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]start_rowstart row
[in]end_rowend row
Returns
status code
  • 0 success
  • 1 set vertical scroll area failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 start_row is invalid
  • 5 end_row is invalid
  • 6 end_row > start_row
Note
start_row <= 0x3F, end_row <= 0x7F, start_row >= end_row

Definition at line 1866 of file driver_ssd1315.c.

◆ ssd1315_set_zoom_in()

uint8_t ssd1315_set_zoom_in ( ssd1315_handle_t * handle,
ssd1315_zoom_in_t zoom )

set the display zoom in

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

Definition at line 2201 of file driver_ssd1315.c.

◆ ssd1315_write_point()

uint8_t ssd1315_write_point ( ssd1315_handle_t * handle,
uint8_t x,
uint8_t y,
uint8_t data )

write a point

Parameters
[in]*handlepointer to an ssd1315 handle structure
[in]xcoordinate x
[in]ycoordinate y
[in]datawritten data
Returns
status code
  • 0 success
  • 1 write point failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 x or y is invalid
Note
none

Definition at line 457 of file driver_ssd1315.c.