libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
lcd_hd44780.h
Go to the documentation of this file.
1#pragma once
2#ifndef DSY_LCD_HD44780_H
3#define DSY_LCD_HD44780_H
4
5#include "daisy_core.h"
6#include "per/gpio.h"
7
8
9namespace daisy
10{
20{
21 public:
24
25 struct Config
26 {
29 Pin rs, en, d4, d5, d6, d7;
30 };
31
36 void Init(const Config &config);
37
42 void Print(const char *string);
43
48 void PrintInt(int number);
49
55 void SetCursor(uint8_t row, uint8_t col);
56
60 void Clear();
61
62 private:
63 bool cursor_on;
64 bool cursor_blink;
65 GPIO lcd_pin_rs;
66 GPIO lcd_pin_en;
67 GPIO lcd_data_pin[4]; // D4-D7
68
69 void WriteData(uint8_t);
70 void WriteCommand(uint8_t);
71 void Write(uint8_t, uint8_t);
72};
73
74} // namespace daisy
75
76#endif
General Purpose I/O control.
Definition gpio.h:22
Device Driver for 16x2 LCD panel. HD44780 with 4 data lines. Example product: https://www....
Definition lcd_hd44780.h:20
void Print(const char *string)
void Init(const Config &config)
void PrintInt(int number)
LcdHD44780()
Definition lcd_hd44780.h:22
~LcdHD44780()
Definition lcd_hd44780.h:23
void SetCursor(uint8_t row, uint8_t col)
Hardware defines and helpers for daisy field platform.
Definition index.h:2
Definition lcd_hd44780.h:26
Pin d5
Definition lcd_hd44780.h:29
Pin rs
Definition lcd_hd44780.h:29
bool cursor_blink
Definition lcd_hd44780.h:28
bool cursor_on
Definition lcd_hd44780.h:27
Pin d6
Definition lcd_hd44780.h:29
Pin en
Definition lcd_hd44780.h:29
Pin d4
Definition lcd_hd44780.h:29
Pin d7
Definition lcd_hd44780.h:29
representation of hardware port/pin combination
Definition daisy_core.h:193