LCD 1602 Driver with ESP32 I2C 1.1
This is a complete driver for LCD 1602 using I2C with the ESP32
Loading...
Searching...
No Matches

Macros

#define LCD_1602_CONFIG_INPUT_SET(dir, mov)
 Macro for setting the correct movement of the cursor. Use together with:
#define LCD_1602_CONFIG_DISPLAY_SWITCH(disp, curs, blink)
 Macro for configuring the display settings. Use together with;.
#define LCD_1602_SHIFT(ele, dir)
 Macro for moving the cursor or the display. User together with:
#define LCD_1602_FUNCTION_SET(dl, r, f)
 Macro for configuring the lcd screens function. Use together with:

Detailed Description

Macro Definition Documentation

◆ LCD_1602_CONFIG_DISPLAY_SWITCH

#define LCD_1602_CONFIG_DISPLAY_SWITCH ( disp,
curs,
blink )
Value:
#define LCD_1602_DISPLAY_SWITCH_FLAG
#define LCD_1602_DISPLAY_SWITCH_MASK

Macro for configuring the display settings. Use together with;.

  • LCD_1602_DISPLAY_ON
  • LCD_1602_DISPLAY_OFF
  • LCD_1602_CURSOR_ON
  • LCD_1602_CURSOR_OFF
  • LCD_1602_BLINK_DISPLAY
  • LCD_1602_N_BLINK_DISPLAY
Parameters
dispif the display should be turned on or off. LCD_1602_DISPLAY_ON | LCD_1602_DISPLAY_OFF
cursif the cursor should be turned on or off. LCD_1602_CURSOR_ON | LCD_1602_CURSOR_OFF
blinkif the screen should blink or not. LCD_1602_BLINK_DISPLAY | LCD_1602_N_BLINK_DISPLAY
Note
the macro do not change the register, but returns a bitfield to be written to a register.

Definition at line 104 of file lcd_1602_internal.h.

◆ LCD_1602_CONFIG_INPUT_SET

#define LCD_1602_CONFIG_INPUT_SET ( dir,
mov )
Value:
#define LCD_1602_INPUT_SET
#define LCD_1602_INPUT_SET_MASK

Macro for setting the correct movement of the cursor. Use together with:

  • LCD_1602_INCREMENT_MODE
  • LCD_1602_DECREMENT_MODE
  • LCD_1602_CURSOR_MOVE_ON_WRITE
  • LCD_1602_CURSOR_N_MOVE
Parameters
dirthe direction to move the cursor. LCD_1602_INCREMENT_MODE for forward | LCD_1602_DECREMENT_MODE for backwards
movif the cursor should move when bytes are written. LCD_1602_CURSOR_MOVE_ON_WRITE or LCD_1602_CURSOR_N_MOVE
Note
the macro do not change the register, but returns a bitfield to be written to a register.

Definition at line 87 of file lcd_1602_internal.h.

◆ LCD_1602_FUNCTION_SET

#define LCD_1602_FUNCTION_SET ( dl,
r,
f )
Value:
#define LCD_1602_FUNCTION_SET_MASK
#define LCD_1602_FUNCTION_SET_FLAG

Macro for configuring the lcd screens function. Use together with:

  • LCD_1602_DATA_LEN_8_BIT
  • LCD_1602_DATA_LEN_4_BIT
  • LCD_1602_2_ROWS
  • LCD_1602_1_ROW
  • LCD_1602_FONT_5X10
  • LCD_1602_FONT_5X7
Parameters
dlsignifies the data-length of read/write. LCD_1602_DATA_LEN_8_BIT | LCD_1602_DATA_LEN_4_BIT
rsets the amount of rows used. LCD_1602_2_ROWS | LCD_1602_1_ROW
fsets the font to be used. LCD_1602_FONT_5X10 | LCD_1602_FONT_5X7
Note
the macro do not change the register, but returns a bitfield to be written to a register.

Definition at line 135 of file lcd_1602_internal.h.

◆ LCD_1602_SHIFT

#define LCD_1602_SHIFT ( ele,
dir )
Value:
#define LCD_1602_SHIFT_BITMASK
#define LCD_1602_SHIFT_FLAG

Macro for moving the cursor or the display. User together with:

  • LCD_1602_CURSOR_MOVE
  • LCD_1602_DISPLAY_SHIFT
  • LCD_1602_SHIFT_LEFT
  • LCD_1602_SHIFT_RIGHT
Parameters
elethe element to be moved. LCD_1602_CURSOR_MOVE for cursor | LCD_1602_DISPLAY_SHIFT for whole display
dirthe direction to move. LCD_1602_SHIFT_LEFT | LCD_1602_SHIFT_RIGHT
Note
the macro do not change the register, but returns a bitfield to be written to a register.

Definition at line 118 of file lcd_1602_internal.h.