diff options
author | Keith Packard <keithp@keithp.com> | 2013-06-09 22:09:13 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-06-09 22:09:13 -0700 |
commit | 988924b51980ad43e39bc4785a625ff25eb16449 (patch) | |
tree | b0b3abecd78b1a3471244867cbbe9d3bbf1c7944 /src/stm/stm32l.h | |
parent | 72b6c699d355fcd41addb9919d846e63105b9db7 (diff) |
altos: Add fast-timer API. Use for quadrature and button drivers
This splits the fast-timer portion out of the debounce helper code and
shares that with the quadrature driver which now uses it directly.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/stm32l.h')
-rw-r--r-- | src/stm/stm32l.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index 63bde0f8..1868468f 100644 --- a/src/stm/stm32l.h +++ b/src/stm/stm32l.h @@ -171,6 +171,11 @@ stm_gpio_get(struct stm_gpio *gpio, int pin) { return (gpio->idr >> pin) & 1; } +static inline uint16_t +stm_gpio_get_all(struct stm_gpio *gpio) { + return gpio->idr; +} + extern struct stm_gpio stm_gpioa; extern struct stm_gpio stm_gpiob; extern struct stm_gpio stm_gpioc; |