45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
/**
|
|
*
|
|
* Implementation of LcdMenu::CharacterDisplayInterface
|
|
* For the Adafruit Character LCD Serial backpack. Which per their docs
|
|
* has a similar interface to the "Matrix Orbital Specification"
|
|
* @see https://learn.adafruit.com/usb-plus-serial-backpack/command-reference
|
|
*/
|
|
#ifndef __ADAFRUITVFDDISPINTERFACE_H__
|
|
#define __ADAFRUITVFDDISPINTERFACE_H__
|
|
|
|
#include <display/CharacterDisplayInterface.h>
|
|
|
|
class AdafruitVfdDisplay : public CharacterDisplayInterface {
|
|
public:
|
|
AdafruitVfdDisplay(UART& lcdUart);
|
|
|
|
// interface implementations
|
|
|
|
void createChar(uint8_t id, uint8_t* c) override;
|
|
void drawBlinker() override;
|
|
void clearBlinker() override;
|
|
void begin() override;
|
|
void clear() override;
|
|
|
|
/// @brief turn display on, showing previously displayed text
|
|
void show() override;
|
|
|
|
/// @brief turn display off so text is no longer visible (but still present).
|
|
void hide() override;
|
|
void draw(uint8_t byte) override;
|
|
void draw(const char* text) override;
|
|
|
|
/// @brief Move display cursor to specified position
|
|
/// TODO: 0 based or 1-based col/row position???
|
|
/// @param col
|
|
/// @param row
|
|
void setCursor(uint8_t col, uint8_t row) override;
|
|
void setBacklight(bool enabled) override;
|
|
|
|
private:
|
|
UART &m_lcdUart;
|
|
};
|
|
|
|
#endif /* __ADAFRUITVFDDISPINTERFACE_H__ */
|