Noiasca Tool Kit
Several helper functions and classes to make life with Arduino easier
Public Member Functions | List of all members
OnOff< T > Class Template Reference

OnOff. More...

#include <Noiasca_led.h>

Inherits LedBase< T >.

Public Member Functions

void off () override
 switch output off More...
 
void on () override
 switch output off More...
 
uint16_t getCurrentBrightness ()
 get the current brightness More...
 
void setMaxBrightness (uint8_t newBrightness)
 set the maximum brightness More...
 
void toggle ()
 switch between on or off state
 

Detailed Description

template<class T>
class OnOff< T >

OnOff.

This class provides a simple on/off interface for an output. There is no effect during runtime. The class just provides access to hardware with an unified interface.

Member Function Documentation

◆ off()

template<class T >
void OnOff< T >::off ( )
inlineoverride

switch output off

Switch the output to off state.

◆ on()

template<class T >
void OnOff< T >::on ( )
inlineoverride

switch output off

Switch the output to off state.

◆ getCurrentBrightness()

template<class T >
uint16_t OnOff< T >::getCurrentBrightness ( )
inline

get the current brightness

The current brightness/level of this output

Returns
the current brigthness

◆ setMaxBrightness()

template<class T >
void OnOff< T >::setMaxBrightness ( uint8_t  newBrightness)
inline

set the maximum brightness

The output will output this maximum level.

Parameters
newBrightnessthe new brigthness [0..255]