The base Class , used to store common data & functions for all models types.
More...
#include <TM1638plus_common_RDL.hpp>
|
| void | sendCommand (uint8_t value) |
| | Send command to display.
|
| |
| void | sendData (uint8_t data) |
| | Send Data to display.
|
| |
| uint8_t | HighFreqshiftin (void) |
| | Shifts in a byte of data from the Tm1638 SPI-like bus.
|
| |
| void | HighFreqshiftOut (uint8_t val) |
| | Shifts out a byte of data on to the Tm1638 SPI-like bus.
|
| |
|
| static const uint8_t * | pFontSevenSegptr () |
| | Retrieves a pointer to the seven-segment font data table.
|
| |
The base Class , used to store common data & functions for all models types.
◆ AlignTextType_e
Alignment of text on display
| Enumerator |
|---|
| TMAlignTextRight | Align text to the right on display
|
| TMAlignTextLeft | Align text to the left on display
|
| TMAlignTextZeros | Add leading zeros to the text
|
◆ TMCommands
Tm1638 register commands
| Enumerator |
|---|
| TM_ACTIVATE | Start up
|
| TM_BUTTONS_MODE | Buttons mode
|
| TM_WRITE_LOC | Write to a location
|
| TM_WRITE_INC | Incremental write
|
| TM_SEG_ADR | leftmost segment Address C0 C2 C4 C6 C8 CA CC CE
|
| TM_LEDS_ADR | Leftmost LED address C1 C3 C5 C7 C9 CB CD CF
|
| TM_BRIGHT_ADR | Brightness address
|
◆ TMOffsetsMasks
Display Offsets and Masks
| Enumerator |
|---|
| TM_ASCII_OFFSET | 32 Ascii table offset to jump over first missing 32 chars
|
| TM_HEX_OFFSET | 16 Ascii table offset to reach number position
|
| TM_DOT_MASK_DEC | 128 Mask to switch on decimal point in seven seg.
|
| TM_BRIGHT_MASK | Brightness mask
|
◆ TM1638plus_common()
| TM1638plus_common::TM1638plus_common |
( |
uint8_t |
strobe, |
|
|
uint8_t |
clock, |
|
|
uint8_t |
data, |
|
|
int |
gpioDev |
|
) |
| |
Constructor for class TM1638plus_common.
- Parameters
-
| strobe | STB pin |
| clock | CLk pin |
| data | DIO pin |
| gpioDev | The device number of a gpiochip.
|
◆ 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()
◆ displayClose()
◆ HighFreqshiftin()
| uint8_t TM1638plus_common::HighFreqshiftin |
( |
void |
| ) |
|
|
protected |
Shifts in a byte of data from the Tm1638 SPI-like bus.
- Returns
- Data byte
- Note
- _TMCommDelay microsecond delay may have to be adjusted depending on processor
◆ HighFreqshiftOut()
| void TM1638plus_common::HighFreqshiftOut |
( |
uint8_t |
val | ) |
|
|
protected |
Shifts out a byte of data on to the Tm1638 SPI-like bus.
- Parameters
-
| val | The byte of data to shift out |
- Note
- _TMCommDelay microsecond delay may have to be adjusted depending on processor
◆ 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
-
◆ TMCommDelayGet()
| uint16_t TM1638plus_common::TMCommDelayGet |
( |
void |
| ) |
|
get the TM comm delay.
- Returns
- The TM comm delay in uS
◆ TMCommDelayset()
| void TM1638plus_common::TMCommDelayset |
( |
uint16_t |
CommDelay | ) |
|
set the TM comm delay.
- Parameters
-
| CommDelay | The TM comm delay in uS |
◆ _DeviceNumGpioChip
| int TM1638plus_common::_DeviceNumGpioChip = 0 |
|
protected |
The device number of a gpiochip ls /dev/gpio
◆ _Display_CS
| uint8_t TM1638plus_common::_Display_CS |
|
protected |
GPIO connected to STB on Tm1638
◆ _Display_SCLK
| uint8_t TM1638plus_common::_Display_SCLK |
|
protected |
GPIO connected to CLk on Tm1638
◆ _Display_SDATA
| uint8_t TM1638plus_common::_Display_SDATA |
|
protected |
GPIO connected to DIO on Tm1638
◆ _GpioHandle
| int TM1638plus_common::_GpioHandle = 0 |
|
protected |
This returns a handle to a gpiochip device.
◆ _TMCommDelay
| uint16_t TM1638plus_common::_TMCommDelay = 1 |
|
private |
uS delay used in communications , User adjust
◆ _TMDefaultBrightness
| const uint8_t TM1638plus_common::_TMDefaultBrightness = 0x02 |
|
private |
can be 0x00 to 0x07 , User adjust
◆ _TMDisplaySize
| const uint8_t TM1638plus_common::_TMDisplaySize = 8 |
|
protected |
The documentation for this class was generated from the following files: