summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/extint.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-08-03 00:05:16 +0100
committerDamien George <damien.p.george@gmail.com>2015-08-03 00:14:48 +0100
commit0851751615580d02bd6f841e13651923f05fde59 (patch)
tree28b788def0d7a128b57512a923a84657d65d11be /stmhal/extint.c
parent6f1c00869c761ff84b21939a057d7752e0c01be9 (diff)
downloadmicropython-0851751615580d02bd6f841e13651923f05fde59.tar.gz
micropython-0851751615580d02bd6f841e13651923f05fde59.zip
stmhal: Factor GPIO clock enable logic into mp_hal_gpio_clock_enable.
Extracted GPIO clock enable logic into mp_hal_gpio_clock_enable and called from anyplace which might need to use GPIO functions on ports other than A-D. Thanks to Dave Hylands for the patch.
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r--stmhal/extint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/extint.c b/stmhal/extint.c
index 669c43812c..f89549269f 100644
--- a/stmhal/extint.c
+++ b/stmhal/extint.c
@@ -167,6 +167,7 @@ uint extint_register(mp_obj_t pin_obj, uint32_t mode, uint32_t pull, mp_obj_t ca
if (*cb != mp_const_none) {
+ mp_hal_gpio_clock_enable(pin->gpio);
GPIO_InitTypeDef exti;
exti.Pin = pin->pin_mask;
exti.Mode = mode;