X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_log.h;h=e1461a14a3f0137871d71807dc5cef1daf1beeed;hb=277577fecc71e3c52b823938f396cf42be403ebe;hp=95b3764991c47554669132244cc27b0c3a24a9e9;hpb=fd5567882b732f8947b44b217552077c82a3d28e;p=fw%2Faltos diff --git a/src/core/ao_log.h b/src/core/ao_log.h index 95b37649..e1461a14 100644 --- a/src/core/ao_log.h +++ b/src/core/ao_log.h @@ -289,12 +289,11 @@ struct ao_log_mini { } u; /* 16 */ }; /* 16 */ -static inline void -ao_log_pack24(uint8_t *dst, uint32_t value) { - dst[0] = value; - dst[1] = value >> 8; - dst[2] = value >> 16; -} +#define ao_log_pack24(dst,value) do { \ + (dst)[0] = (value); \ + (dst)[1] = (value) >> 8; \ + (dst)[2] = (value) >> 16; \ + } while (0) /* Write a record to the eeprom log */ uint8_t