The base Class , used to store common data & functions for all models types.
More...
#include <TM1638plus_common.h>
|
void | displayBegin () |
| Begin method , sets pin modes and activate display.
|
|
void | reset (void) |
| Reset / clear the display.
|
|
void | brightness (uint8_t brightness) |
| Sets the brightness level of segments in display on a scale of brightness.
|
|
uint8_t | getHFIN_DELAY () const |
|
void | setHFIN_DELAY (uint8_t delay) |
|
uint8_t | getHFOUT_DELAY () const |
|
void | setHFOUT_DELAY (uint8_t delay) |
|
|
uint8_t | HighFreqshiftin (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) |
| Shifts in a byte of data from the Tm1638 SPI-like bus.
|
|
void | HighFreqshiftOut (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) |
| Shifts out a byte of data on to the Tm1638 SPI-like bus.
|
|
void | sendCommand (uint8_t value) |
| Send command to display.
|
|
void | sendData (uint8_t data) |
| Send Data to display.
|
|
The base Class , used to store common data & functions for all models types.
◆ brightness()
void TM1638plus_common::brightness |
( |
uint8_t |
brightness | ) |
|
Sets the brightness level of segments in display on a scale of brightness.
- Parameters
-
brightness | byte with value 0 to 7 The DEFAULT_BRIGHTNESS = 0x02 |
◆ displayBegin()
void TM1638plus_common::displayBegin |
( |
| ) |
|
Begin method , sets pin modes and activate display.
- Note
- Call in Setup() loop
◆ HighFreqshiftin()
uint8_t TM1638plus_common::HighFreqshiftin |
( |
uint8_t |
dataPin, |
|
|
uint8_t |
clockPin, |
|
|
uint8_t |
bitOrder |
|
) |
| |
|
protected |
Shifts in a byte of data from the Tm1638 SPI-like bus.
- Parameters
-
dataPin | Tm1638 Data GPIO |
clockPin | Tm1638 Clock GPIO |
bitOrder | Data byte bit order LSBFIRST OR MSBFIRST, Set to LSBFIRST for Tm1638 |
- Returns
- Data byte
- Note
- Used instead of arduino function "shiftin" when _HIGH_FREQ is set to true, for high frequency CPU's
◆ HighFreqshiftOut()
void TM1638plus_common::HighFreqshiftOut |
( |
uint8_t |
dataPin, |
|
|
uint8_t |
clockPin, |
|
|
uint8_t |
bitOrder, |
|
|
uint8_t |
val |
|
) |
| |
|
protected |
Shifts out a byte of data on to the Tm1638 SPI-like bus.
- Parameters
-
dataPin | Tm1638 Data GPIO |
clockPin | Tm1638 Clock GPIO |
bitOrder | Data byte bit order LSBFIRST OR MSBFIRST, Set to LSBFIRST for Tm1638 |
val | The byte of data to shift out |
- Note
- Used instead of arduino function "shiftOut" when _HIGH_FREQ is set to true, for high frequency CPU's
◆ reset()
void TM1638plus_common::reset |
( |
void |
| ) |
|
Reset / clear the display.
- Note
- The display is cleared by writing zero to all data segment addresses.
◆ sendCommand()
void TM1638plus_common::sendCommand |
( |
uint8_t |
value | ) |
|
|
protected |
Send command to display.
- Parameters
-
value | command byte to send |
◆ sendData()
void TM1638plus_common::sendData |
( |
uint8_t |
data | ) |
|
|
protected |
Send Data to display.
- Parameters
-
◆ _CLOCK_IO
uint8_t TM1638plus_common::_CLOCK_IO |
|
protected |
GPIO connected to CLk on Tm1638
◆ _DATA_IO
uint8_t TM1638plus_common::_DATA_IO |
|
protected |
GPIO connected to DIO on Tm1638
◆ _HFIN_DELAY
uint8_t TM1638plus_common::_HFIN_DELAY = 1 |
|
protected |
uS Delay used by shiftIn function for High-freq MCU
◆ _HFOUT_DELAY
uint8_t TM1638plus_common::_HFOUT_DELAY = 1 |
|
protected |
uS Delay used by shiftOut function for High-freq MCU
◆ _HIGH_FREQ
bool TM1638plus_common::_HIGH_FREQ = false |
|
protected |
Set to true if running high freq CPU.
◆ _STROBE_IO
uint8_t TM1638plus_common::_STROBE_IO |
|
protected |
GPIO connected to STB on Tm1638
◆ TM_ACTIVATE
constexpr uint8_t TM1638plus_common::TM_ACTIVATE = 0x8F |
|
staticconstexprprotected |
◆ TM_BRIGHT_ADR
constexpr uint8_t TM1638plus_common::TM_BRIGHT_ADR = 0x88 |
|
staticconstexprprotected |
◆ TM_BRIGHT_MASK
constexpr uint8_t TM1638plus_common::TM_BRIGHT_MASK = 0x07 |
|
staticconstexprprotected |
◆ TM_BUTTONS_MODE
constexpr uint8_t TM1638plus_common::TM_BUTTONS_MODE = 0x42 |
|
staticconstexprprotected |
◆ TM_DEFAULT_BRIGHTNESS
constexpr uint8_t TM1638plus_common::TM_DEFAULT_BRIGHTNESS = 0x02 |
|
staticconstexprprotected |
Brightness can be 0x00 to 0x07, 0x00 is least bright
◆ TM_DISPLAY_SIZE
constexpr uint8_t TM1638plus_common::TM_DISPLAY_SIZE = 8 |
|
staticconstexprprotected |
Size of display in digits
◆ TM_LEDS_ADR
constexpr uint8_t TM1638plus_common::TM_LEDS_ADR = 0xC1 |
|
staticconstexprprotected |
Leftmost LED address C1 C3 C5 C7 C9 CB CD CF
◆ TM_SEG_ADR
constexpr uint8_t TM1638plus_common::TM_SEG_ADR = 0xC0 |
|
staticconstexprprotected |
Leftmost segment Address C0 C2 C4 C6 C8 CA CC CE
◆ TM_WRITE_INC
constexpr uint8_t TM1638plus_common::TM_WRITE_INC = 0x40 |
|
staticconstexprprotected |
◆ TM_WRITE_LOC
constexpr uint8_t TM1638plus_common::TM_WRITE_LOC = 0x44 |
|
staticconstexprprotected |
Write to a memory location
The documentation for this class was generated from the following files: