diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2022-02-03 16:32:32 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-08 18:00:49 +0000 |
commit | 784c3d4275ffb03c6b5079c743aecb707b27d3dc (patch) | |
tree | f5fb5987700dad10066aac956c3408bf4ef08e47 /common/led_pwm.c | |
parent | 4c1db1634d7049dbca378b3b6b042d01d1025a64 (diff) | |
download | chrome-ec-784c3d4275ffb03c6b5079c743aecb707b27d3dc.tar.gz |
led_pwm: use struct pwm_led_color_map for storing duty values
Switch the temporary duty variable to use struct pwm_led_color_map. This
is internally used to hold three duty cycle values. The structures have
the same chX field names but they are enums in pwm_led. Using
pwm_led_color_map makes more sense here.
BRANCH=none
BUG=b:217741090
TEST=build and run on volteer
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I69b311479fa5c0fd83b649e8c94f44260e17cbbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3442682
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'common/led_pwm.c')
-rw-r--r-- | common/led_pwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/led_pwm.c b/common/led_pwm.c index 45c9dbf60a..f55dd92010 100644 --- a/common/led_pwm.c +++ b/common/led_pwm.c @@ -54,7 +54,7 @@ static int get_led_id_color(enum pwm_led_id id, int color) void set_pwm_led_color(enum pwm_led_id id, int color) { - struct pwm_led duty = { 0 }; + struct pwm_led_color_map duty = { 0 }; const struct pwm_led *led = &pwm_leds[id]; if ((id >= CONFIG_LED_PWM_COUNT) || (id < 0) || |