This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
DeviceLib/Lcd.h

38 lines
514 B
C
Raw Normal View History

2017-02-24 20:45:37 +00:00
#pragma once
#include <stdint.h>
class Lcd
{
public:
union Command
{
struct
{
bool DB0: 1;
bool DB1: 1;
bool DB2: 1;
bool DB3: 1;
bool DB4: 1;
bool DB5: 1;
bool DB6: 1;
bool DB7: 1;
};
uint8_t data;
};
public:
void initDisplay();
void clear();
void output(const char &character);
void output(const char *string);
2017-03-02 07:16:35 +00:00
void output(const uint16_t val);
2017-02-24 20:45:37 +00:00
private:
void setPos(const uint8_t &pos);
2017-03-02 07:16:35 +00:00
virtual void execute(const Command &cmd, bool RS, uint16_t delay_us) = 0;
2017-02-24 20:45:37 +00:00
};