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

Function _setup_gpio

boards/m5stack-cplus2/interface.cpp:10–25  ·  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

8** Description: initial setup for the device
9***************************************************************************************/
10void _setup_gpio() {
11 launcherGpioInput(UP_BTN); // Sets the power btn as an INPUT
12 launcherGpioInput(SEL_BTN);
13 launcherGpioInput(DW_BTN);
14 launcherGpioOutput(4); // Keeps the Stick alive after take off the USB cable
15 launcherGpioWrite(4, HIGH); // Keeps the Stick alive after take off the USB cable
16 // https://github.com/pr3y/Bruce/blob/main/media/connections/cc1101_stick_SDCard.jpg
17 // Keeps this pin high to allow working with the following pinout
18 // Keeps this pin high to allow working with the following pinout
19 launcherGpioOutput(32);
20 launcherGpioOutput(33);
21 launcherGpioWrite(32, LOW);
22 launcherGpioWrite(33, HIGH);
23 gpio_pulldown_dis(GPIO_NUM_36);
24 gpio_pullup_dis(GPIO_NUM_36);
25}
26
27/*********************************************************************
28** Function: setBrightness

Callers

nothing calls this directly

Calls 3

launcherGpioInputFunction · 0.85
launcherGpioOutputFunction · 0.85
launcherGpioWriteFunction · 0.85

Tested by

no test coverage detected