|
| TM1638plus_Model2 (uint8_t strobe, uint8_t clock, uint8_t data, int gpioDev, bool swap_nibbles=false) |
| Constructor for class TM1638plus_Model2.
|
|
uint8_t | ReadKey16 (void) |
| Read push buttons method ( one of two methods available)
|
|
uint16_t | ReadKey16Two (void) |
| Read push buttons method ( one of two methods available)
|
|
void | DisplaySegments (uint8_t segment, uint8_t segmentValue) |
| Send seven segment value to display.
|
|
void | DisplayHexNum (uint16_t numberUpper, uint16_t numberLower, uint8_t dots, AlignTextType_e=TMAlignTextLeft) |
| Display an Hexadecimal number in each nibble (4 digits on display)
|
|
void | DisplayDecNum (unsigned long number, uint8_t dots, AlignTextType_e=TMAlignTextLeft) |
| Display an decimal number.
|
|
rdlib::Return_Codes_e | DisplayStr (const char *string, uint16_t dots=0) |
| Display a string, with decimal point display.
|
|
void | ASCIItoSegment (const uint8_t values[]) |
| Takes in Array of 8 ASCII bytes , Called from DisplayStr . Scans each ASCII byte converts to array of 8 segment bytes where each byte represents a segment. Then calls DisplaySegments() method to display segments on display.
|
|
void | DisplayDecNumNibble (uint16_t numberUpper, uint16_t numberLower, uint8_t dots, AlignTextType_e=TMAlignTextLeft) |
| Display an integer in each nibble (4 digits on display)
|
|
| TM1638plus_common (uint8_t strobe, uint8_t clock, uint8_t data, int gpioDev) |
| Constructor for class TM1638plus_common.
|
|
void | reset (void) |
| Reset / clear the display.
|
|
rdlib::Return_Codes_e | displayBegin (void) |
| Begin method , sets pin modes and activate display.
|
|
void | brightness (uint8_t brightness) |
| Sets the brightness level of segments in display on a scale of brightness.
|
|
uint16_t | TMCommDelayGet (void) |
| get the TM comm delay.
|
|
void | TMCommDelayset (uint16_t) |
| set the TM comm delay.
|
|
rdlib::Return_Codes_e | displayClose (void) |
| Close method , frees GPIO and deactivate display.
|
|
|
enum | AlignTextType_e : uint8_t { TMAlignTextRight = 1
, TMAlignTextLeft = 2
, TMAlignTextZeros = 3
} |
|
enum | TMOffsetsMasks : uint8_t { TM_ASCII_OFFSET = 0x20
, TM_HEX_OFFSET = 0x10
, TM_DOT_MASK_DEC = 0x80
, TM_BRIGHT_MASK = 0x07
} |
|
enum | TMCommands : uint8_t {
TM_ACTIVATE = 0x8F
, TM_BUTTONS_MODE = 0x42
, TM_WRITE_LOC = 0x44
, TM_WRITE_INC = 0x40
,
TM_SEG_ADR = 0xC0
, TM_LEDS_ADR = 0xC1
, TM_BRIGHT_ADR = 0x88
} |
|
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.
|
|
uint8_t | _Display_CS |
|
uint8_t | _Display_SDATA |
|
uint8_t | _Display_SCLK |
|
const uint8_t | _TMDisplaySize = 8 |
|
int | _DeviceNumGpioChip = 0 |
|
int | _GpioHandle = 0 |
|
uint16_t TM1638plus_Model2::ReadKey16Two |
( |
void |
| ) |
|
Read push buttons method ( one of two methods available)
- Returns
- A 16 bit integer where each bit correspond to a switch.
- S1 = 0x0001
- S16 = 0x8000
- S1 + S16 together = 0x8001
Data matrix for read key_value. c = datain c3 0110 0110 c2 0110 0110 c1 0110 0110 c0 0110 0110 :uint8_ts read 8,16 7,15 6,14 5,13 4,12 3,11 2,10 1,9 :button value
- Note
- Can detect multiple key presses. However, See notes section in readme regarding, problems with seven segment display when pressing certain keys in combination.