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

Function _post_setup_gpio

boards/elecrow/interface.cpp:33–42  ·  view source on GitHub ↗

** Function name: _post_setup_gpio() ** Location: main.cpp ** Description: second stage gpio setup to make a few functions work ***************************************************************************************/

Source from the content-addressed store, hash-verified

31** Description: second stage gpio setup to make a few functions work
32***************************************************************************************/
33void _post_setup_gpio() {
34 if (!touch.begin(&SPI)) {
35 launcherConsolePrintf("%s\n", String("Touch IC not Started").c_str());
36 log_i("Touch IC not Started");
37 } else launcherConsolePrintf("%s\n", String("Touch IC Started").c_str());
38 // Brightness control must be initialized after tft in this case @Pirata
39 pinMode(TFT_BL, OUTPUT);
40 ledcAttach(TFT_BL, TFT_BRIGHT_FREQ, TFT_BRIGHT_Bits);
41 ledcWrite(TFT_BL, bright);
42}
43
44/*********************************************************************
45** Function: setBrightness

Callers

nothing calls this directly

Calls 2

launcherConsolePrintfFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected