0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 14:48:03 +03:00
This commit is contained in:
OneOfEleven
2023-11-10 13:36:02 +00:00
parent ef5270e115
commit 630c6ac196
9 changed files with 18 additions and 16 deletions

View File

@ -28,7 +28,7 @@ void BACKLIGHT_init(void)
{
// 48MHz / 94 / 1024 ~ 500Hz
const uint32_t PWM_FREQUENCY_HZ = 1000;
PWM_PLUS0_CLKSRC |= ((48000000 / 1024 / PWM_FREQUENCY_HZ) << 16);
PWM_PLUS0_CLKSRC |= ((CPU_CLOCK_HZ / 1024 / PWM_FREQUENCY_HZ) << 16);
PWM_PLUS0_PERIOD = 1023;
PORTCON_PORTB_SEL0 &= ~(PORTCON_PORTB_SEL0_B6_MASK);