ddd
HspLed Class Reference
Driver for the HSP Led, supports different blink rates and patterns. More...
#include <HspLed.h>
Public Types | |
enum | eMode |
define all of the modes the LED can support More... | |
typedef enum HspLed::eMode | eMode |
define all of the modes the LED can support | |
Public Member Functions | |
void | blink (uint32_t mSeconds) |
Blink the HSP LED at a set time interval. | |
void | pattern (uint32_t pattern, uint32_t mSeconds) |
Start rotating the LED through a 32-bit pattern at a mS rate specified. | |
void | on (void) |
Turn the LED on. | |
void | off (void) |
Turn the LED off. | |
void | service (void) |
Update the LED. |
Detailed Description
Driver for the HSP Led, supports different blink rates and patterns.
#include <stdio.h> #include "mbed.h" #include "xxx.h" I2C i2c(I2C_SDA, I2C_SCL); xxx xxx(&i2c); int main(void) { printf("Initialized xxx\n"); while(1) { if (xxx.init() != 0) { printf("Error communicating with xxx\n"); } else { printf("Initialized xxx\n"); break; } wait(1); } while(1) { printf(""); wait(1); } }
Definition at line 69 of file HspLed.h.
Member Typedef Documentation
typedef enum HspLed::eMode eMode |
define all of the modes the LED can support
Member Enumeration Documentation
Member Function Documentation
void blink | ( | uint32_t | mSeconds ) |
Blink the HSP LED at a set time interval.
- Parameters:
-
mSeconds Number of seconds to set the timer interval
Definition at line 63 of file HspLed.cpp.
void off | ( | void | ) |
Turn the LED off.
Definition at line 86 of file HspLed.cpp.
void on | ( | void | ) |
Turn the LED on.
Definition at line 78 of file HspLed.cpp.
void pattern | ( | uint32_t | pattern, |
uint32_t | mSeconds | ||
) |
Start rotating the LED through a 32-bit pattern at a mS rate specified.
- Parameters:
-
pattern 32-bit pattern to rotate through mSeconds the amount of time to take per bit in the pattern
Definition at line 70 of file HspLed.cpp.
void service | ( | void | ) |
Update the LED.
Definition at line 105 of file HspLed.cpp.
Generated on Tue Jul 12 2022 21:12:44 by 1.7.2