upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions | Protected Attributes
MY9221 Class Reference

Public Member Functions

 MY9221 (int dataPin, int clockPin, int instances=1)
 
virtual ~MY9221 ()
 
void setAutoRefresh (bool enable)
 
void setLED (int led, bool on)
 
void setLowIntensityValue (int intensity)
 
void setHighIntensityValue (int intensity)
 
void setAll ()
 
void clearAll ()
 
void refresh ()
 

Protected Attributes

my9221_context m_my9221
 

Constructor & Destructor Documentation

MY9221 ( int  dataPin,
int  clockPin,
int  instances = 1 
)

Instantiates an MY9221 object

Parameters
dataPinData pin
clockPinClock pin
instancesNumber of daisy-chained my9221s, default 1

Here is the caller graph for this function:

~MY9221 ( )
virtual

MY9221 destructor

Here is the call graph for this function:

Member Function Documentation

void setAutoRefresh ( bool  enable)
inline

Enable or disable auto refresh. When auto refresh is enabled, update the LED display as soon as the internal state changes. When false, the display(s) will not be updated until the refresh() method is called.

Parameters
enabletrue to enable auto refresh, false otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

void setLED ( int  led,
bool  on 
)

Set an LED to a specific on (high intensity) or off (low intensity) value.

Parameters
ledThe LED whose state you wish to change
ontrue to turn on the LED, false to turn the LED off

Here is the call graph for this function:

Here is the caller graph for this function:

void setLowIntensityValue ( int  intensity)

Set the greyscale intensity of an LED in the OFF state. The intensity is a value from 0 (fully off) to 255 (fully on). This will take effect on any future LED set or clear operations.

Parameters
intensitya value from 0 (fully off) to 255 (fully on)

Here is the call graph for this function:

Here is the caller graph for this function:

void setHighIntensityValue ( int  intensity)

Set the greyscale intensity of an LED in the ON state. The intensity is a value from 0 (fully off) to 255 (fully on). This will take effect on any future LED set or clear operations.

Parameters
intensitya value from 0 (fully off) to 255 (fully on)

Here is the call graph for this function:

Here is the caller graph for this function:

void setAll ( )

Set all of the LEDS to the ON (high intensity value) state.

Here is the call graph for this function:

Here is the caller graph for this function:

void clearAll ( )

Set all of the LEDS to the OFF (low intensity value) state.

Here is the call graph for this function:

Here is the caller graph for this function:

void refresh ( )

Set the LED states to match the internal stored states. This is useful when auto refresh (setAutoRefresh()) is false to update the display.

Here is the call graph for this function:

Here is the caller graph for this function:

Inheritance diagram for MY9221:
Inheritance graph
[legend]
Collaboration diagram for MY9221:
Collaboration graph
[legend]

The documentation for this class was generated from the following files: