SSD1306 OLED display controller driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <compiler.h>
#include <sysclk.h>
#include <ioport.h>
#include <status_codes.h>
#include <delay.h>
#include "conf_ssd1306.h"
#include <usart_spi.h>
Functions | |
OLED controller write and read functions | |
static void | ssd1306_write_command (uint8_t command) |
Writes a command to the display controller. More... | |
static void | ssd1306_write_data (uint8_t data) |
Write data to the display controller. More... | |
static uint8_t | ssd1306_read_data (void) |
Read data from the controller. More... | |
static uint8_t | ssd1306_get_status (void) |
Read status from the controller. More... | |
OLED Controller reset | |
static void | ssd1306_hard_reset (void) |
Perform a hard reset of the OLED controller. More... | |
Sleep control | |
static void | ssd1306_sleep_enable (void) |
Enable the OLED sleep mode. More... | |
static void | ssd1306_sleep_disable (void) |
Disable the OLED sleep mode. More... | |
Address setup for the OLED | |
static void | ssd1306_set_page_address (uint8_t address) |
Set current page in display RAM. More... | |
static void | ssd1306_set_column_address (uint8_t address) |
Set current column in display RAM. More... | |
static void | ssd1306_set_display_start_line_address (uint8_t address) |
Set the display start draw line address. More... | |
Display hardware control | |
static void | ssd1306_display_on (void) |
Turn the OLED display on. More... | |
static void | ssd1306_display_off (void) |
Turn the OLED display off. More... | |
static uint8_t | ssd1306_set_contrast (uint8_t contrast) |
Set the OLED contrast level. More... | |
static void | ssd1306_display_invert_enable (void) |
Invert all pixels on the device. More... | |
static void | ssd1306_display_invert_disable (void) |
Disable invert of all pixels on the device. More... | |
static void | ssd1306_clear (void) |
Initialization | |
void | ssd1306_init (void) |
Initialize the OLED controller. More... | |
Write text routine | |
void | ssd1306_write_text (const char *string) |
Display text on OLED screen. More... | |