diff options
author | innovaker <66737976+innovaker@users.noreply.github.com> | 2020-12-02 16:41:57 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-12-14 12:41:25 -0500 |
commit | bac1f17cf6ce225876dc7b6b2a809bcd98010391 (patch) | |
tree | 9783743b31fdadd66d1b3c9e5a3e14dc661ec313 /app/src/rgb_underglow.c | |
parent | a4652fa25da83ae036613157fb566eb1ce1426fe (diff) |
refactor(app): replace Zephyr integer types with C99 integer types
u8_t → uint8_t
u16_t → uint16_t
u32_t → uint32_t
u64_t → uint64_t
s8_t → int8_t
s16_t → int16_t
s32_t → int32_t
s64_t → int64_t
Prerequisite for #223
See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0
PR: #467
Diffstat (limited to 'app/src/rgb_underglow.c')
-rw-r--r-- | app/src/rgb_underglow.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 6e5cb1b..b2943e6 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -31,18 +31,18 @@ enum rgb_underglow_effect { }; struct led_hsb { - u16_t h; - u8_t s; - u8_t b; + uint16_t h; + uint8_t s; + uint8_t b; }; struct rgb_underglow_state { - u16_t hue; - u8_t saturation; - u8_t brightness; - u8_t animation_speed; - u8_t current_effect; - u16_t animation_step; + uint16_t hue; + uint8_t saturation; + uint8_t brightness; + uint8_t animation_speed; + uint8_t current_effect; + uint16_t animation_step; bool on; }; @@ -59,7 +59,7 @@ static struct device *ext_power; static struct led_rgb hsb_to_rgb(struct led_hsb hsb) { double r, g, b; - u8_t i = hsb.h / 60; + uint8_t i = hsb.h / 60; double v = hsb.b / 100.0; double s = hsb.s / 100.0; double f = hsb.h / 360.0 * 6 - i; |