Seven Segments Displays Agnostic Library for ESP32 (Arduino) v3.1.0 A library that provides a class that models a Seven Segment Display and provides an unified API through it's members independently of the display technology.

Loading...
Searching...
No Matches
List of all members
SevenSegStatic Class Referenceabstract

Abstract class that models displays that don't need permanent MCU data updating to keep the data correctly displayed. More...

`#include <sevenSegDispHw.h>`

Inheritance diagram for SevenSegStatic:
[legend]
Collaboration diagram for SevenSegStatic:
[legend]

## Additional Inherited Members
Public Member Functions inherited from SevenSegDispHw
| SevenSegDispHw ()
| Default class constructor.
| SevenSegDispHw (uint8_t *ioPins, uint8_t dspDigits=4, bool commAnode=true)
| Class constructor.
virtual | ~SevenSegDispHw ()
| Class destructor.
virtual bool | begin (uint32_t updtLps=0)
| Sets up the hardware display to work, and starts the display activities.
virtual bool | end ()
| Reverts the begin(uint32_t) actions, stopping the display activities, turning the display off and freeing the resources used by the Seven Segment display hardware object.
virtual uint8_t | getBrghtnssLvl ()
| Returns the current display brightness level setting for the display.
virtual uint8_t | getBrghtnssMaxLvl ()
| Returns the maximum display brightness level setting allowed for the display.
virtual uint8_t | getBrghtnssMinLvl ()
| Returns the minimum display brightness level setting for the display.
bool | getCommAnode ()
| Returns a value indicating if the display module component of the display hardware uses a common anode or a common cathode led wiring.
uint8_t * | getDspBuffPtr ()
| Returns a pointer to the display buffer.
uint8_t | getHwDspDigitsQty ()
| Returns the quantity of digits of the display module.
virtual bool | getIsOn ()
| Returns the state of the display.
virtual void | ntfyUpdDsply ()
| Notifies the SevenSegDispHw component object of a change of content available in the display buffer, so that the object proceeds to update the display.
virtual bool | setBrghtnssLvl (const uint8_t &newBrghtnssLvl)
| Sets the brightness level for the display.
bool | setDigitsOrder (uint8_t *newOrderPtr)
| Sets a mapping to relate the display buffer positions to the display port assigned to exhibit it's contents.
void | setDspBuffPtr (uint8_t *newDspBuffPtr)
| Sets the pointer to the Display Buffer memory area.
virtual void | turnOff ()
| Turns the display module off.
virtual void | turnOn ()
| Turns the display module on.
virtual void | turnOn (const uint8_t &newBrghtnssLvl)
| Turns the display module on set at the provided brightness level.
Protected Member Functions inherited from SevenSegDispHw
Protected Attributes inherited from SevenSegDispHw
uint8_t | _allLedsOff {}
| Value to set in the display port to set all leds off (a "space"), dependent of _commAnode.
uint8_t | _brghtnssLvl {0}
| Current display brightness level.
uint8_t | _brghtnssLvlMax {0}
| Maximum display brightness level.
uint8_t | _brghtnssLvlMin {0}
| Minimum display brightness level.
uint8_t * | _dspBlankBuffPtr {nullptr}
| Pointer to a display buffer filled with _allLedsOff ("spaces") to use as display buffer while in "Off State".
uint8_t * | _dspBuffPtr {nullptr}
| Pointer to the display buffer, will be provided by the SevenSegDisplays object when it's instantiated.
uint8_t * | _dspBuffPtrBkp {nullptr}
| Pointer to the display buffer, copy of the original **_dspBuffPtr** to be used as backup.
bool | _isOn {false}
| Current display status: On/Off.

## Detailed Description

Abstract class that models displays that don't need permanent MCU data updating to keep the data correctly displayed.

The lack of need of periodic intervention from the MCU implies that the display controller component includes a "display driver" chip (or chipset) that takes care of the display update and refreshing. So this is a base class for Seven Segment display hardware based on different display controller component chips. The MCU sends the data to be displayed and the chip required commands through diverse channels and protocols depending on the specific chip.
The chip then connects to the display module component through their output pins. The hardware developer might decide to implement the display module component wiring according to the project requirements, but all the chips modeled by this class and it's subclasses share the same characteristics:

- They provide 8 pins for the seven segments + DP ports.
- They provide 1 pin per digit/port supported by the specific chip.

Note
  NONE of the driver chips controlling the displays modeled by the SevenSegStatic subclasses includes COLONS, ICONS or any other amenity some display module component includes, this class and it's subclasses model generic use chip drivers for seven segment display modules. For these chips the activation of those colons and/or icons is provided by the use of some of the existing described chip pins in a display module proprietary exclusive way, and are described in those display modules' datasheet. Some of those mechanisms are:
  - Have less display ports than the maximum supported by the chip, and use one or more segments of the exceeding ports wired to the colon/s or icon/s of the display.
  - Use an external source to activate the colon/s or icon/s independently from the driving chip.
  - Wire one or more of the visible display ports DP segments to the colon/s or icon/s of the display.

Warning
  Using displays that implement the colon/s and/or icon/s through the DP segments of the active ports make the display unfit to display decimal non integer values, as no DP might be used. Verify the display module characteristics to setup the corresponding class with the right parameters.