Wim Huiskamp / TM1650

Dependents:   mbed_TM1650

Embed: (wiki syntax)

« Back to documentation index

TM1650 Class Reference

TM1650 Class Reference

A class for driving TM1650 LED controller. More...

#include <TM1650.h>

Inherited by TM1650_MEIBAI.

Public Types

typedef char DisplayData_t [TM1650_DISPLAY_MEM]
 Datatype for displaydata.
typedef char KeyData_t
 Datatypes for keymatrix data.

Public Member Functions

 TM1650 (PinName dio, PinName clk)
 Constructor for class for driving TM1650 LED controller.
void cls ()
 Clear the screen and locate to 0.
void writeData (char data, int address)
 Write databyte to TM1650.
void writeData (DisplayData_t data, int length=(TM1650_MAX_NR_GRIDS *TM1650_BYTES_PER_GRID), int address=0)
 Write Display datablock to TM1650.
bool getKeys (KeyData_t *keydata)
 Read keydata block from TM1650.
void setBrightness (char brightness=TM1650_BRT_DEF)
 Set Brightness.
void setDisplay (bool on)
 Set the Display mode On/off.

Detailed Description

A class for driving TM1650 LED controller.

Supports 4 Grids @ 8 Segments and upto 28 Keys. Serial bus interface device.

Definition at line 169 of file TM1650.h.


Member Typedef Documentation

typedef char DisplayData_t[TM1650_DISPLAY_MEM]

Datatype for displaydata.

Definition at line 173 of file TM1650.h.

typedef char KeyData_t

Datatypes for keymatrix data.

Definition at line 176 of file TM1650.h.


Constructor & Destructor Documentation

TM1650 ( PinName  dio,
PinName  clk 
)

Constructor for class for driving TM1650 LED controller.

Constructor for class for driving TM1650 LED controller with Serial bus interface device.

Supports 4 Grids @ 8 segments and 28 Keys. Serial bus interface device.

Parameters:
PinNamedio Serial bus DIO pin
PinNamesck Serial bus CLK pin

Supports 4 digits @ 8 segments. Also supports upto 28 Keys.

Parameters:
PinNamedio Serial bus DIO pin
PinNameclk Serial bus CLK pin

Definition at line 31 of file TM1650.cpp.


Member Function Documentation

void cls (  )

Clear the screen and locate to 0.

Definition at line 64 of file TM1650.cpp.

bool getKeys ( KeyData_t keydata )

Read keydata block from TM1650.

Parameters:
*keydataPtr to bytes for keydata
Returns:
bool keypress True when at least one key was pressed

Definition at line 143 of file TM1650.cpp.

void setBrightness ( char  brightness = TM1650_BRT_DEF )

Set Brightness.

Parameters:
charbrightness (3 significant bits, valid range 0..7 (1/16 .. 14/16 dutycycle)
Returns:
none
Parameters:
charbrightness (3 significant bits, valid range 0..7 (1/16 .. 14/14 dutycycle)
Returns:
none

Definition at line 80 of file TM1650.cpp.

void setDisplay ( bool  on )

Set the Display mode On/off.

Parameters:
booldisplay mode
Returns:
none
Parameters:
booldisplay mode

Definition at line 91 of file TM1650.cpp.

void writeData ( char  data,
int  address 
)

Write databyte to TM1650.

Parameters:
chardata byte written at given address
intaddress display memory location to write byte
Returns:
none
Parameters:
intaddress display memory location to write byte
chardata byte written at given address
Returns:
none

Reimplemented in TM1650_MEIBAI.

Definition at line 108 of file TM1650.cpp.

void writeData ( DisplayData_t  data,
int  length = (TM1650_MAX_NR_GRIDS * TM1650_BYTES_PER_GRID),
int  address = 0 
)

Write Display datablock to TM1650.

Parameters:
DisplayData_tdata Array of TM1650_DISPLAY_MEM (=4) bytes for displaydata
lengthnumber bytes to write (valid range 0..(TM1650_MAX_NR_GRIDS * TM1650_BYTES_PER_GRID) (=4), when starting at address 0)
intaddress display memory location to write bytes (default = 0)
Returns:
none

Reimplemented in TM1650_MEIBAI.

Definition at line 124 of file TM1650.cpp.