diff options
| author | Keith Packard <keithp@keithp.com> | 2015-12-17 19:27:42 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2016-04-13 06:17:06 -0700 |
| commit | e3f0c5eb8e5d57cbd8882587477d1381e2a83226 (patch) | |
| tree | 79821c10873606bdb611dc9c5c2671aebd2dc0ac /src/cc1111/ao_arch_funcs.h | |
| parent | 097c156b13ae975c742f294b46429e8ff14c365b (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/cc1111/ao_arch_funcs.h')
| -rw-r--r-- | src/cc1111/ao_arch_funcs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cc1111/ao_arch_funcs.h b/src/cc1111/ao_arch_funcs.h index ea340dfd..1eb506cd 100644 --- a/src/cc1111/ao_arch_funcs.h +++ b/src/cc1111/ao_arch_funcs.h @@ -146,4 +146,6 @@ ao_spi_init(void); #define ao_enable_output(port,bit,pin,v) cc1111_enable_output(port,token_evaluator(port,DIR), token_evaluator(port,SEL), pin, bit, v) #define ao_gpio_set(port, bit, pin, v) ((pin) = (v)) #define ao_gpio_get(port, bit, pin) (pin) - +#define ao_gpio_get_bits(port) (port) +#define ao_gpio_set_bits(port, bits) ((port) |= bits) +#define ao_gpio_clr_bits(port, bits) ((port) &= ~bits) |
