Skip to content

Commit

Permalink
led: Increase LED PWM strength by decreasing period
Browse files Browse the repository at this point in the history
Increase LED PWM strength by decreasing period to MAX period value.

Signed-off-by: Simen S. Røstad <[email protected]>
  • Loading branch information
simensrostad committed Nov 6, 2024
1 parent 7726243 commit f0f38cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/modules/led/led_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ static int pwm_out(const struct led_color *color)
int err;

/* RED */
err = pwm_set_dt(&led0, PWM_USEC(255), PWM_USEC(color->c[0]));
err = pwm_set_dt(&led0, PWM_USEC(LED_MAX), PWM_USEC(color->c[0]));
if (err) {
LOG_ERR("pwm_set_dt, error:%d", err);
return err;
}

/* GREEN */
err = pwm_set_dt(&led2, PWM_USEC(255), PWM_USEC(color->c[1]));
err = pwm_set_dt(&led2, PWM_USEC(LED_MAX), PWM_USEC(color->c[1]));
if (err) {
LOG_ERR("pwm_set_dt, error:%d", err);
return err;
}

/* BLUE */
err = pwm_set_dt(&led1, PWM_USEC(255), PWM_USEC(color->c[2]));
err = pwm_set_dt(&led1, PWM_USEC(LED_MAX), PWM_USEC(color->c[2]));
if (err) {
LOG_ERR("pwm_set_dt, error:%d", err);
return err;
Expand Down

0 comments on commit f0f38cd

Please sign in to comment.