diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-21 11:30:44 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-21 11:30:44 -0700 |
commit | 85eb75c3251d8e141d7269fc7ffa6197174ea8c3 (patch) | |
tree | 2b9896e5edb87e31b86bea91fb212d33f9dc2fec /src | |
parent | fd5567882b732f8947b44b217552077c82a3d28e (diff) |
altos: Can't use inline functions because SDCC doesn't do that
Sigh.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ao_log.h | 11 |
1 files changed, 5 insertions, 6 deletions
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 |