Fix backlight level 1 and 2 issue #131

This commit is contained in:
Armel FAUVEAU
2024-07-02 13:12:24 +02:00
parent 1b76b16e44
commit cb88330110

View File

@@ -146,8 +146,11 @@ static uint8_t currentBrightness;
void BACKLIGHT_SetBrightness(uint8_t brigtness)
{
const uint8_t value[] = {0, 3, 6, 9, 15, 24, 38, 62, 100, 159, 255};
currentBrightness = brigtness;
PWM_PLUS0_CH0_COMP = (1 << brigtness) - 1;
PWM_PLUS0_CH0_COMP = value[brigtness] * 4;
//PWM_PLUS0_CH0_COMP = (1 << brigtness) - 1;
//PWM_PLUS0_SWLOAD = 1;
}