1
0
MAX7456JSON/lib/DisplayProxy/DisplayProxyMAX7456.h
Jens True 50160cc0b4
All checks were successful
continuous-integration/drone/push Build is passing
Fix warnings
2021-11-10 10:19:03 +00:00

79 lines
1.9 KiB
C++

/**
* @file DisplayProxyMAX7456.h
* @author Jens True (jens.chr.true@gmail.com)
* @brief DisplayProxyMAX7456 header
* @version 0.1
* @date 2021-11-10
*
* @copyright Copyright (c) 2021
*
*/
#ifndef DISPLAYPROXYMAX7456_H
#define DISPLAYPROXYMAX7456_H
#include "DisplayProxy.h"
#include "max7456.h"
/**
* Text-User-Interface on a MAX7456
*
* The MAX7456 provides On-Screen-Display rendering for composite video.
* (Think old school VCR menu overlay)
*
* To find the offical documentation for the part please refer to the Maxim page for the MAX7456.
* [Maxim Page](https://www.maximintegrated.com/en/products/analog/video-products/MAX7456.html)
*
*/
class DisplayProxyMAX7456 : public DisplayProxy
{
public:
/**
* Initalize a MAX7456 Style display
* - Initialize with CS on Pin 6.
* - Clear the display
* - Initialize blinking frequency.
* - Disable external video
* - Enable OSD.
*/
explicit DisplayProxyMAX7456();
/**
* OSD on, external video left untouched.
*/
bool on() override;
/**
* OSD off, external video off.
*/
bool off() override;
/**
* Depending on the font loaded into the Max7456 the output might not be ASCII compatible.
*/
bool write(int x, int y, const char *text) override;
bool clear() override;
/**
* Adjust the display offset.
* Since the signal is analog the characters might be rendered outside the display area
*/
bool setOffset(int x, int y);
/**
* Turn off the external video feed
* If the external feed is disabled the background will be grey
* @param enabled True to turn on the external video input
*/
bool externalVideo(bool enabled);
/**
* Turn on the overlay
*
* @param enabled True to turn on the overlay
*/
bool onScreenDisplay(bool enabled);
private:
Max7456 *osd;
};
#endif