oledb 2.0.0.0
oledb.h File Reference

This file contains API for OLED B Click Driver. More...

#include "drv_digital_out.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "oledb_resources.h"

Go to the source code of this file.

Data Structures

struct  oledb_s
 Click context object definition. More...
 
struct  oledb_cfg_t
 Click configuration structure definition. More...
 

Macros

#define OLEDB_SSD1306_WIDTH   128
 
#define OLEDB_DISPLAY_WIDTH   96
 
#define OLEDB_DISPLAY_HEIGHT   39
 
#define OLEDB_DISPLAY_ROWS   5
 
#define OLEDB_FONT_5X7   0
 
#define OLEDB_FONT_6X8   1
 
#define OLEDB_DISPLAYOFF   0xAE
 
#define OLEDB_SETDISPLAYCLOCKDIV   0xD5
 
#define OLEDB_SETMULTIPLEX   0xA8
 
#define OLEDB_SETDISPLAYOFFSET   0xD3
 
#define OLEDB_SETSTARTLINE   0x40
 
#define OLEDB_CHARGEPUMP   0x8D
 
#define OLEDB_SETSEGMENTREMAP   0xA1
 
#define OLEDB_SEGREMAP   0xA0
 
#define OLEDB_COMSCANDEC   0xC8
 
#define OLEDB_SETCOMPINS   0xDA
 
#define OLEDB_SETCONTRAST   0x81
 
#define OLEDB_SETPRECHARGE   0xD9
 
#define OLEDB_SETVCOMDETECT   0xDB
 
#define OLEDB_DISPLAYALLON_RESUME   0xA4
 
#define OLEDB_NORMALDISPLAY   0xA6
 
#define OLEDB_DISPLAYON   0xAF
 
#define OLEDB_DISPLAYALLON   0xA5
 
#define OLEDB_INVERTDISPLAY   0xA7
 
#define OLEDB_SETLOWCOLUMN   0x00
 
#define OLEDB_SETHIGHCOLUMN   0x10
 
#define OLEDB_MEMORYMODE   0x20
 
#define OLEDB_COLUMNADDR   0x21
 
#define OLEDB_PAGEADDR   0x22
 
#define OLEDB_COMSCANINC   0xC0
 
#define OLEDB_EXTERNALVCC   0x01
 
#define OLEDB_SWITCHCAPVCC   0x02
 
#define OLEDB_ACTIVATE_SCROLL   0x2F
 
#define OLEDB_DEACTIVATE_SCROLL   0x2E
 
#define OLEDB_SET_VERTICAL_SCROLL_AREA   0xA3
 
#define OLEDB_RIGHT_HORIZONTAL_SCROLL   0x26
 
#define OLEDB_LEFT_HORIZONTAL_SCROLL   0x27
 
#define OLEDB_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL   0x29
 
#define OLEDB_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL   0x2A
 
#define OLEDB_COMMAND   0x3C
 
#define OLEDB_DATA   0x3D
 
#define OLEDB_MASTER_I2C   0
 
#define OLEDB_MASTER_SPI   1
 
#define err_t   uint8_t
 
#define OLEDB_OK   0x00
 
#define OLEDB_INIT_ERROR   0xFF
 
#define OLEDB_INVALID_DATA_MODE   0xFE
 
#define OLEDB_INVALID_DRIVER_SELECTOR   0xFD
 
#define OLEDB_MAP_MIKROBUS(cfg, mikrobus)
 

Typedefs

typedef uint8_t oledb_drv_select_t
 
typedef uint8_t oledb_data_t
 
typedef const uint8_t oledb_resources_t
 
typedef void(* oledb_master_write_t) (struct oledb_s *, oledb_data_t *, uint8_t)
 
typedef uint8_t oledb_select_t
 Communication type.
 
typedef struct oledb_s oledb_t
 Click context object definition.
 

Functions

void oledb_cfg_setup (oledb_cfg_t *cfg)
 Configuration Object Setup function.
 
err_t oledb_init (oledb_t *ctx, oledb_cfg_t *cfg)
 Click Initialization function.
 
void oledb_send_cmd (oledb_t *ctx, oledb_data_t tx_cmd)
 Send cmd function.
 
void oledb_send_data (oledb_t *ctx, oledb_data_t *tx_data, uint8_t data_len)
 Send data function.
 
void oledb_default_cfg (oledb_t *ctx)
 Click Default Configuration function.
 
void oledb_set_page (oledb_t *ctx, oledb_data_t page_addr)
 Page Setting function.
 
void oledb_set_column (oledb_t *ctx, oledb_data_t col_addr)
 Column Setting function.
 
void oledb_display_picture (oledb_t *ctx, oledb_resources_t *pic)
 Display Picture function.
 
void oledb_clear_display (oledb_t *ctx)
 Clear Display function.
 
void oledb_write_char (oledb_t *ctx, uint8_t font, uint8_t row, uint8_t position, uint8_t data_in)
 Write Char function.
 
void oledb_write_string (oledb_t *ctx, uint8_t font, uint8_t row, uint8_t position, uint8_t *data_in)
 Write String function.
 
void oledb_set_contrast (oledb_t *ctx, oledb_data_t value)
 Contrast Setting function.
 
void oledb_scroll_right (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Right function.
 
void oledb_scroll_left (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Left function.
 
void oledb_scroll_diag_right (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Diagonally Right function.
 
void oledb_scroll_diag_left (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Diagonally Left function.
 
void oledb_stop_scroll (oledb_t *ctx)
 Stop Scrolling function.
 

Detailed Description

This file contains API for OLED B Click Driver.