added State() function to gate input class
@@ -32,14 +32,25 @@ class GateIn
// ~~~~
void Init(dsy_gpio_pin *pin_cfg);
// ~~~~
+
// #### Trig
// Checks current state of gate input.
- // Returns FALSE if pin is low, and TRUE if high
+ // Returns True if the GPIO just transitioned.
//
// ~~~~
bool Trig();
// ~~~~
+ // #### State
+ // Checks current state of gate input (no state required)
+ //
+ // read function is inverted because of suggested BJT input circuit
+ //
+ // ~~~~
+ inline bool State() { return !dsy_gpio_read(&pin_); }
+ // ~~~~
+
+
private:
dsy_gpio pin_;
uint8_t prev_state_, state_;
