MAX30001-MAX32630FTHR SYS EvKit

Dependencies:   USBDevice max32630fthr

Embed: (wiki syntax)

« Back to documentation index

HspLed Class Reference

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

enum eMode

define all of the modes the LED can support

Definition at line 75 of file HspLed.h.


Member Function Documentation

void blink ( uint32_t  mSeconds )

Blink the HSP LED at a set time interval.

Parameters:
mSecondsNumber 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:
pattern32-bit pattern to rotate through
mSecondsthe 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.