LibDriver SSD1315
Loading...
Searching...
No Matches
driver_ssd1315.h File Reference

driver ssd1315 header file More...

#include <stdint.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for driver_ssd1315.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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

Macros

#define DRIVER_SSD1315_LINK_INIT(HANDLE, STRUCTURE)
 initialize ssd1315_handle_t structure
#define DRIVER_SSD1315_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_SSD1315_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_SSD1315_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_SSD1315_LINK_SPI_INIT(HANDLE, FUC)
 link spi_init function
#define DRIVER_SSD1315_LINK_SPI_DEINIT(HANDLE, FUC)
 link spi_deinit function
#define DRIVER_SSD1315_LINK_SPI_WRITE_COMMAND(HANDLE, FUC)
 link spi_write_cmd function
#define DRIVER_SSD1315_LINK_SPI_COMMAND_DATA_GPIO_INIT(HANDLE, FUC)
 link spi_cmd_data_gpio_init function
#define DRIVER_SSD1315_LINK_SPI_COMMAND_DATA_GPIO_DEINIT(HANDLE, FUC)
 link spi_cmd_data_gpio_deinit function
#define DRIVER_SSD1315_LINK_SPI_COMMAND_DATA_GPIO_WRITE(HANDLE, FUC)
 link spi_cmd_data_gpio_write function
#define DRIVER_SSD1315_LINK_RESET_GPIO_INIT(HANDLE, FUC)
 link reset_gpio_init function
#define DRIVER_SSD1315_LINK_RESET_GPIO_DEINIT(HANDLE, FUC)
 link reset_gpio_deinit function
#define DRIVER_SSD1315_LINK_RESET_GPIO_WRITE(HANDLE, FUC)
 link reset_gpio_write function
#define DRIVER_SSD1315_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_SSD1315_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

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
uint8_t ssd1315_write_cmd (ssd1315_handle_t *handle, uint8_t *buf, uint8_t len)
 write the register command
uint8_t ssd1315_write_data (ssd1315_handle_t *handle, uint8_t *buf, uint8_t len)
 write the register data

Detailed Description

driver ssd1315 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2024-11-30

history

Date Version Author Description
2024/11/30 1.0 Shifeng Li first upload

Definition in file driver_ssd1315.h.