lcdmini 2.0.0.0
LCD mini Click Driver

API for configuring and manipulating LCD mini Click driver. More...

Topics

 LCD mini Registers List
 List of registers of LCD mini Click driver.
 
 LCD mini Registers Settings
 Settings for registers of LCD mini Click driver.
 
 LCD mini MikroBUS Map
 MikroBUS pin mapping of LCD mini Click driver.
 

Functions

void lcdmini_cfg_setup (lcdmini_cfg_t *cfg)
 LCD mini configuration object setup function.
 
err_t lcdmini_init (lcdmini_t *ctx, lcdmini_cfg_t *cfg)
 LCD mini initialization function.
 
err_t lcdmini_default_cfg (lcdmini_t *ctx)
 LCD mini default configuration function.
 
err_t lcdmini_generic_write (lcdmini_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 LCD mini data writing function.
 
err_t lcdmini_generic_read (lcdmini_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 LCD mini data reading function.
 
err_t lcdmini_set_duty_cycle (lcdmini_t *ctx, float duty_cycle)
 LCD mini sets PWM duty cycle.
 
err_t lcdmini_pwm_stop (lcdmini_t *ctx)
 LCD mini stop PWM module.
 
err_t lcdmini_pwm_start (lcdmini_t *ctx)
 LCD mini start PWM module.
 
void lcdmini_set_backlight (lcdmini_t *ctx, float backlight_value)
 Set backlight function.
 
void lcdmini_set_contrast (lcdmini_t *ctx, uint8_t contrast_value)
 Set contrast function.
 
uint8_t lcdmini_get_interrupt (lcdmini_t *ctx)
 Get interrupt.
 
void lcdmini_hw_reset (lcdmini_t *ctx)
 Hardware reset function.
 
err_t lcdmini_read_register (lcdmini_t *ctx, uint8_t reg, uint8_t *data_out)
 LCD mini register data reading function.
 
err_t lcdmini_write_register (lcdmini_t *ctx, uint8_t reg, uint8_t data_in)
 LCD mini register data writing function.
 
void lcdmini_send_cmd (lcdmini_t *ctx, uint8_t command)
 LCD mini send command.
 
void lcdmini_send_char (lcdmini_t *ctx, uint8_t character)
 LCD mini send character.
 
void lcdmini_display_char (lcdmini_t *ctx, uint8_t row, uint8_t column, char character)
 LCD mini display character.
 
void lcdmini_display_text (lcdmini_t *ctx, uint8_t row, uint8_t column, char *data_in)
 LCD mini display text.
 

Detailed Description

API for configuring and manipulating LCD mini Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ lcdmini_cfg_setup()

void lcdmini_cfg_setup ( lcdmini_cfg_t * cfg)

LCD mini configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See lcdmini_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ lcdmini_default_cfg()

err_t lcdmini_default_cfg ( lcdmini_t * ctx)

LCD mini default configuration function.

This function executes a default configuration of LCD mini click board.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ lcdmini_display_char()

void lcdmini_display_char ( lcdmini_t * ctx,
uint8_t row,
uint8_t column,
char character )

LCD mini display character.

This function displays specified character to the LCD screen in selected row and column.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]row: Selected row for data to be written.
[in]column: Selected column for data to be written.
[in]character: Character to be written.
Returns
Nothing.

◆ lcdmini_display_text()

void lcdmini_display_text ( lcdmini_t * ctx,
uint8_t row,
uint8_t column,
char * data_in )

LCD mini display text.

This function displays specified character array to the LCD screen in selected row and column.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]row: Selected row for data to be written.
[in]column: Selected column for data to be written.
[in]data_in: Characters to be written.
[in]len: Number of character to be written.
Returns
Nothing.

◆ lcdmini_generic_read()

err_t lcdmini_generic_read ( lcdmini_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

LCD mini data reading function.

This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_generic_write()

err_t lcdmini_generic_write ( lcdmini_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

LCD mini data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_get_interrupt()

uint8_t lcdmini_get_interrupt ( lcdmini_t * ctx)

Get interrupt.

Checks is there a interrupt is active.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
Returns
State of the interrupt pin.

◆ lcdmini_hw_reset()

void lcdmini_hw_reset ( lcdmini_t * ctx)

Hardware reset function.

Hardware reset function of LCD mini Click bord.

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
Returns
Nothing.

◆ lcdmini_init()

err_t lcdmini_init ( lcdmini_t * ctx,
lcdmini_cfg_t * cfg )

LCD mini initialization function.

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

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See lcdmini_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_pwm_start()

err_t lcdmini_pwm_start ( lcdmini_t * ctx)

LCD mini start PWM module.

This function starts the PWM module output.

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_pwm_stop()

err_t lcdmini_pwm_stop ( lcdmini_t * ctx)

LCD mini stop PWM module.

This function stops the PWM module output.

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_read_register()

err_t lcdmini_read_register ( lcdmini_t * ctx,
uint8_t reg,
uint8_t * data_out )

LCD mini register data reading function.

This function reads data byte from the selected register of MCP23S17 by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_send_char()

void lcdmini_send_char ( lcdmini_t * ctx,
uint8_t character )

LCD mini send character.

This function writes a character to the LCD screeen by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]character: Command to be written.
Returns
Nothing.

◆ lcdmini_send_cmd()

void lcdmini_send_cmd ( lcdmini_t * ctx,
uint8_t command )

LCD mini send command.

This function writes a 8-bit data to the LCD screeen by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]command: Command to be written.
Returns
Nothing.

◆ lcdmini_set_backlight()

void lcdmini_set_backlight ( lcdmini_t * ctx,
float backlight_value )

Set backlight function.

The function sets backlight value by setting PWM's duty cycle.

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]backlight_value: Backlight value.
Returns
Nothing.
Note
Backlight value can be a value between 0 and 1.

◆ lcdmini_set_contrast()

void lcdmini_set_contrast ( lcdmini_t * ctx,
uint8_t contrast_value )

Set contrast function.

The function sets contrast by write 8-bit contrast value to the targeted 8-bit register address of MCP4161 on LCD mini Click board.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]contrast_value: 8-bit contrast value.
Returns
Nothing.

◆ lcdmini_set_duty_cycle()

err_t lcdmini_set_duty_cycle ( lcdmini_t * ctx,
float duty_cycle )

LCD mini sets PWM duty cycle.

This function sets the PWM duty cycle in percentages ( Range[ 0..1 ] ).

Parameters
[out]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]duty_cycle: PWM duty cycle.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ lcdmini_write_register()

err_t lcdmini_write_register ( lcdmini_t * ctx,
uint8_t reg,
uint8_t data_in )

LCD mini register data writing function.

This function writes a 8-bit data to the selected register of MCP23S17 by using SPI serial interface.

Parameters
[in]ctx: Click context object. See lcdmini_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.