MCPcopy Create free account
hub / github.com/JChristensen/JC_Button / ToggleButton

Method ToggleButton

src/JC_Button.h:84–85  ·  view source on GitHub ↗

constructor is similar to Button, but includes the initial state for the toggle.

Source from the content-addressed store, hash-verified

82
83 // constructor is similar to Button, but includes the initial state for the toggle.
84 ToggleButton(uint8_t pin, bool initialState=false, uint32_t dbTime=25, uint8_t puEnable=true, uint8_t invert=true)
85 : Button(pin, dbTime, puEnable, invert), m_toggleState(initialState) {}
86
87 // read the button and return its state.
88 // should be called frequently.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected