oledw 2.0.0.0
oledw.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  oledw_s
 Click context object definition. More...
 
struct  oledw_cfg_t
 Click configuration structure definition. More...
 

Macros

#define OLEDW_LCDWIDTH   96
 
#define OLEDW_LCDHEIGHT   39
 
#define OLEDW_DISPLAYOFF   0xAE
 
#define OLEDW_SETDISPLAYCLOCKDIV   0xD5
 
#define OLEDW_SETMULTIPLEX   0xA8
 
#define OLEDW_SETDISPLAYOFFSET   0xD3
 
#define OLEDW_SETSTARTLINE   0x40
 
#define OLEDW_CHARGEPUMP   0x8D
 
#define OLEDW_SETSEGMENTREMAP   0xA1
 
#define OLEDW_SEGREMAP   0xA0
 
#define OLEDW_COMSCANDEC   0xC8
 
#define OLEDW_SETCOMPINS   0xDA
 
#define OLEDW_SETCONTRAST   0x81
 
#define OLEDW_SETPRECHARGE   0xD9
 
#define OLEDW_SETVCOMDETECT   0xDB
 
#define OLEDW_DISPLAYALLON_RESUME   0xA4
 
#define OLEDW_NORMALDISPLAY   0xA6
 
#define OLEDW_DISPLAYON   0xAF
 
#define OLEDW_DISPLAYALLON   0xA5
 
#define OLEDW_INVERTDISPLAY   0xA7
 
#define OLEDW_SETLOWCOLUMN   0x00
 
#define OLEDW_SETHIGHCOLUMN   0x10
 
#define OLEDW_MEMORYMODE   0x20
 
#define OLEDW_COLUMNADDR   0x21
 
#define OLEDW_PAGEADDR   0x22
 
#define OLEDW_COMSCANINC   0xC0
 
#define OLEDW_EXTERNALVCC   0x1
 
#define OLEDW_SWITCHCAPVCC   0x2
 
#define OLEDW_ACTIVATE_SCROLL   0x2F
 
#define OLEDW_DEACTIVATE_SCROLL   0x2E
 
#define OLEDW_SET_VERTICAL_SCROLL_AREA   0xA3
 
#define OLEDW_RIGHT_HORIZONTAL_SCROLL   0x26
 
#define OLEDW_LEFT_HORIZONTAL_SCROLL   0x27
 
#define OLEDW_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL   0x29
 
#define OLEDW_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL   0x2A
 
#define OLEDW_COMMAND   0x3C
 
#define OLEDW_DATA   0x3D
 
#define OLEDW_MASTER_I2C   0
 
#define OLEDW_MASTER_SPI   1
 
#define err_t   uint8_t
 
#define OLEDW_OK   0x00
 
#define OLEDW_INIT_ERROR   0xFF
 
#define OLEDW_INVALID_DATA_MODE   0xFE
 
#define OLEDW_INVALID_DRIVER_SELECTOR   0xFD
 
#define OLEDW_MAP_MIKROBUS(cfg, mikrobus)
 

Typedefs

typedef uint8_t oledw_drv_select_t
 
typedef uint8_t oledw_data_t
 
typedef uint8_t oledw_data_mode_t
 
typedef const uint8_t oledw_resources_t
 
typedef err_t(* oledw_master_write_t) (struct oledw_s *, oledw_data_t, oledw_data_mode_t)
 
typedef uint8_t oledw_select_t
 Communication type.
 
typedef struct oledw_s oledw_t
 Click context object definition.
 

Functions

void oledw_cfg_setup (oledw_cfg_t *cfg)
 Configuration Object Setup function.
 
err_t oledw_init (oledw_t *ctx, oledw_cfg_t *cfg)
 Click Initialization function.
 
err_t oledw_send (oledw_t *ctx, oledw_data_t tx_data, oledw_data_mode_t data_mode)
 Send function.
 
void oledw_default_cfg (oledw_t *ctx)
 Click Default Configuration function.
 
void oledw_set_page (oledw_t *ctx, oledw_data_t page_addr)
 Page Setting function.
 
void oledw_set_column (oledw_t *ctx, oledw_data_t col_addr)
 Column Setting function.
 
void oledw_display_picture (oledw_t *ctx, oledw_resources_t *pic)
 Display Picture function.
 
void oledw_set_contrast (oledw_t *ctx, oledw_data_t value)
 Contrast Setting function.
 
void oledw_scroll_right (oledw_t *ctx, oledw_data_t start_page_addr, oledw_data_t end_page_addr)
 Scroll Right function.
 
void oledw_scroll_left (oledw_t *ctx, oledw_data_t start_page_addr, oledw_data_t end_page_addr)
 Scroll Left function.
 
void oledw_scroll_diag_right (oledw_t *ctx, oledw_data_t start_page_addr, oledw_data_t end_page_addr)
 Scroll Diagonally Right function.
 
void oledw_scroll_diag_left (oledw_t *ctx, oledw_data_t start_page_addr, oledw_data_t end_page_addr)
 Scroll Diagonally Left function.
 
void oledw_stop_scroll (oledw_t *ctx)
 Stop Scrolling function.
 

Detailed Description

This file contains API for OLED W Click Driver.