15 namespace duds {
namespace hardware {
namespace devices {
namespace displays {
64 std::vector<duds::hardware::interface::DigitalPinConfig>
outcfg;
157 const std::uint16_t *start,
158 const std::uint16_t *end,
218 std::chrono::nanoseconds delay = std::chrono::nanoseconds(8000)
270 std::chrono::nanoseconds delay = std::chrono::nanoseconds(8000)
duds::hardware::interface::DigitalPinSetAccess output
The set used for the 4 data pins and the text flag, more commonly referred to as "RS".
Implements graphic output to the ST7920 LCD controller using a 4-bit parallel interface.
Provides access to multiple pins on a DigitalPort.
void preparePins(Access &acc)
Obtains access to the pins and configures them for output.
Unsupported display-side write flag.
ST7920()
Initializes the object with an invalid display size and no pins to use.
void on()
Commands the display to turn on.
duds::hardware::interface::DigitalPinSet outputs
Represents the 5 output lines, other than enable, that are needed to communicate with the LCD...
duds::hardware::interface::ChipAccess enable
Used to assert the enable line of the LCD.
Stores access objects together.
An object to wrap together a ChipSelectManager and chip ID to simplify code that needs to repeatedly ...
std::chrono::nanoseconds nibblePeriod
The amount of time to allow the display to read data.
void initialize()
Initializes the display for use.
Represents a set of pins on a single DigitalPort.
Flag for sending text to the display rather than a command.
An object used to provide chip select control to a single user at a time.
Flag to send only a nibble rather than a whole byte; used in display initalization.
void off()
Commands the display to turn off.
virtual ~ST7920()
Calls off().
virtual void outputFrame(const duds::ui::graphics::BppImage *img)
Writes out only the changed portions of the image to the display, and updates the image in frmbuf to ...
std::chrono::high_resolution_clock::time_point soonestSend
The soonest time a new command can be sent to the display.
void sendByte(Access &acc, int val)
Sends a byte to the display a nibble at a time.
General data mask for the display.
Base class for bit-per-pixel graphic displays.
void configure(duds::hardware::interface::DigitalPinSet &&outPins, duds::hardware::interface::ChipSelect &&enablePin, unsigned int w, unsigned int h, std::chrono::nanoseconds delay=std::chrono::nanoseconds(8000))
Sets the pins to use for communicating with the display.
void wait() const
Waits until the time in soonestSend has passed.
An image that uses a single bit to represent the state of each pixel; a black or white picture...
void writeBlock(ST7920::Access &acc, const std::uint16_t *start, const std::uint16_t *end, int pos)
Writes a contiguous block of pixel data to the display after setting the next location to write...
std::vector< duds::hardware::interface::DigitalPinConfig > outcfg
The best output configuration for the display bus given the port in use.
duds::hardware::interface::ChipSelect enable
Used to represent the enable line of the LCD.