no-OS
ssd_1306.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef SSD_1306_H
41 #define SSD_1306_H
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 #include <stdlib.h>
48 #include "display.h"
49 #include "no_os_gpio.h"
50 
51 /******************************************************************************/
52 /*************************** Types Declarations *******************************/
53 /******************************************************************************/
58 typedef struct ssd_1306_extra {
67  /* SPI initial param */
69  /* SPI descriptor*/
72 
73 extern const struct display_controller_ops ssd1306_ops;
74 /******************************************************************************/
75 /************************ Functions Declarations ******************************/
76 /******************************************************************************/
77 
79 int32_t ssd_1306_init(struct display_dev *device);
80 
82 int32_t ssd_1306_display_on_off(struct display_dev *device, uint8_t on_off);
83 
84 /* Moves cursor to desired row/column. */
85 int32_t ssd_1306_move_cursor(struct display_dev *device, uint8_t row,
86  uint8_t column);
87 
89 int32_t ssd_1306_print_ascii(struct display_dev *device, uint8_t ascii,
90  uint8_t row, uint8_t column);
91 
93 int32_t ssd_1306_remove(struct display_dev *device);
94 
95 #endif
no_os_chr_8x8
const uint8_t no_os_chr_8x8[128][8]
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
ssd_1306_init
int32_t ssd_1306_init(struct display_dev *device)
Initializes ssd_1306 for display screening.
Definition: ssd_1306.c:82
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.
Definition: ssd_1306.c:192
ssd_1306_init
int32_t ssd_1306_init(struct display_dev *device)
Initializes ssd_1306 for display screening.
Definition: ssd_1306.c:82
ssd_1306_extra::reset_pin
struct no_os_gpio_desc * reset_pin
Definition: ssd_1306.h:66
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.
Definition: ssd_1306.c:224
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:82
SSD1306_CHARSZ
#define SSD1306_CHARSZ
Definition: ssd_1306.c:60
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.
Definition: ssd_1306.c:170
ssd_1306_remove
int32_t ssd_1306_remove(struct display_dev *device)
Removes resources allocated by device.
Definition: ssd_1306.c:248
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.
Definition: ssd_1306.c:192
no_os_spi.h
Header file of SPI Interface.
no_os_delay.h
Header file of Delay functions.
ssd1306_ops
const struct display_controller_ops ssd1306_ops
Definition: ssd_1306.c:62
device
Definition: ad9361_util.h:75
ssd_1306_extra::dc_pin
struct no_os_gpio_desc * dc_pin
Definition: ssd_1306.h:64
ssd_1306_remove
int32_t ssd_1306_remove(struct display_dev *device)
Removes resources allocated by device.
Definition: ssd_1306.c:248
ssd1306_ops
const struct display_controller_ops ssd1306_ops
Definition: ssd_1306.c:62
display_controller_ops
Structure holding display controller function pointers that point to the controller specific function...
Definition: display.h:88
ssd_1306.h
Header file for ssd_1306 Driver.
SSD1306_DISP_OFF
#define SSD1306_DISP_OFF
Definition: ssd_1306.c:59
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.
Definition: ssd_1306.c:224
SSD1306_DC_CMD
#define SSD1306_DC_CMD
Definition: ssd_1306.c:57
no_os_error.h
Error codes definition.
ssd_1306_extra
struct ssd_1306_extra ssd_1306_extra
display_controller_ops::init
int32_t(* init)(struct display_dev *)
Definition: display.h:90
SSD1306_RST_OFF
#define SSD1306_RST_OFF
Definition: ssd_1306.c:55
ssd_1306_extra::dc_pin_ip
struct no_os_gpio_init_param * dc_pin_ip
Definition: ssd_1306.h:60
no_os_gpio_remove
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:95
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
display_dev
Display Device Descriptor.
Definition: display.h:57
ssd_1306_extra::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ssd_1306.h:70
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
SSD1306_DISP_ON
#define SSD1306_DISP_ON
Definition: ssd_1306.c:58
SSD1306_DC_DATA
#define SSD1306_DC_DATA
Definition: ssd_1306.c:56
no_os_gpio_get
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
ssd_1306_extra
Extra parameters needed for ssd_1306 usage.
Definition: ssd_1306.h:58
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.
Definition: ssd_1306.c:170
display.h
Header file for display Driver.
ssd_1306_extra::reset_pin_ip
struct no_os_gpio_init_param * reset_pin_ip
Definition: ssd_1306.h:62
ssd_1306_extra::spi_ip
struct no_os_spi_init_param * spi_ip
Definition: ssd_1306.h:68
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: delay.c:118
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:160
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:70
no_os_gpio.h
Header file of GPIO Interface.
SSD1306_RST_ON
#define SSD1306_RST_ON
Definition: ssd_1306.c:54
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:51
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:124
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112