projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/lpc: Filter ADC inputs
[fw/altos]
/
src
/
lpc
/
ao_arch_funcs.h
diff --git
a/src/lpc/ao_arch_funcs.h
b/src/lpc/ao_arch_funcs.h
index 179b2f4d0ae3963dba54febef71ab8889f058004..1bbb14f5b8773338a643ea1b7488cde0f8e319a1 100644
(file)
--- a/
src/lpc/ao_arch_funcs.h
+++ b/
src/lpc/ao_arch_funcs.h
@@
-61,12
+61,10
@@
#define analog_func(id) lpc_token_evaluator_2(LPC_IOCONF_FUNC_AD,id)
#define ao_enable_analog(port,bit,id) do { \
#define analog_func(id) lpc_token_evaluator_2(LPC_IOCONF_FUNC_AD,id)
#define ao_enable_analog(port,bit,id) do { \
- uint32_t _mode; \
ao_enable_port(port); \
lpc_gpio.dir[port] &= ~(1 << bit); \
ao_enable_port(port); \
lpc_gpio.dir[port] &= ~(1 << bit); \
- _mode = ((analog_func(id) << LPC_IOCONF_FUNC) | \
- (0 << LPC_IOCONF_ADMODE)); \
- lpc_ioconf.analog_reg(port,bit) = _mode; \
+ lpc_ioconf.analog_reg(port,bit) = ((analog_func(id) << LPC_IOCONF_FUNC) | \
+ (0 << LPC_IOCONF_ADMODE)); \
} while (0)
#define ARM_PUSH32(stack, val) (*(--(stack)) = (val))
} while (0)
#define ARM_PUSH32(stack, val) (*(--(stack)) = (val))