oledb  2.0.0.0
Functions
Public Function

Functions

void oledb_cfg_setup (oledb_cfg_t *cfg)
 Configuration Object Setup function. More...
 
err_t oledb_init (oledb_t *ctx, oledb_cfg_t *cfg)
 Click Initialization function. More...
 
void oledb_send_cmd (oledb_t *ctx, oledb_data_t tx_cmd)
 Send cmd function. More...
 
void oledb_send_data (oledb_t *ctx, oledb_data_t *tx_data, uint8_t data_len)
 Send data function. More...
 
void oledb_default_cfg (oledb_t *ctx)
 Click Default Configuration function. More...
 
void oledb_set_page (oledb_t *ctx, oledb_data_t page_addr)
 Page Setting function. More...
 
void oledb_set_column (oledb_t *ctx, oledb_data_t col_addr)
 Column Setting function. More...
 
void oledb_display_picture (oledb_t *ctx, oledb_resources_t *pic)
 Display Picture function. More...
 
void oledb_clear_display (oledb_t *ctx)
 Clear Display function. More...
 
void oledb_write_char (oledb_t *ctx, uint8_t font, uint8_t row, uint8_t position, uint8_t data_in)
 Write Char function. More...
 
void oledb_write_string (oledb_t *ctx, uint8_t font, uint8_t row, uint8_t position, uint8_t *data_in)
 Write String function. More...
 
void oledb_set_contrast (oledb_t *ctx, oledb_data_t value)
 Contrast Setting function. More...
 
