From bac1f17cf6ce225876dc7b6b2a809bcd98010391 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Wed, 2 Dec 2020 16:41:57 +0000 Subject: refactor(app): replace Zephyr integer types with C99 integer types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/src/rgb_underglow.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'app/src/rgb_underglow.c') 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; -- cgit v1.2.3