Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sbl::core::components::display::FlashLed< LedImpl, TimerImpl > Class Template Reference

LED flasher for beat and event indication. More...

#include <flash_led.hpp>

Collaboration diagram for sbl::core::components::display::FlashLed< LedImpl, TimerImpl >:

Public Member Functions

 FlashLed (LedImpl &led, uint32_t flash_ms=50)
 Construct LED flasher.
 
void flash ()
 Flash LED.
 
void update ()
 Update flash state.
 
bool isActive () const
 Check if LED is currently flashing.
 
void setFlashDuration (uint32_t flash_ms)
 Set flash duration.
 

Detailed Description

template<typename LedImpl, typename TimerImpl>
class sbl::core::components::display::FlashLed< LedImpl, TimerImpl >

LED flasher for beat and event indication.

Provides timed LED flashing for visual feedback. Encapsulates flash timing patterns for clean application code.

Template Parameters
LedImplLED implementation
TimerImplTimer implementation for flash timing

Definition at line 27 of file flash_led.hpp.

Constructor & Destructor Documentation

◆ FlashLed()

template<typename LedImpl , typename TimerImpl >
sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::FlashLed ( LedImpl &  led,
uint32_t  flash_ms = 50 
)
inline

Construct LED flasher.

Parameters
ledLED instance to control
flash_msFlash duration in milliseconds (default: 50ms)

Definition at line 34 of file flash_led.hpp.

Member Function Documentation

◆ flash()

template<typename LedImpl , typename TimerImpl >
void sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::flash ( )
inline

Flash LED.

Starts LED flash. Call update() regularly to handle timing.

Definition at line 42 of file flash_led.hpp.

References sbl::core::patterns::timing::NonBlockingDelay< SystemTimeImpl >::start().

Here is the call graph for this function:

◆ isActive()

template<typename LedImpl , typename TimerImpl >
bool sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::isActive ( ) const
inline

Check if LED is currently flashing.

Returns
true if flash is active

Definition at line 64 of file flash_led.hpp.

◆ setFlashDuration()

template<typename LedImpl , typename TimerImpl >
void sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::setFlashDuration ( uint32_t  flash_ms)
inline

Set flash duration.

Parameters
flash_msNew flash duration in milliseconds

Definition at line 72 of file flash_led.hpp.

◆ update()

template<typename LedImpl , typename TimerImpl >
void sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::update ( )
inline

Update flash state.

Call regularly from main loop to handle flash timing.

Definition at line 53 of file flash_led.hpp.


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