2019-09-04 15:28:38 +02:00
|
|
|
#ifndef DISPLAYPROXYMAX7456_H
|
|
|
|
#define DISPLAYPROXYMAX7456_H
|
|
|
|
|
|
|
|
#include "DisplayProxy.h"
|
|
|
|
#include "max7456.h"
|
|
|
|
|
2021-10-28 14:44:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Text-User-Interface on a Max7456
|
|
|
|
*
|
|
|
|
* The Max7456 provides On-Screen-Display rendering for composite video.
|
|
|
|
* (Think old school VCR menu overlay)
|
|
|
|
*
|
|
|
|
* @link https://www.maximintegrated.com/en/products/analog/video-products/MAX7456.html
|
|
|
|
*/
|
2019-09-04 15:28:38 +02:00
|
|
|
class DisplayProxyMAX7456 : public DisplayProxy
|
|
|
|
{
|
|
|
|
public:
|
2021-10-28 14:44:20 +00:00
|
|
|
/**
|
|
|
|
* Initalize a Max7456 Style display
|
|
|
|
* - Initialize with CS on Pin 6.
|
|
|
|
* - Clear the display
|
|
|
|
* - Initialize blinking frequency.
|
|
|
|
* - Disable external video
|
|
|
|
* - Enable OSD.
|
|
|
|
*/
|
2021-10-28 11:50:57 +00:00
|
|
|
explicit DisplayProxyMAX7456(Max7456 *osd);
|
|
|
|
|
2021-10-28 14:44:20 +00:00
|
|
|
/**
|
|
|
|
* OSD on, external video left untouched.
|
|
|
|
*/
|
|
|
|
bool on();
|
|
|
|
/**
|
|
|
|
* OSD off, external video off.
|
|
|
|
*/
|
|
|
|
bool off();
|
|
|
|
/**
|
|
|
|
* Depending on the font loaded into the Max7456 the output might not be ASCII compatible.
|
|
|
|
*/
|
2021-10-28 11:50:57 +00:00
|
|
|
bool write(int x, int y, const char *text) override;
|
|
|
|
bool clear() override;
|
2021-10-28 14:44:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adjust the display offset.
|
|
|
|
* Since the signal is analog the characters might be rendered outside the display area
|
|
|
|
*/
|
|
|
|
bool setOffset(int x, int y);
|
2021-10-28 11:50:57 +00:00
|
|
|
bool externalVideo(bool enabled);
|
|
|
|
bool onScreenDisplay(bool enabled);
|
2019-09-04 15:28:38 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Max7456 *osd;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|