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
Public Member Functions | List of all members
SevenSegTM1639 Class Reference

Models a Seven Segment display hardware controlled by a TM1639 display controller component.
More...

`#include <sevenSegDispHw.h>`

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

## Public Member Functions
| SevenSegTM1639 ()
| Default constructor.
| SevenSegTM1639 (uint8_t *ioPins, uint8_t dspDigits, bool commAnode)
| Class constructor.
| ~SevenSegTM1639 ()
| Default destructor.
Public Member Functions inherited from SevenSegTM163X
| SevenSegTM163X ()
| Default class constructor.
| SevenSegTM163X (uint8_t *ioPins, uint8_t dspDigits, bool commAnode, uint8_t dspContMaxDigits)
| Class constructor.
| ~SevenSegTM163X ()
| Class destructor.
bool | begin (uint32_t updtLps=0)
| Turns On the display to be ready to receive data.
bool | end ()
| Turns Off the display.
virtual uint8_t | getBrghtnssLvl ()
| Returns the current brightness level setting for the display module.
virtual void | ntfyUpdDsply ()
| See SevenSegDispHw::ntfyUpdDsply() for description.
virtual bool | setBrghtnssLvl (const uint8_t &newBrghtnssLvl)
| Sets the Brightness level of the display.
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.
Public Member Functions inherited from SevenSegStatic
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 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.
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.

## Additional Inherited Members
Protected Member Functions inherited from SevenSegTM163X
Protected Member Functions inherited from SevenSegDispHw
Protected Attributes inherited from SevenSegTM163X
uint8_t * | _lclDspBuffPtr {nullptr}
| Pointer to an array of size equal to or less than display module component digits ports, will be equal to or less than display controller component maximum digits/ports. The need for a divided display buffer comes from the fact that some Seven Segment display hardware use controllers with larger digits management capabilities than the display module digits, and the exceeding digits are used for proprietary amenities, as colons, icons, etc.
uint8_t * | _xcdDspBuffPtr {nullptr}
| A pointer to a buffer the size of the exceeding digits used to control display specific amenities.
uint8_t | _xcdDspDigitsQty {}
| Number of unused available display ports, its the difference (_dspDigitsQtyMax - _dspDigitsQty), being the size of the array pointed by _xcdDspBuffPtr.
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

Models a Seven Segment display hardware controlled by a TM1639 display controller component.

The TM1639 is a Titan Micro TM1639 family member, whose differential characteristics from other members of this family (related to this library incumbent attributes) are:

- Maximum number of display ports: 8

## Constructor & Destructor Documentation

## ◆ SevenSegTM1639()

SevenSegTM1639::SevenSegTM1639 | ( | uint8_t * | ioPins,
|  | uint8_t | dspDigits,
|  | bool | commAnode )

Class constructor.

Parameters

  ioPins | A pointer to an array holding the identifiers for the 2 GPIO pins required to send the data to the Seven Segment display hardware to be displayed. The correlation between the array positions and the pin function is given as in-class defined constants: 0->clk, 1->dio
  dspDigits | Quantity of digits/ports of the display. This parameter for this subclass must be in the range 1 <= dspDigits <= 8.
  commAnode | Boolean indicating if the hardware uses a display module component wired as common anode (true) or common cathode (false).