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::patterns::timing::NonBlockingDelay< SystemTimeImpl > Class Template Reference

Simple non-blocking delay using system time. More...

#include <non_blocking_delay.hpp>

Inheritance diagram for sbl::core::patterns::timing::NonBlockingDelay< SystemTimeImpl >:
Collaboration diagram for sbl::core::patterns::timing::NonBlockingDelay< SystemTimeImpl >:

Public Member Functions

 NonBlockingDelay (uint32_t delay_ms)
 Constructor with delay period.
 
void start ()
 Start the delay timer.
 
bool ready () const
 Check if delay period has elapsed.
 
void reset ()
 Reset the delay timer for next period.
 
void stop ()
 Stop the delay timer.
 
bool isActive () const
 Check if timer is active.
 
void setPeriod (uint32_t delay_ms)
 Update delay period.
 
uint32_t getPeriod () const
 Get current delay period.
 

Detailed Description

template<typename SystemTimeImpl>
class sbl::core::patterns::timing::NonBlockingDelay< SystemTimeImpl >

Simple non-blocking delay using system time.

Template-based non-blocking delay that uses HAL system time interface. Applications typically use this through board-provided timing utilities.

Template Parameters
SystemTimeImplHAL system time implementation

Definition at line 31 of file non_blocking_delay.hpp.

Constructor & Destructor Documentation

◆ NonBlockingDelay()

sbl::core::patterns::timing::NonBlockingDelay< SystemTimeImpl >::NonBlockingDelay ( uint32_t  delay_ms)
inlineexplicit

Constructor with delay period.

Parameters
delay_msDelay period in milliseconds

Definition at line 37 of file non_blocking_delay.hpp.

Member Function Documentation

◆ getPeriod()

Get current delay period.

Returns
Current delay period in milliseconds

Definition at line 90 of file non_blocking_delay.hpp.

◆ isActive()

Check if timer is active.

Definition at line 74 of file non_blocking_delay.hpp.

◆ ready()

Check if delay period has elapsed.

Returns
true if delay period has elapsed

Definition at line 52 of file non_blocking_delay.hpp.

◆ reset()

Reset the delay timer for next period.

Definition at line 60 of file non_blocking_delay.hpp.

◆ setPeriod()

Update delay period.

Parameters
delay_msNew delay period in milliseconds

Definition at line 82 of file non_blocking_delay.hpp.

◆ start()

Start the delay timer.

Definition at line 43 of file non_blocking_delay.hpp.

Referenced by sbl::core::components::cv::Trigger< PinImpl, TimerImpl >::fire(), and sbl::core::components::display::FlashLed< LedImpl, TimerImpl >::flash().

Here is the caller graph for this function:

◆ stop()

Stop the delay timer.

Definition at line 67 of file non_blocking_delay.hpp.


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