MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / _setup_gpio

Function _setup_gpio

boards/m5stack-dinmeter/interface.cpp:20–27  ·  view source on GitHub ↗

** Function name: _setup_gpio() ** Location: main.cpp ** Description: initial setup for the device ***************************************************************************************/

Source from the content-addressed store, hash-verified

18** Description: initial setup for the device
19***************************************************************************************/
20void _setup_gpio() {
21 M5.begin();
22
23 launcherGpioInput(ENCODER_KEY);
24 encoder = new RotaryEncoder(ENCODER_INA, ENCODER_INB, RotaryEncoder::LatchMode::TWO03);
25 attachInterrupt(digitalPinToInterrupt(ENCODER_INA), checkPosition, CHANGE);
26 attachInterrupt(digitalPinToInterrupt(ENCODER_INB), checkPosition, CHANGE);
27}
28/*********************************************************************
29** Function: setBrightness
30** location: settings.cpp

Callers

nothing calls this directly

Calls 2

launcherGpioInputFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected