Funktion zum prüfen ob neue Daten gesendet werden können

This commit is contained in:
Carsten Keller 2024-06-09 17:58:21 +02:00
parent 3cd86e1b09
commit cf18393001
Signed by: carsten
GPG Key ID: DF06343A3A9B8868
2 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,11 @@ namespace ElektronischeLast
this->new_data = true;
}
bool Display::ready_for_data(void)
{
return (this->current_state == StateIdle);
}
bool Display::timer_elapsed(void)
{
return (this->timer < systick);

View File

@ -93,6 +93,7 @@ namespace ElektronischeLast
void set_backlight(bool on);
void set_cursor(Line_t line, std::uint32_t position);
void print(const char* const string);
bool ready_for_data(void);
private:
State_t current_state;
State_t next_state;