[riot-notifications] [RIOT-OS/RIOT] periph/gpio: add gpio_set_cb() function (#12082)

benpicco notifications at github.com
Tue Sep 17 18:30:33 CEST 2019


benpicco commented on this pull request.



> +    if (int_num < 0) {
+        return -1;
+    }
+
+    _gpio_update_cb(pin, &config[int_num].cb, cb);
+
+    return 0;
+}
+
+int gpio_update_cb_arg(gpio_t pin, void *arg)
+{
+    int8_t int_num = _int_num(pin);
+
+    if (int_num < 0) {
+        return -1;
+    }

Atmega is the C64 of the MCU world, I think it will be with us for a bit.
I can just move the code from `gpio_init_int()` into a helper function or call the `gpio_update_cb()`  function from there.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12082#discussion_r325267804
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/7455635f/attachment.htm>


More information about the notifications mailing list