oledc 2.0.0.0
Public function

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

Function Documentation

◆ oledc_cfg_setup()

void oledc_cfg_setup ( oledc_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ oledc_default_cfg()

void oledc_default_cfg ( oledc_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for OLED C click.

◆ oledc_enable()

void oledc_enable ( oledc_t * ctx,
uint8_t state )

Click Enable/Disable.

Parameters
ctxContext object.
state1 - ON / 0 - OFF.

@description Function allows user to enable or disable the display.

◆ oledc_fill_screen()

void oledc_fill_screen ( oledc_t * ctx,
uint16_t color )

Fill Screen.

Parameters
ctxContext object.
colorRGB color.

@description Function fills an entire screen with the provided color.

◆ oledc_image()

void oledc_image ( oledc_t * ctx,
const uint8_t * img,
uint8_t col_off,
uint8_t row_off )

Draw BMP Image.

Parameters
ctxContext object.
col_offColumn offset from the left border of the screen.
row_offRow offset from the top border of the screen.
imgPointer to bmp image.

@description Function draws image on the screen. Provided image must be in bmp format with 6 bytes header size. Providing image of any other format may result in unpredictable behaviour.

◆ oledc_init()

OLEDC_RETVAL oledc_init ( oledc_t * ctx,
oledc_cfg_t * cfg )

Initialization function.

Parameters
oledcClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ oledc_more_arg_commands()

void oledc_more_arg_commands ( oledc_t * ctx,
uint8_t command,
uint8_t * args,
uint16_t args_len )

Command Send with more argument.

Parameters
ctxContext object.
cmdCommand to be sent.
argsPointer to command argument.
args_lenArgument size in bytes.

@description Function executes a provided command.

◆ oledc_one_arg_commands()

void oledc_one_arg_commands ( oledc_t * ctx,
uint8_t command,
uint8_t args )

Command Send with one argument.

Parameters
ctxContext object.
cmdCommand to be sent.
argsOne command argument.

@description Function executes a provided command.

◆ oledc_rectangle()

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.

Parameters
ctxContext object.
col_offColumn offset from the left border of the screen.
row_offRow offset from the top border of the screen.
col_endColumn end offset also counted from the left border.
row_endRow offset also counted from the top border.
colorRGB color.

@description Function allows user to draw rectangles.

◆ oledc_reset()

void oledc_reset ( oledc_t * ctx)

Click Hardware Reset.

Parameters
ctxContext object.

@description Function performs a hardware reset of the click.

◆ oledc_set_font()

void oledc_set_font ( oledc_t * ctx,
const uint8_t * font_s,
uint16_t color )

Font Setup.

Parameters
ctxContext object.
fontPointer to font definition.
colorText color.

@description Function setup the parameters needed for oledc_text function. Before first usage of the oledc_text it is needed to call this function and setup the all parameters.

◆ oledc_text()

void oledc_text ( oledc_t * ctx,
uint8_t * text,
uint16_t x,
uint16_t y )

Draw Text.

Parameters
ctxContext object.
textText string.
col_offColumn offset from the left border of the screen.
row_offRow offset from the top border of the screen.

@description Function writes text on the screen.