no-OS
Classes | Typedefs | Functions | Variables
ssd_1306.h File Reference

Header file for ssd_1306 Driver. More...

#include <stdint.h>
#include <stdlib.h>
#include "display.h"
#include "no_os_gpio.h"
Include dependency graph for ssd_1306.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ssd_1306_extra
 Extra parameters needed for ssd_1306 usage. More...
 

Typedefs

typedef struct ssd_1306_extra ssd_1306_extra
 

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
 

Detailed Description

Header file for ssd_1306 Driver.

Author
Andrei Porumb (andre.nosp@m.i.po.nosp@m.rumb@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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.

Typedef Documentation

◆ ssd_1306_extra

Function Documentation

◆ ssd_1306_display_on_off()

int32_t ssd_1306_display_on_off ( struct display_dev device,
uint8_t  on_off 
)

ssd_1306 turns display on/off.

ssd_1306 ssd_1306 turns display on/off.

Parameters
device- The device structure
on_off- Display state
Returns
Returns 0 in case of success or negative error code otherwise.

◆ ssd_1306_init()

int32_t ssd_1306_init ( struct display_dev device)

Initializes ssd_1306 for display screening.

Initialize the ssd_1306 peripheral for display operation.

Parameters
device- The device structure.
Returns
Returns 0 in case of success or negative error code otherwise.

◆ ssd_1306_move_cursor()

int32_t ssd_1306_move_cursor ( struct display_dev device,
uint8_t  row,
uint8_t  column 
)

Moves cursor to desired row/column.

Parameters
device- The device structure
row- row
column- column
Returns
Returns 0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ ssd_1306_print_ascii()

int32_t ssd_1306_print_ascii ( struct display_dev device,
uint8_t  ascii,
uint8_t  row,
uint8_t  column 
)

Prints character at selected position.

Prints character at selected position.

Parameters
device- The device structure.
ascii- corresponding number to ascii table
row- row
column- column
Returns
Returns 0 in case of success or negative error code otherwise.

◆ ssd_1306_remove()

int32_t ssd_1306_remove ( struct display_dev device)

Removes resources allocated by device.

Removes resources allocated by device.

Parameters
device- The device structure.
Returns
Returns 0 in case of success or negative error code otherwise.

Variable Documentation

◆ ssd1306_ops

const struct display_controller_ops ssd1306_ops