diff options
author | Keith Packard <keithp@keithp.com> | 2015-12-17 19:27:42 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-12-23 23:12:18 -0800 |
commit | 8b99e49670068e4c464fa23fac7f54b2067b88cc (patch) | |
tree | cbe3d2f2f3788fedde026495d250b2663a7fe8c5 /src/stm/ao_arch_funcs.h | |
parent | a1b760d0a01e7087bcc214fcd395541fbf268fe8 (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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm/ao_arch_funcs.h b/src/stm/ao_arch_funcs.h index 42f1a2e5..ce59acaa 100644 --- a/src/stm/ao_arch_funcs.h +++ b/src/stm/ao_arch_funcs.h @@ -149,6 +149,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); \ |