MCPcopy Create free account
hub / github.com/BruceDevices/firmware / _setup_gpio

Function _setup_gpio

boards/m5stack-dinmeter/interface.cpp:15–22  ·  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

13** Description: initial setup for the device
14***************************************************************************************/
15void _setup_gpio() {
16 M5.begin();
17 bruceConfig.colorInverted = 0;
18 pinMode(ENCODER_KEY, INPUT);
19 encoder = new RotaryEncoder(ENCODER_INA, ENCODER_INB, RotaryEncoder::LatchMode::TWO03);
20 attachInterrupt(digitalPinToInterrupt(ENCODER_INA), checkPosition, CHANGE);
21 attachInterrupt(digitalPinToInterrupt(ENCODER_INB), checkPosition, CHANGE);
22}
23/*********************************************************************
24** Function: setBrightness
25** location: settings.cpp

Callers

nothing calls this directly

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected