The base Class , used to store common data & functions for all models types.
More...
#include <TM1638plus_common.h>
|
uint8_t | HighFreqshiftin (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) |
| Shifts in a byte of data from the Tm1638 SPI-like bus. More...
|
|
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. More...
|
|
void | sendCommand (uint8_t value) |
| Send command to display. More...
|
|
void | sendData (uint8_t data) |
| Send Data to display. More...
|
|
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 Font Data Table , map of ASCII values/table to 7-segment, offset to position 32.
◆ 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
◆ _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
The documentation for this class was generated from the following files: