no-OS
ssd_1306.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef SSD_1306_H
35 #define SSD_1306_H
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdint.h>
41 #include <stdlib.h>
42 #include "display.h"
43 #include "no_os_gpio.h"
44 
45 /******************************************************************************/
46 /*************************** Types Declarations *******************************/
47 /******************************************************************************/
52 typedef struct ssd_1306_extra {
61  /* SPI initial param */
63  /* SPI descriptor*/
66 
67 extern const struct display_controller_ops ssd1306_ops;
68 /******************************************************************************/
69 /************************ Functions Declarations ******************************/
70 /******************************************************************************/
71 
73 int32_t ssd_1306_init(struct display_dev *device);
74 
76 int32_t ssd_1306_display_on_off(struct display_dev *device, uint8_t on_off);
77 
78 /* Moves cursor to desired row/column. */
79 int32_t ssd_1306_move_cursor(struct display_dev *device, uint8_t row,
80  uint8_t column);
81 
83 int32_t ssd_1306_print_ascii(struct display_dev *device, uint8_t ascii,
84  uint8_t row, uint8_t column);
85 
87 int32_t ssd_1306_remove(struct display_dev *device);
88 
89 #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:79
ssd_1306_init
int32_t ssd_1306_init(struct display_dev *device)
Initializes ssd_1306 for display screening.
Definition: ssd_1306.c:76
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:186
ssd_1306_init
int32_t ssd_1306_init(struct display_dev *device)
Initializes ssd_1306 for display screening.
Definition: ssd_1306.c:76
ssd_1306_extra::reset_pin
struct no_os_gpio_desc * reset_pin
Definition: ssd_1306.h:60
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:218
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:159
SSD1306_CHARSZ
#define SSD1306_CHARSZ
Definition: ssd_1306.c:54
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:164
ssd_1306_remove
int32_t ssd_1306_remove(struct display_dev *device)
Removes resources allocated by device.
Definition: ssd_1306.c:242
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:186
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:56
device
Definition: ad9361_util.h:69
ssd_1306_extra::dc_pin
struct no_os_gpio_desc * dc_pin
Definition: ssd_1306.h:58
ssd_1306_remove
int32_t ssd_1306_remove(struct display_dev *device)
Removes resources allocated by device.
Definition: ssd_1306.c:242
ssd1306_ops
const struct display_controller_ops ssd1306_ops
Definition: ssd_1306.c:56
display_controller_ops
Structure holding display controller function pointers that point to the controller specific function...
Definition: display.h:82
ssd_1306.h
Header file for ssd_1306 Driver.
SSD1306_DISP_OFF
#define SSD1306_DISP_OFF
Definition: ssd_1306.c:53
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:218
SSD1306_DC_CMD
#define SSD1306_DC_CMD
Definition: ssd_1306.c:51
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:84
SSD1306_RST_OFF
#define SSD1306_RST_OFF
Definition: ssd_1306.c:49
ssd_1306_extra::dc_pin_ip
struct no_os_gpio_init_param * dc_pin_ip
Definition: ssd_1306.h:54
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:104
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
display_dev
Display Device Descriptor.
Definition: display.h:51
ssd_1306_extra::spi_desc
struct no_os_spi_desc * spi_desc
Definition: ssd_1306.h:64
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
SSD1306_DISP_ON
#define SSD1306_DISP_ON
Definition: ssd_1306.c:52
SSD1306_DC_DATA
#define SSD1306_DC_DATA
Definition: ssd_1306.c:50
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:49
ssd_1306_extra
Extra parameters needed for ssd_1306 usage.
Definition: ssd_1306.h:52
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:164
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:56
ssd_1306_extra::spi_ip
struct no_os_spi_init_param * spi_ip
Definition: ssd_1306.h:62
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
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:197
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:116
no_os_gpio.h
Header file of GPIO Interface.
SSD1306_RST_ON
#define SSD1306_RST_ON
Definition: ssd_1306.c:48
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:52
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:147
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140