1. BackLight < 42 was bad
2. SWB D E F direction inverted
3. Wrong battery voltage
This commit is contained in:
Bertrand Songis
2017-09-17 21:40:51 +02:00
committed by GitHub
parent 9cb4b782e1
commit 509df44c4f
6 changed files with 43 additions and 20 deletions
+2 -6
View File
@@ -67,18 +67,14 @@ void backlightInit()
void backlightEnable(uint8_t dutyCycle)
{
if (dutyCycle < 5) {
dutyCycle = 5;
}
#if defined(PCBX12S)
if (IS_HORUS_PROD()) {
BL_TIMER->CCR4 = dutyCycle;
}
else {
BL_TIMER->CCR1 = (100 - dutyCycle);
BL_TIMER->CCR1 = BACKLIGHT_LEVEL_MAX - dutyCycle;
}
#elif defined(PCBX10)
BL_TIMER->CCR3 = (100 - dutyCycle);
BL_TIMER->CCR3 = BACKLIGHT_LEVEL_MAX - dutyCycle;
#endif
}