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

Function _setBrightness

boards/m5stack-cplus2/interface.cpp:32–39  ·  view source on GitHub ↗

** Function: setBrightness ** location: settings.cpp ** set brightness value **********************************************************************/

Source from the content-addressed store, hash-verified

30** set brightness value
31**********************************************************************/
32void _setBrightness(uint8_t brightval) {
33 if (brightval == 0) {
34 analogWrite(TFT_BL, brightval);
35 } else {
36 int bl = MINBRIGHT + round(((255 - MINBRIGHT) * brightval / 100));
37 analogWrite(TFT_BL, bl);
38 }
39}
40
41/*********************************************************************
42** Function: InputHandler

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected