upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _my9221_context |
Functions | |
my9221_context | my9221_init (int dataPin, int clockPin, int instances) |
void | my9221_close (my9221_context dev) |
void | my9221_set_auto_refresh (const my9221_context dev, bool enable) |
void | my9221_set_led (const my9221_context dev, int led, bool on) |
void | my9221_set_low_intensity_value (const my9221_context dev, int intensity) |
void | my9221_set_high_intensity_value (const my9221_context dev, int intensity) |
void | my9221_set_all (const my9221_context dev) |
void | my9221_clear_all (const my9221_context dev) |
void | my9221_refresh (const my9221_context dev) |
int | my9221_get_max_leds (const my9221_context dev) |
Typedefs | |
typedef struct _my9221_context * | my9221_context |
my9221_context my9221_init | ( | int | dataPin, |
int | clockPin, | ||
int | instances | ||
) |
Instantiates an MY9221 object
dataPin | Data pin |
clockPin | Clock pin |
instances | Number of daisy-chained my9221s, must be at least 1 |
void my9221_close | ( | my9221_context | dev | ) |
MY9221 close
dev | Device context |
void my9221_set_auto_refresh | ( | const my9221_context | dev, |
bool | enable | ||
) |
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.
dev | Device context |
enable | true to enable auto refresh, false otherwise |
void my9221_set_led | ( | const my9221_context | dev, |
int | led, | ||
bool | on | ||
) |
Set an LED to a specific on (high intensity) or off (low intensity) value.
dev | Device context |
led | The LED whose state you wish to change |
on | true to turn on the LED, false to turn the LED off |
void my9221_set_low_intensity_value | ( | const my9221_context | dev, |
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.
dev | Device context |
intensity | a value from 0 (fully off) to 255 (fully on) |
void my9221_set_high_intensity_value | ( | const my9221_context | dev, |
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.
dev | Device context |
intensity | a value from 0 (fully off) to 255 (fully on) |
void my9221_set_all | ( | const my9221_context | dev | ) |
Set all of the LEDS to the ON (high intensity value) state.
dev | Device context |
void my9221_clear_all | ( | const my9221_context | dev | ) |
Set all of the LEDS to the OFF (low intensity value) state.
dev | Device context |
void my9221_refresh | ( | const my9221_context | dev | ) |
Set the LED states to match the internal stored states. This is useful when auto refresh (setAutoRefresh()) is false to update the display.
dev | Device context |
int my9221_get_max_leds | ( | const my9221_context | dev | ) |
Return the maximum number of LEDs present, based on the number of instances specified when the device context was initialized.
dev | Device context |
typedef struct _my9221_context * my9221_context |
Device context