COSA
An Object-Oriented Platform for Arduino Programming
LED Class Reference

#include <LED.hh>

Inheritance diagram for LED:
Inheritance graph
Collaboration diagram for LED:
Collaboration graph

Public Member Functions

 LED (Job::Scheduler *scheduler, Board::DigitalPin pin=Board::LED)
 
void on ()
 
void off ()
 
void normal_mode ()
 
void alert_mode ()
 

Private Member Functions

void period (uint32_t time)
 
uint32_t period () const
 
void reschedule ()
 
virtual void on_event (uint8_t type, uint16_t value)
 
void expire_at (uint32_t time)
 
uint32_t expire_at () const
 
void expire_after (uint32_t time)
 
int32_t expire_after () const
 
uint32_t time () const
 
bool is_started () const
 
bool start ()
 
bool stop ()
 
virtual void on_expired ()
 
void detach ()
 
Linkagesucc () const
 
Linkagepred () const
 
void attach (Linkage *pred)
 

Private Attributes

uint32_t m_period
 
uint32_t m_expires
 
Schedulerm_scheduler
 
Linkagem_succ
 
Linkagem_pred
 

Detailed Description

Blinking LED; Use built-in LED or other digital pin for pulse. Support simple application status indicator.

Definition at line 32 of file LED.hh.

Constructor & Destructor Documentation

LED::LED ( Job::Scheduler scheduler,
Board::DigitalPin  pin = Board::LED 
)
inline

Construct LED connected to the given pin.

Parameters
[in]pinsymbol (default built-in LED).

Definition at line 38 of file LED.hh.

Member Function Documentation

void LED::alert_mode ( )
inline

Blink LED with alert period.

Definition at line 77 of file LED.hh.

void LED::normal_mode ( )
inline

Blink LED with normal period.

Definition at line 66 of file LED.hh.

void LED::off ( )
inline

Turn LED off.

Definition at line 56 of file LED.hh.

void LED::on ( )
inline

Turn LED on.

Definition at line 46 of file LED.hh.


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