oledc 2.0.0.0
oledc.h File Reference

This file contains API for OLED C Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  oledc_t
 Click ctx object definition. More...
 
struct  oledc_cfg_t
 Click configuration structure definition. More...
 

Macros

#define OLEDC_MAP_MIKROBUS(cfg, mikrobus)
 
#define OLEDC_RETVAL   uint8_t
 
#define OLEDC_OK   0x00
 
#define OLEDC_INIT_ERROR   0xFF
 
#define OLEDC_FO_HORIZONTAL   0x00
 
#define OLEDC_FO_VERTICAL   0x01
 
#define OLEDC_FO_VERTICAL_COLUMN   0x02
 
#define OLEDC_RMP_INC_HOR   0x00
 
#define OLEDC_RMP_INC_VER   0x01
 
#define OLEDC_RMP_COLOR_NOR   0x00
 
#define OLEDC_RMP_COLOR_REV   0x02
 
#define OLEDC_RMP_SEQ_RGB   0x00
 
#define OLEDC_RMP_SEQ_BGR   0x04
 
#define OLEDC_RMP_SCAN_NOR   0x00
 
#define OLEDC_RMP_SCAN_REV   0x10
 
#define OLEDC_RMP_SPLIT_DISABLE   0x00
 
#define OLEDC_RMP_SPLIT_ENABLE   0x20
 
#define OLEDC_COLOR_65K   0x00
 
#define OLEDC_COLOR_262K   0x80
 
#define OLEDC_IMG_HEAD   0x06
 
#define OLEDC_SCREEN_WIDTH   0x60
 
#define OLEDC_SCREEN_HEIGHT   0x60
 
#define OLEDC_SCREEN_SIZE   0x2400
 
#define OLEDC_ROW_OFF   0x00
 
#define OLEDC_COL_OFF   0x10
 
#define OLEDC_SET_COL_ADDRESS   0x15
 
#define OLEDC_SET_ROW_ADDRESS   0x75
 
#define OLEDC_WRITE_RAM   0x5C
 
#define OLEDC_READ_RAM   0x5D
 
#define OLEDC_SET_REMAP   0xA0
 
#define OLEDC_SET_START_LINE   0xA1
 
#define OLEDC_SET_OFFSET   0xA2
 
#define OLEDC_MODE_OFF   0xA4
 
#define OLEDC_MODE_ON   0xA5
 
#define OLEDC_MODE_NORMAL   0xA6
 
#define OLEDC_MODE_INVERSE   0xA7
 
#define OLEDC_FUNCTION   0xAB
 
#define OLEDC_SLEEP_ON   0xAE
 
#define OLEDC_SLEEP_OFF   0xAF
 
#define OLEDC_NOP   0xB0
 
#define OLEDC_SET_RESET_PRECH   0xB1
 
#define OLEDC_ENHANCEMENT   0xB2
 
#define OLEDC_CLOCK_DIV   0xB3
 
#define OLEDC_VSL   0xB4
 
#define OLEDC_GPIO   0xB5
 
#define OLEDC_SETSEC_PRECH   0xB6
 
#define OLEDC_GREY_SCALE   0xB8
 
#define OLEDC_LUT   0xB9
 
#define OLEDC_PRECH_VOL   0xBB
 
#define OLEDC_VCOMH   0xBE
 
#define OLEDC_CONTRAST   0xC1
 
#define OLEDC_MASTER_CONTRAST   0xC7
 
#define OLEDC_MUX_RATIO   0xCA
 
#define OLEDC_COMMAND_LOCK   0xFD
 
#define OLEDC_SCROLL_HOR   0x96
 
#define OLEDC_START_MOV   0x9E
 
#define OLEDC_STOP_MOV   0x9F
 
#define OLEDC_DEFAULT_MUX_RATIO   95
 
#define OLEDC_DEFAULT_START_LINE   0x80
 
#define OLEDC_DEFAULT_OFFSET   0x20
 
#define OLEDC_DEFAULT_OLED_LOCK   0x12
 
#define OLEDC_DEFAULT_CMD_LOCK   0xB1
 
#define OLEDC_DEFAULT_DIVSET   0xF1
 
#define OLEDC_DEFAULT_PRECHARGE   0x32
 
#define OLEDC_DEFAULT_VCOMH   0x05
 
#define OLEDC_DEFAULT_MASTER_CONT   0xCF
 
#define OLEDC_DEFAULT_PRECHARGE_2   0x01
 

Functions

void oledc_cfg_setup (oledc_cfg_t *cfg)
 Config Object Initialization function.
 
OLEDC_RETVAL oledc_init (oledc_t *ctx, oledc_cfg_t *cfg)
 Initialization function.
 
void oledc_default_cfg (oledc_t *ctx)
 Click Default Configuration function.
 
void oledc_enable (oledc_t *ctx, uint8_t state)
 Click Enable/Disable.
 
void oledc_reset (oledc_t *ctx)
 Click Hardware Reset.
 
void oledc_more_arg_commands (oledc_t *ctx, uint8_t command, uint8_t *args, uint16_t args_len)
 Command Send with more argument.
 
void oledc_one_arg_commands (oledc_t *ctx, uint8_t command, uint8_t args)
 Command Send with one argument.
 
void oledc_fill_screen (oledc_t *ctx, uint16_t color)
 Fill Screen.
 
void oledc_rectangle (oledc_t *ctx, uint8_t col_off, uint8_t row_off, uint8_t col_end, uint8_t row_end, uint16_t color)
 Draw Rectangle.
 
void oledc_image (oledc_t *ctx, const uint8_t *img, uint8_t col_off, uint8_t row_off)
 Draw BMP Image.
 
void oledc_text (oledc_t *ctx, uint8_t *text, uint16_t x, uint16_t y)
 Draw Text.
 
void oledc_set_font (oledc_t *ctx, const uint8_t *font_s, uint16_t color)
 Font Setup.
 

Detailed Description

This file contains API for OLED C Click driver.