lib Modulove
Library for building custom scripts for Modulove modules.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
modulove::DigitalInput Class Reference

Public Types

enum  InputState { STATE_UNCHANGED , STATE_RISING , STATE_FALLING }
 Enum constants for clk input rising/falling state.
 

Public Member Functions

void Init (uint8_t cv_pin)
 Initializes a CV Input object.
 
void Process ()
 Read the state of the cv input.
 
InputState State ()
 Get the current input state of the digital input.
 
bool On ()
 Current cv state represented as a bool.
 
bool Read ()
 Read live pin state as a bool.
 

Member Function Documentation

◆ Init()

void modulove::DigitalInput::Init ( uint8_t  cv_pin)
inline

Initializes a CV Input object.

Parameters
cv_pingpio pin for the cv output.

◆ On()

bool modulove::DigitalInput::On ( )
inline

Current cv state represented as a bool.

Returns
true if cv signal went high this loop.
false if cv signal went high this loop.

◆ Read()

bool modulove::DigitalInput::Read ( )
inline

Read live pin state as a bool.

Returns
true if cv signal is high.
false if cv signal is low.

◆ State()

InputState modulove::DigitalInput::State ( )
inline

Get the current input state of the digital input.

Returns
InputState

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