diff options
| author | Keith Packard <keithp@keithp.com> | 2012-06-25 05:03:34 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-06-25 05:03:34 -0700 |
| commit | 70cf32e89df19bde5185339fc703532c8a5b8be6 (patch) | |
| tree | 1e6bbe7fcc4152d93fb454eb9b06374f02258999 /src/stm | |
| parent | 246174b32bb6cf827d240c32d6a51c3513a08c37 (diff) | |
altos: Get cc1120 packet reception working
Interrupt-per-bit, but it seems to work
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm')
| -rw-r--r-- | src/stm/ao_exti.h | 3 | ||||
| -rw-r--r-- | src/stm/ao_exti_stm.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/stm/ao_exti.h b/src/stm/ao_exti.h index 43eaa52f..87a072e7 100644 --- a/src/stm/ao_exti.h +++ b/src/stm/ao_exti.h @@ -27,6 +27,9 @@ void ao_exti_setup(struct stm_gpio *gpio, uint8_t pin, uint8_t mode, void (*callback)()); void +ao_exti_set_callback(struct stm_gpio *gpio, uint8_t pin, void (*callback)()); + +void ao_exti_enable(struct stm_gpio *gpio, uint8_t pin); void diff --git a/src/stm/ao_exti_stm.c b/src/stm/ao_exti_stm.c index 0fa24188..683a91b3 100644 --- a/src/stm/ao_exti_stm.c +++ b/src/stm/ao_exti_stm.c @@ -95,6 +95,11 @@ ao_exti_setup (struct stm_gpio *gpio, uint8_t pin, uint8_t mode, void (*callback } void +ao_exti_set_callback(struct stm_gpio *gpio, uint8_t pin, void (*callback)()) { + ao_exti_callback[pin] = callback; +} + +void ao_exti_enable(struct stm_gpio *gpio, uint8_t pin) { uint32_t mask = (1 << pin); stm_exti.pr = mask; |
