diff options
| author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-03-25 20:09:30 -0400 |
|---|---|---|
| committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-03-25 20:09:30 -0400 |
| commit | c5e16e962548c6117bc7d2c5bc1fbc30ecb76914 (patch) | |
| tree | 5b4da1745562882096d4b6f60640782614c153e9 /wirish/ext_interrupts.cpp | |
| parent | 9d2b4e574c8196a7d1fe4b3243d2bcd3b1dbdb98 (diff) | |
Final stm32_pin_info design candidate; ADC3 support on Native.
Added an adc_dev to struct stm32_pin_info. This was necessary to add
support for the channels on the Native which are only connected to
ADC3, but it does add a bunch of NULLs to the PIN_MAPs.
I don't think any other peripherals need representation on a per-pin
basis. Each peripheral library will be responsible for keeping track
of related GPIO ports and bits, and we can throw #defines in to
boards/*.h for other things (e.g. BOARD_SPI1_MISO_PIN).
Fleshed out the ADC refactor and brought it more in keeping with the
new design as it evolves.
A couple of other tweaks. Notably: waitForButtonPress() now takes a
default argument meaning "wait forever".
Removed Maple-specific documentation from core functions in io.h; this
information will need to go into the individual board docs files.
Diffstat (limited to 'wirish/ext_interrupts.cpp')
| -rw-r--r-- | wirish/ext_interrupts.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/ext_interrupts.cpp b/wirish/ext_interrupts.cpp index 060994f..f9ccd39 100644 --- a/wirish/ext_interrupts.cpp +++ b/wirish/ext_interrupts.cpp @@ -49,7 +49,7 @@ void attachInterrupt(uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode) { exti_trigger_mode outMode = exti_out_mode(mode); - exti_attach_interrupt((afio_exti_num)(PIN_MAP[pin].gpio_pin), + exti_attach_interrupt((afio_exti_num)(PIN_MAP[pin].gpio_bit), gpio_exti_port(PIN_MAP[pin].gpio_device), handler, outMode); @@ -64,7 +64,7 @@ void detachInterrupt(uint8 pin) { return; } - exti_detach_interrupt((afio_exti_num)(PIN_MAP[pin].gpio_pin)); + exti_detach_interrupt((afio_exti_num)(PIN_MAP[pin].gpio_bit)); } static inline exti_trigger_mode exti_out_mode(ExtIntTriggerMode mode) { |
