projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd55678
)
altos: Can't use inline functions because SDCC doesn't do that
author
Keith Packard
<keithp@keithp.com>
Tue, 21 May 2013 18:30:44 +0000
(11:30 -0700)
committer
Keith Packard
<keithp@keithp.com>
Tue, 21 May 2013 18:30:44 +0000
(11:30 -0700)
Sigh.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_log.h
patch
|
blob
|
history
diff --git
a/src/core/ao_log.h
b/src/core/ao_log.h
index 95b3764991c47554669132244cc27b0c3a24a9e9..e1461a14a3f0137871d71807dc5cef1daf1beeed 100644
(file)
--- 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