libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::GateIn Class Reference

Generic Class for handling gate inputs through GPIO. More...

Detailed Description

Generic Class for handling gate inputs through GPIO.

Author
Stephen Hensley
Date
March 2020

#include <gatein.h>

Public Member Functions

 GateIn ()
 
 ~GateIn ()
 
void Init (Pin pin, bool invert=true)
 Initializes the gate input with specified hardware pin.
 
bool Trig ()
 
bool State ()
 

Constructor & Destructor Documentation

◆ GateIn()

daisy::GateIn::GateIn ( )
inline

GateIn Constructor

◆ ~GateIn()

daisy::GateIn::~GateIn ( )
inline

GateIn Destructor

Member Function Documentation

◆ Init()

void daisy::GateIn::Init ( Pin  pin,
bool  invert = true 
)

Initializes the gate input with specified hardware pin.

Parameters
pin_cfgpointer to pin to initialize
invertTrue if the pin state is HIGH when 0V is present at the input. False if input signal matches the pin state.
Note
the default for invert is true because it is typical to use an inverting input circuit (e.g. a BJT circuit) for eurorack gate inputs.

◆ State()

bool daisy::GateIn::State ( )
inline

Checks current state of gate input (no state required) read function is inverted because of suggested BJT input circuit

◆ Trig()

bool daisy::GateIn::Trig ( )

Checks current state of gate input.

Returns
True if the GPIO just transitioned.

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