oledc 2.0.0.0
|
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. | |
void oledc_cfg_setup | ( | oledc_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void oledc_default_cfg | ( | oledc_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for OLED C click.
void oledc_enable | ( | oledc_t * | ctx, |
uint8_t | state ) |
Click Enable/Disable.
ctx | Context object. |
state | 1 - ON / 0 - OFF. |
@description Function allows user to enable or disable the display.
void oledc_fill_screen | ( | oledc_t * | ctx, |
uint16_t | color ) |
Fill Screen.
ctx | Context object. |
color | RGB color. |
@description Function fills an entire screen with the provided color.
void oledc_image | ( | oledc_t * | ctx, |
const uint8_t * | img, | ||
uint8_t | col_off, | ||
uint8_t | row_off ) |
Draw BMP Image.
ctx | Context object. |
col_off | Column offset from the left border of the screen. |
row_off | Row offset from the top border of the screen. |
img | Pointer 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_RETVAL oledc_init | ( | oledc_t * | ctx, |
oledc_cfg_t * | cfg ) |
Initialization function.
oledc | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void oledc_more_arg_commands | ( | oledc_t * | ctx, |
uint8_t | command, | ||
uint8_t * | args, | ||
uint16_t | args_len ) |
Command Send with more argument.
ctx | Context object. |
cmd | Command to be sent. |
args | Pointer to command argument. |
args_len | Argument size in bytes. |
@description Function executes a provided command.
void oledc_one_arg_commands | ( | oledc_t * | ctx, |
uint8_t | command, | ||
uint8_t | args ) |
Command Send with one argument.
ctx | Context object. |
cmd | Command to be sent. |
args | One command argument. |
@description Function executes a provided command.
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.
ctx | Context object. |
col_off | Column offset from the left border of the screen. |
row_off | Row offset from the top border of the screen. |
col_end | Column end offset also counted from the left border. |
row_end | Row offset also counted from the top border. |
color | RGB color. |
@description Function allows user to draw rectangles.
void oledc_reset | ( | oledc_t * | ctx | ) |
Click Hardware Reset.
ctx | Context object. |
@description Function performs a hardware reset of the click.
void oledc_set_font | ( | oledc_t * | ctx, |
const uint8_t * | font_s, | ||
uint16_t | color ) |
Font Setup.
ctx | Context object. |
font | Pointer to font definition. |
color | Text 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.
void oledc_text | ( | oledc_t * | ctx, |
uint8_t * | text, | ||
uint16_t | x, | ||
uint16_t | y ) |
Draw Text.
ctx | Context object. |
text | Text string. |
col_off | Column offset from the left border of the screen. |
row_off | Row offset from the top border of the screen. |
@description Function writes text on the screen.