2023-11-07 13:43:20 +00:00
|
|
|
#include <user_code.hpp>
|
2023-09-03 09:28:01 +00:00
|
|
|
#include <lcd.hpp>
|
|
|
|
|
2023-11-07 13:43:20 +00:00
|
|
|
void lcd_send_stop_bit()
|
|
|
|
{
|
|
|
|
#ifdef ENABLE_INTERNAL_LCD
|
2023-09-03 09:28:01 +00:00
|
|
|
Serial.write(0xFF);
|
|
|
|
Serial.write(0xFF);
|
|
|
|
Serial.write(0xFF);
|
2023-11-07 13:43:20 +00:00
|
|
|
#endif
|
2023-09-03 09:28:01 +00:00
|
|
|
}
|
|
|
|
|
2023-11-07 13:43:20 +00:00
|
|
|
void lcd_send_command(String command)
|
|
|
|
{
|
|
|
|
#ifdef ENABLE_INTERNAL_LCD
|
2023-09-03 09:28:01 +00:00
|
|
|
lcd_send_stop_bit();
|
|
|
|
Serial.print(command);
|
|
|
|
lcd_send_stop_bit();
|
2023-11-07 13:43:20 +00:00
|
|
|
#endif
|
2023-09-03 09:28:01 +00:00
|
|
|
}
|
|
|
|
|
2023-11-07 13:43:20 +00:00
|
|
|
void lcd_reset()
|
|
|
|
{
|
|
|
|
#ifdef ENABLE_INTERNAL_LCD
|
2023-09-03 09:28:01 +00:00
|
|
|
lcd_send_stop_bit();
|
|
|
|
lcd_send_command("rest");
|
|
|
|
lcd_send_stop_bit();
|
2023-11-07 13:43:20 +00:00
|
|
|
#endif
|
2023-09-03 09:28:01 +00:00
|
|
|
}
|
|
|
|
|
2023-11-07 13:43:20 +00:00
|
|
|
void lcd_init()
|
|
|
|
{
|
|
|
|
#ifdef ENABLE_INTERNAL_LCD
|
2023-09-03 09:28:01 +00:00
|
|
|
lcd_reset();
|
|
|
|
delay(750);
|
2023-11-07 13:43:20 +00:00
|
|
|
#endif
|
2023-09-03 09:28:01 +00:00
|
|
|
}
|