Created
April 17, 2021 15:00
-
-
Save philmb3487/448d57653c83a4d24d1fb82f5e18f07b to your computer and use it in GitHub Desktop.
Revisions
-
philmb3487 created this gist
Apr 17, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // coffee lake chips use the BXT methods. current = INREG(0xC8258); max = INREG(0xC8254); printf ("current backlight value: %d%%\n", current * 100 / max); if (argc > 1) { uint32_t v = atoi (argv[1]) * max / 100; if (v > max) v = max; OUTREG(0xC8258, v); (void) INREG(0xC8258); printf ("set backlight to %d%%\n", v * 100 / max); }