no-OS
|
Implementation of ssd_1306 Driver. More...
#include <stdbool.h>
#include "ssd_1306.h"
#include "no_os_error.h"
#include "no_os_spi.h"
#include "no_os_delay.h"
#include <string.h>
Macros | |
#define | SSD1306_RST_ON 0U |
#define | SSD1306_RST_OFF 1U |
#define | SSD1306_DC_DATA 1U |
#define | SSD1306_DC_CMD 0U |
#define | SSD1306_DISP_ON 0xAFU |
#define | SSD1306_DISP_OFF 0xAEU |
#define | SSD1306_CHARSZ 8U |
Functions | |
int32_t | ssd_1306_init (struct display_dev *device) |
Initializes ssd_1306 for display screening. More... | |
int32_t | ssd_1306_display_on_off (struct display_dev *device, uint8_t on_off) |
ssd_1306 turns display on/off. More... | |
int32_t | ssd_1306_move_cursor (struct display_dev *device, uint8_t row, uint8_t column) |
Moves cursor to desired row/column. More... | |
int32_t | ssd_1306_print_ascii (struct display_dev *device, uint8_t ascii, uint8_t row, uint8_t column) |
Prints character at selected position. More... | |
int32_t | ssd_1306_remove (struct display_dev *device) |
Removes resources allocated by device. More... | |
Variables | |
const struct display_controller_ops | ssd1306_ops |
const uint8_t | no_os_chr_8x8 [128][8] |
Implementation of ssd_1306 Driver.
Copyright 2021(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SSD1306_CHARSZ 8U |
#define SSD1306_DC_CMD 0U |
#define SSD1306_DC_DATA 1U |
#define SSD1306_DISP_OFF 0xAEU |
#define SSD1306_DISP_ON 0xAFU |
#define SSD1306_RST_OFF 1U |
#define SSD1306_RST_ON 0U |
int32_t ssd_1306_display_on_off | ( | struct display_dev * | device, |
uint8_t | on_off | ||
) |
ssd_1306 turns display on/off.
device | - The device structure |
on_off | - Display state |
int32_t ssd_1306_init | ( | struct display_dev * | device | ) |
Initializes ssd_1306 for display screening.
device | - The device structure. |
int32_t ssd_1306_move_cursor | ( | struct display_dev * | device, |
uint8_t | row, | ||
uint8_t | column | ||
) |
Moves cursor to desired row/column.
device | - The device structure |
row | - row |
column | - column |
int32_t ssd_1306_print_ascii | ( | struct display_dev * | device, |
uint8_t | ascii, | ||
uint8_t | row, | ||
uint8_t | column | ||
) |
Prints character at selected position.
device | - The device structure. |
ascii | - corresponding number to ascii table |
row | - row |
column | - column |
int32_t ssd_1306_remove | ( | struct display_dev * | device | ) |
Removes resources allocated by device.
device | - The device structure. |
const uint8_t no_os_chr_8x8[128][8] |
const struct display_controller_ops ssd1306_ops |