1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/efm32: pwm_init errors are zeros

This commit is contained in:
chrysn 2023-03-17 13:02:20 +01:00
parent c4400e8964
commit 664b209e7a

View File

@ -33,7 +33,7 @@ uint32_t pwm_init(pwm_t dev, pwm_mode_t mode, uint32_t freq, uint16_t res)
{
/* check if device is valid */
if (dev >= PWM_NUMOF) {
return -1;
return 0;
}
/* enable clocks */
@ -46,7 +46,7 @@ uint32_t pwm_init(pwm_t dev, pwm_mode_t mode, uint32_t freq, uint16_t res)
freq_timer);
if (prescaler > timerPrescale1024) {
return -2;
return 0;
}
/* reset and initialize peripheral */