|
MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Communicates with the ultra-bright LED. More...
#include "peripheral_common.h"Go to the source code of this file.
Classes | |
| struct | MblMwLedPattern |
| Attributes describing a light pulse. More... | |
Enumerations | |
| enum | MblMwLedColor { MBL_MW_LED_COLOR_GREEN, MBL_MW_LED_COLOR_RED, MBL_MW_LED_COLOR_BLUE } |
| Available colors on the LED. | |
| enum | MblMwLedPreset { MBL_MW_LED_PRESET_BLINK, MBL_MW_LED_PRESET_PULSE, MBL_MW_LED_PRESET_SOLID } |
| Enumeration of preset patterns available in the library Patterns are based on the led blog post, http://projects.mbientlab.com/?p=656. | |
Functions | |
| METAWEAR_API void | mbl_mw_led_load_preset_pattern (MblMwLedPattern *pattern, MblMwLedPreset preset) |
| Loads the struct with a preset configuration. More... | |
| METAWEAR_API void | mbl_mw_led_write_pattern (const MblMwMetaWearBoard *board, const MblMwLedPattern *pattern, MblMwLedColor color) |
| Writes the led pattern to the board. More... | |
| METAWEAR_API void | mbl_mw_led_autoplay (const MblMwMetaWearBoard *board) |
| Plays any programmed patterns, and immediately plays any patterns programmed later. More... | |
| METAWEAR_API void | mbl_mw_led_play (const MblMwMetaWearBoard *board) |
| Plays any programmed patterns. More... | |
| METAWEAR_API void | mbl_mw_led_pause (const MblMwMetaWearBoard *board) |
| Pauses the patterns. More... | |
| METAWEAR_API void | mbl_mw_led_stop (const MblMwMetaWearBoard *board) |
| Stops playing LED patterns. More... | |
| METAWEAR_API void | mbl_mw_led_stop_and_clear (const MblMwMetaWearBoard *board) |
| Stops playing LED patterns and clears all pattern configurations. More... | |
Variables | |
| const uint8_t | MBL_MW_LED_REPEAT_INDEFINITELY = 0xff |
| Value indicating the led pulse will repeat indefinitely. | |
Communicates with the ultra-bright LED.
| METAWEAR_API void mbl_mw_led_autoplay | ( | const MblMwMetaWearBoard * | board | ) |
Plays any programmed patterns, and immediately plays any patterns programmed later.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_led_load_preset_pattern | ( | MblMwLedPattern * | pattern, |
| MblMwLedPreset | preset | ||
| ) |
Loads the struct with a preset configuration.
| pattern | Pointer to the pattern to write the configuration to |
| preset | Preset pattern to load |
| METAWEAR_API void mbl_mw_led_pause | ( | const MblMwMetaWearBoard * | board | ) |
Pauses the patterns.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_led_play | ( | const MblMwMetaWearBoard * | board | ) |
Plays any programmed patterns.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_led_stop | ( | const MblMwMetaWearBoard * | board | ) |
Stops playing LED patterns.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_led_stop_and_clear | ( | const MblMwMetaWearBoard * | board | ) |
Stops playing LED patterns and clears all pattern configurations.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_led_write_pattern | ( | const MblMwMetaWearBoard * | board, |
| const MblMwLedPattern * | pattern, | ||
| MblMwLedColor | color | ||
| ) |
Writes the led pattern to the board.
| board | Pointer to the board to send the command to |
| pattern | Pointer to the pattern attributes to write to the board |
| color | Color the pattern is configuring |
1.8.14