summaryrefslogtreecommitdiff
path: root/src/stm/ao_arch_funcs.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-12-17 19:27:42 -0800
committerKeith Packard <keithp@keithp.com>2016-04-13 06:17:06 -0700
commite3f0c5eb8e5d57cbd8882587477d1381e2a83226 (patch)
tree79821c10873606bdb611dc9c5c2671aebd2dc0ac /src/stm/ao_arch_funcs.h
parent097c156b13ae975c742f294b46429e8ff14c365b (diff)
altos: Add ao_gpi_set/clr_bits functions
These set or clear a group of bits in a single GPIO register all together. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_arch_funcs.h')
-rw-r--r--src/stm/ao_arch_funcs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm/ao_arch_funcs.h b/src/stm/ao_arch_funcs.h
index 087e00d9..f1d17ed1 100644
--- a/src/stm/ao_arch_funcs.h
+++ b/src/stm/ao_arch_funcs.h
@@ -177,6 +177,11 @@ ao_spi_try_get_mask(struct stm_gpio *reg, uint16_t mask, uint8_t bus, uint32_t s
#define ao_gpio_get(port, bit, pin) stm_gpio_get(port, bit)
+#define ao_gpio_set_bits(port, bits) stm_gpio_set_bits(port, bits)
+
+#define ao_gpio_clr_bits(port, bits) stm_gpio_clr_bits(port, bits);
+
+
#define ao_enable_output(port,bit,pin,v) do { \
ao_enable_port(port); \
ao_gpio_set(port, bit, pin, v); \