oledc  2.0.0.0
Functions
Public Function

Functions

void oledc_cfg_setup (oledc_cfg_t *cfg)
 Configuartion Object Setup. More...
 
int8_t oledc_init (oledc_t *ctx, oledc_cfg_t *cfg)
 Click Initialization. More...
 
void oledc_default_cfg (oledc_t *ctx)
 Click Default Configuration. More...
 
void oledc_reset (oledc_t *ctx)
 Click Hardware Reset. More...
 
void oledc_enable (oledc_t *ctx, uint8_t state)
 Click Enable/Disable. More...
 
void oledc_command (oledc_t *ctx, uint8_t cmd, uint8_t *args, uint16_t args_len)
 Command Send. More...
 
void oledc_fill_screen (oledc_t *ctx, uint16_t color)
 Fill Screen. More...
 
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. More...
 
void oledc_image (oledc_t *ctx, const uint8_t *img, uint8_t column_off, uint8_t row_off)
 Draw BMP Image. More...
 
void oledc_text (oledc_t *ctx, uint8_t *text, uint16_t col_off, uint16_t row_off)
 Draw Text. More...
 
void oledc_set_font (oledc_t *ctx, const uint8_t *font, uint16_t color, uint8_t orientation)
 Font Setup. More...
 
void oledc_fill_area (oledc_t *ctx, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right, uint16_t color)
 Fill Area. More...
 
void oledc_begin_frame (oledc_t *ctx, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right)
 Begin Frame. More...
 
void oledc_frame_data (oledc_t *ctx, uint16_t color)
 Frame Data. More...
 
void oledc_end_frame (oledc_t *ctx)
 End Frame. More...
 

Detailed Description

Function Documentation

◆ oledc_begin_frame()

void oledc_begin_frame ( oledc_t ctx,
uint16_t  top,
uint16_t  left,
uint16_t  bottom,
uint16_t  right 
)

Begin Frame.

Parameters
ctxContext object.
topRow offset from the top border of the screen for start point.
leftColumn offset from the left border of the screen for start point.
bottomRow offset from the top border of the screen for end point.
rightColumn offset from the left border of the screen for end point.

Function allows user to begin the frame with the selected coordinates.

◆ oledc_cfg_setup()

void oledc_cfg_setup ( oledc_cfg_t cfg)

Configuartion Object Setup.

Parameters
cfgConfiguration object.

Function initializes click configuration structure to initial state.

Note
All used pins will be set to unconnected state.

◆ oledc_command()

void oledc_command ( oledc_t ctx,
uint8_t  cmd,
uint8_t *  args,
uint16_t  args_len 
)

Command Send.

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

Function executes a provided command.

◆ oledc_default_cfg()

void oledc_default_cfg ( oledc_t ctx)

Click Default Configuration.

Parameters
ctxContext object.

Function executes a default configuration of the click.

◆ oledc_enable()

void oledc_enable ( oledc_t ctx,
uint8_t  state 
)

Click Enable/Disable.

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

Function allows user to enable or disable the display.

◆ oledc_end_frame()

void oledc_end_frame ( oledc_t ctx)

End Frame.

Parameters
ctxContext object.

Function allows user to end a started frame.

◆ oledc_fill_area()

void oledc_fill_area ( oledc_t ctx,
uint16_t  top,
uint16_t  left,
uint16_t  bottom,
uint16_t  right,
uint16_t  color 
)

Fill Area.

Parameters
ctxContext object.
topRow offset from the top border of the screen for start point.
leftColumn offset from the left border of the screen for start point.
bottomRow offset from the top border of the screen for end point.
rightColumn offset from the left border of the screen for end point.
colorRGB color.

Function fills a selected area with the desired color.

◆ oledc_fill_screen()

void oledc_fill_screen ( oledc_t ctx,
uint16_t  color 
)

Fill Screen.

Parameters
ctxContext object.
colorRGB color.

Function fills an entire screen with the provided color.

◆ oledc_frame_data()

void oledc_frame_data ( oledc_t ctx,
uint16_t  color 
)

Frame Data.

Parameters
ctxContext object.
colorRGB color.

Function allows user to enter a desired color of the frame data.

◆ oledc_image()

void oledc_image ( oledc_t ctx,
const uint8_t *  img,
uint8_t  column_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.

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()

int8_t oledc_init ( oledc_t ctx,
oledc_cfg_t cfg 
)

Click Initialization.

Parameters
ctxContext object.
cfgConfiguration object.
Returns
0 - Ok, -1 - SPI init error.

Function initializes function pointers and performs a setup of SSD1351 module.

◆ 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.

Function allows user to draw rectangles.

◆ oledc_reset()

void oledc_reset ( oledc_t ctx)

Click Hardware Reset.

Parameters
ctxContext object.

Function performs a hardware reset of the click.

◆ oledc_set_font()

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

Font Setup.

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

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  col_off,
uint16_t  row_off 
)

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.

Function writes text on the screen.