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

Marian Buschsieweke notifications at github.com
Tue Sep 17 17:48:47 CEST 2019

I like the new API with separate function calls for the callback function and the argument. Keep in mind that updating the argument will also need to be done in an atomic fashion, e.g. via disabling IRQ temporary.

I think that a third function to exchange both atomically would however be needed to update both. Otherwise the interrupt might be triggered right between the calls, so a handler is called with an argument it doesn't expect.

(I know, the API is pretty verbose with 3 flavors. But that will be really trivial to use :-))

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/f7765d54/attachment.htm>

More information about the notifications mailing list