diff options
author | Keith Packard <keithp@keithp.com> | 2013-08-26 18:43:20 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-08-26 18:47:27 -0700 |
commit | 7e941695aa27e5eaf453ca1128b8d835472410a4 (patch) | |
tree | ba7c86e1d160824330cb584e4809ac828309e052 /src/attiny/ao_arch_funcs.h | |
parent | 9b9acb88aa97e8565cdf9342fc59a5aee08e3d34 (diff) |
altos: Check for MS5607 MISO low before sleeping
If the MISO line goes low before we manage to configure the
interrupts, we'll miss it entirely unless we check the pin explicitly.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/attiny/ao_arch_funcs.h')
-rw-r--r-- | src/attiny/ao_arch_funcs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/attiny/ao_arch_funcs.h b/src/attiny/ao_arch_funcs.h index 76dc7820..d4584a9f 100644 --- a/src/attiny/ao_arch_funcs.h +++ b/src/attiny/ao_arch_funcs.h @@ -41,6 +41,8 @@ PORTB &= ~(1 << bit); \ } while (0) +#define ao_gpio_get(port, bit, pin) ((PORTB >> (bit)) & 1) + /* * The SPI mutex must be held to call either of these * functions -- this mutex covers the entire SPI operation, |