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

Function _setBrightness

boards/m5stack-cardputer/interface.cpp:144–151  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

142** set brightness value
143**********************************************************************/
144void _setBrightness(uint8_t brightval) {
145 if (brightval == 0) {
146 analogWrite(TFT_BL, brightval);
147 } else {
148 int bl = MINBRIGHT + round(((255 - MINBRIGHT) * brightval / 100));
149 analogWrite(TFT_BL, bl);
150 }
151}
152
153/*********************************************************************
154** Function: InputHandler

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected