lcdmini 2.0.0.0
|
API for configuring and manipulating LCD mini Click driver. More...
Modules | |
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. More... | |
err_t | lcdmini_init (lcdmini_t *ctx, lcdmini_cfg_t *cfg) |
LCD mini initialization function. More... | |
err_t | lcdmini_default_cfg (lcdmini_t *ctx) |
LCD mini default configuration function. More... | |
err_t | lcdmini_generic_write (lcdmini_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
LCD mini data writing function. More... | |
err_t | lcdmini_generic_read (lcdmini_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
LCD mini data reading function. More... | |
err_t | lcdmini_set_duty_cycle (lcdmini_t *ctx, float duty_cycle) |
LCD mini sets PWM duty cycle. More... | |
err_t | lcdmini_pwm_stop (lcdmini_t *ctx) |
LCD mini stop PWM module. More... | |
err_t | lcdmini_pwm_start (lcdmini_t *ctx) |
LCD mini start PWM module. More... | |
void | lcdmini_set_backlight (lcdmini_t *ctx, float backlight_value) |
Set backlight function. More... | |
void | lcdmini_set_contrast (lcdmini_t *ctx, uint8_t contrast_value) |
Set contrast function. More... | |
uint8_t | lcdmini_get_interrupt (lcdmini_t *ctx) |
Get interrupt. More... | |
void | lcdmini_hw_reset (lcdmini_t *ctx) |
Hardware reset function. More... | |
err_t | lcdmini_read_register (lcdmini_t *ctx, uint8_t reg, uint8_t *data_out) |
LCD mini register data reading function. More... | |
err_t | lcdmini_write_register (lcdmini_t *ctx, uint8_t reg, uint8_t data_in) |
LCD mini register data writing function. More... | |
void | lcdmini_send_cmd (lcdmini_t *ctx, uint8_t command) |
LCD mini send command. More... | |
void | lcdmini_send_char (lcdmini_t *ctx, uint8_t character) |
LCD mini send character. More... | |
void | lcdmini_display_char (lcdmini_t *ctx, uint8_t row, uint8_t column, char character) |
LCD mini display character. More... | |
void | lcdmini_display_text (lcdmini_t *ctx, uint8_t row, uint8_t column, char *data_in) |
LCD mini display text. More... | |
API for configuring and manipulating LCD mini Click driver.
void lcdmini_cfg_setup | ( | lcdmini_cfg_t * | cfg | ) |
LCD mini configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See lcdmini_cfg_t object definition for detailed explanation. |
err_t lcdmini_default_cfg | ( | lcdmini_t * | ctx | ) |
LCD mini default configuration function.
This function executes a default configuration of LCD mini click board.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
0
- Success, -1
- Error.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.
[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. |
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.
[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. |
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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.uint8_t lcdmini_get_interrupt | ( | lcdmini_t * | ctx | ) |
Get interrupt.
Checks is there a interrupt is active.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
void lcdmini_hw_reset | ( | lcdmini_t * | ctx | ) |
Hardware reset function.
Hardware reset function of LCD mini Click bord.
[out] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error.err_t lcdmini_pwm_start | ( | lcdmini_t * | ctx | ) |
LCD mini start PWM module.
This function starts the PWM module output.
[out] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t lcdmini_pwm_stop | ( | lcdmini_t * | ctx | ) |
LCD mini stop PWM module.
This function stops the PWM module output.
[out] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | character | : Command to be written. |
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.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | command | : Command to be written. |
void lcdmini_set_backlight | ( | lcdmini_t * | ctx, |
float | backlight_value | ||
) |
Set backlight function.
The function sets backlight value by setting PWM's duty cycle.
[out] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | backlight_value | : Backlight value. |
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.
[in] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | contrast_value | : 8-bit contrast value. |
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 ] ).
[out] | ctx | : Click context object. See lcdmini_t object definition for detailed explanation. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.