Created
April 17, 2021 15:00
-
-
Save philmb3487/448d57653c83a4d24d1fb82f5e18f07b to your computer and use it in GitHub Desktop.
Coffee Lake (Tested on i5-9300H) Backlight Set Logic
This file contains 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 characters
// 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment