<p>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.</p>
<p>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.</p>
<p>(I know, the API is pretty verbose with 3 flavors. But that will be really trivial to use :-))</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12082?email_source=notifications&email_token=ABE7WYC3LGWPWGPBI7CGOVDQKD357A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD647RII#issuecomment-532281505">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDY7RYT4IGA633V723QKD357ANCNFSM4IPPPQ2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYHGUPNYYCR5TS43RUDQKD357A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD647RII.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12082?email_source=notifications\u0026email_token=ABE7WYC3LGWPWGPBI7CGOVDQKD357A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD647RII#issuecomment-532281505",
"url": "https://github.com/RIOT-OS/RIOT/pull/12082?email_source=notifications\u0026email_token=ABE7WYC3LGWPWGPBI7CGOVDQKD357A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD647RII#issuecomment-532281505",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>