sys/time_units.h: Convert time conversion to macros
The intent of this patch is to leave all of the semantics of the macros unchanged, only replacing the easy-to-read static inline conversion function with a pile of ?: operators. Ick. This is not a cleanup. However, what it does enable is using constant results while initializing global variables, which cannot be done with either static inline functions or even statement expressions, even when those generate constant results. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
a8497c5216
commit
8f5d0791bf
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,7 @@
|
||||
#include <zephyr/types.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <zephyr/sys/timeutil.h>
|
||||
|
||||
/** Convert a civil (proleptic Gregorian) date to days relative to
|
||||
|
||||
Loading…
Reference in New Issue
Block a user