void oledb_scroll_right (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Right function. More...
 
void oledb_scroll_left (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Left function. More...
 
void oledb_scroll_diag_right (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Diagonally Right function. More...
 
void oledb_scroll_diag_left (oledb_t *ctx, oledb_data_t start_page_addr, oledb_data_t end_page_addr)
 Scroll Diagonally Left function. More...
 
void oledb_stop_scroll (oledb_t *ctx)
 Stop Scrolling function. More...
 

Detailed Description

Function Documentation

◆ oledb_cfg_setup()

void oledb_cfg_setup ( oledb_cfg_t cfg)

Configuration Object Setup function.

This function initializes Click configuration structure to initial state.

Parameters
[in]cfgClick configuration structure.
Returns
Nothing.
Note
All used pins will be initialized to unconnected state. SPI driver will be activated as default driver.

◆ oledb_clear_display()

void oledb_clear_display ( oledb_t ctx)

Clear Display function.

This function clears SSD1306 controller display.

Parameters
[in]ctxClick object.
Returns
Nothing.

◆ oledb_default_cfg()

void oledb_default_cfg ( oledb_t ctx)

Click Default Configuration function.

This function configures OLED B Click to default state.

Parameters
[in]ctxClick object.
Returns
Nothing.

◆ oledb_display_picture()

void oledb_display_picture ( oledb_t ctx,
oledb_resources_t pic 
)

Display Picture function.

This function allows user to display picture for on the screen.

Parameters
[in]ctxClick object.
[in]picResource code.
Returns
Nothing.

◆ oledb_init()

err_t oledb_init ( oledb_t ctx,
oledb_cfg_t cfg 
)

Click Initialization function.

Parameters
[in]ctxClick object.
[in]cfgClick configuration structure.
Returns
0x00 - Ok, 0xFF - Init error, 0xFD - Invalid driver selector.

This function initializes all necessary peripherals and pins.

◆ oledb_scroll_diag_left()

void oledb_scroll_diag_left ( oledb_t ctx,
oledb_data_t  start_page_addr,
oledb_data_t  end_page_addr 
)

Scroll Diagonally Left function.

This function scrolls the display diagonally to the left.

Parameters
[in]ctxClick object.
[in]start_page_addrStart page address.
[in]end_page_addrEnd page address.
Returns
Nothing.

◆ oledb_scroll_diag_right()

void oledb_scroll_diag_right ( oledb_t ctx,
oledb_data_t  start_page_addr,
oledb_data_t  end_page_addr 
)

Scroll Diagonally Right function.

This function scrolls the display diagonally to the right.

Parameters
[in]ctxClick object.
[in]start_page_addrStart page address.
[in]end_page_addrEnd page address.
Returns
Nothing.

◆ oledb_scroll_left()

void oledb_scroll_left ( oledb_t ctx,
oledb_data_t  start_page_addr,
oledb_data_t  end_page_addr 
)

Scroll Left function.

This function scrolls the display to the left.

Parameters
[in]ctxClick object.
[in]start_page_addrStart page address.
[in]end_page_addrEnd page address.
Returns
Nothing.

◆ oledb_scroll_right()

void oledb_scroll_right ( oledb_t ctx,
oledb_data_t  start_page_addr,
oledb_data_t  end_page_addr 
)

Scroll Right function.

This function scrolls the display to the right.

Parameters
[in]ctxClick object.
[in]start_page_addrStart page address.
[in]end_page_addrEnd page address.
Returns
Nothing.

◆ oledb_send_cmd()

void oledb_send_cmd ( oledb_t ctx,
oledb_data_t  tx_cmd 
)

Send cmd function.

This function sends commands to OLED B Click.

Parameters
[in]ctxClick object.
[in]tx_cmdCommand to be sent.
Returns
Nothing.

◆ oledb_send_data()

void oledb_send_data ( oledb_t ctx,
oledb_data_t tx_data,
uint8_t  data_len 
)

Send data function.

This function sends data to OLED B Click.

Parameters
[in]ctxClick object.
[in]tx_dataData to be sent.
[in]data_lenNumber of data bytes.
Returns
Nothing.

◆ oledb_set_column()

void oledb_set_column ( oledb_t ctx,
oledb_data_t  col_addr 
)

Column Setting function.

This function sets column address for page addressing mode.

Parameters
[in]ctxClick object.
[in]col_addrColumn address.
Returns
Nothing.

◆ oledb_set_contrast()

void oledb_set_contrast ( oledb_t ctx,
oledb_data_t  value 
)

Contrast Setting function.

This function sets the display contrast level (0 to 255).

Parameters
[in]ctxClick object.
[in]valueContrast value to be set.
Returns
Nothing.

◆ oledb_set_page()

void oledb_set_page ( oledb_t ctx,
oledb_data_t  page_addr 
)

Page Setting function.

This function sets page address for page addressing mode.

Parameters
[in]ctxClick object.
[in]page_addrPage address.
Returns
Nothing.

◆ oledb_stop_scroll()

void oledb_stop_scroll ( oledb_t ctx)

Stop Scrolling function.

This function allows user to stop the scrolling motion.

Parameters
[in]ctxClick object.
Returns
Nothing.

◆ oledb_write_char()

void oledb_write_char ( oledb_t ctx,
uint8_t  font,
uint8_t  row,
uint8_t  position,
uint8_t  data_in 
)

Write Char function.

This function writes a single character on the selected position in a 5x7 or 6x8 font size.

Parameters
[in]ctxClick object.
[in]font0 - 5x7 font, 1 - 6x8 font.
[in]rowDisplay row (0-4).
[in]positionChar position in a row (0-((128/char_width)-1)).
[in]data_inCharacter to write (ASCII 32-127).
Returns
Nothing.

◆ oledb_write_string()

void oledb_write_string ( oledb_t ctx,
uint8_t  font,
uint8_t  row,
uint8_t  position,
uint8_t *  data_in 
)

Write String function.

This function writes a text string from the selected position in a 5x7 or 6x8 font size.

Parameters
[in]ctxClick object.
[in]font0 - 5x7 font, 1 - 6x8 font.
[in]rowDisplay row (0-4).
[in]positionChar position in a row (0-((128/char_width)-1)).
[in]data_inText string to write.
Returns
Nothing.