lcdmini 2.0.0.0
lcdmini.h File Reference

This file contains API for LCD mini Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
#include "drv_pwm.h"

Go to the source code of this file.

Data Structures

struct  lcdmini_t
 LCD mini Click context object. More...
 
struct  lcdmini_cfg_t
 LCD mini Click configuration object. More...
 

Macros

#define LCDMINI_IODIRB_BANK0   0x01
 LCD mini description register.
 
#define LCDMINI_OLATB_BANK0   0x15
 
#define LCDMINI_IOCON_BANK0   0x0A
 
#define LCDMINI_ADDRESS_CODE   0x40
 
#define LCDMINI_GPIO_REGISTER   0x09
 
#define LCDMINI_ENABLE   0x08
 LCD mini description setting.
 
#define LCDMINI_RESET   0x04
 
#define LCDMINI_OP_CODE_READ   0x01
 
#define LCDMINI_OP_CODE_WRITE   0xFE
 
#define LCDMINI_CLEAR   0x01
 LCD mini commands.
 
#define LCDMINI_RETURN_HOME   0x02
 
#define LCDMINI_DISPLAY_OFF_CURSOR_OFF   0x08
 
#define LCDMINI_CURSOR_OFF   0x0C
 
#define LCDMINI_UNDERLINE_ON   0x0E
 
#define LCDMINI_BLINK_CURSOR_ON   0x0F
 
#define LCDMINI_MOVE_CURSOR_LEFT   0x10
 
#define LCDMINI_MOVE_CURSOR_RIGHT   0x14
 
#define LCDMINI_TURN_ON   0x0A
 
#define LCDMINI_TURN_OFF   0x0C
 
#define LCDMINI_SHIFT_LEFT   0x18
 
#define LCDMINI_SHIFT_RIGHT   0x1C
 
#define LCDMINI_2_LINE_5X7   0x28
 
#define LCDMINI_FIRST_ROW   0x80
 
#define LCDMINI_SECOND_ROW   0xC0
 
#define LCDMINI_THIRD_ROW   0x94
 
#define LCDMINI_FOURTH_ROW   0xD4
 
#define LCDMINI_DEF_FREQ   500
 LCD mini default PWM frequency.
 
#define LCDMINI_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define LCDMINI_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define LCDMINI_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  lcdmini_return_value_t { LCDMINI_OK = 0 , LCDMINI_ERROR = -1 }
 LCD mini Click return value data. More...
 

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

This file contains API for LCD mini Click Driver.

Enumeration Type Documentation

◆ lcdmini_return_value_t

LCD mini Click return value data.

Predefined enum values for driver return values.

Enumerator
LCDMINI_OK 
LCDMINI_ERROR