C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
Blinker Class Reference

A base class used to add blinking feature to widgets. To do so, this widget must inherit from Blinker. More...

#include <widget.h>

Inheritance diagram for Blinker:
Inheritance graph
Collaboration diagram for Blinker:
Collaboration graph

Public Member Functions

void set_blink_us (uint32_t blink_period=1000000)
 Set the blink period in microseconds.
 
bool has_blinking_changed ()
 return the status of the flag blink_phase_changed
 
void clear_blinking_phase_change ()
 set blink_phase_changed = False
 
virtual void compute_blinking_phase ()
 compute if the system clock divided by the blink_period is odd or even and if this has changed since the last cycle.
 

Detailed Description

A base class used to add blinking feature to widgets. To do so, this widget must inherit from Blinker.

Note
: USAGE: To perform the blinking drawing, the following sequence applies for the draw() method implementation.

Member Function Documentation

◆ has_blinking_changed()

bool Blinker::has_blinking_changed ( )

return the status of the flag blink_phase_changed

Returns
blink_phase_changed
Here is the caller graph for this function:

◆ set_blink_us()

void Blinker::set_blink_us ( uint32_t blink_period = 1000000)

Set the blink period in microseconds.

Parameters
blink_perioddefault to 1 second

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