<p>I like the general idea, but two general things:</p>
<ol>
<li>If the argument of the callback is <code>NULL</code>, the current implementation keeps the argument of the previous caller. I think the argument should be set to whatever is given in <code>gpio_set_cb()</code>, otherwise it would not be possible to willingly set this to <code>NULL</code> after the some non-<code>NULL</code> argument has been set.</li>
<li>The new function could be called internally in <code>gpio_init_int()</code> to make sure the code is tested much. (I expect the compiler to inline this call, so that this would have no effect on the ROM size. But if I'm wrong with that, I'm fine with not calling it from <code>gpio_init_int()</code>.</li>
</ol>
<p>I'll take a more in depth look tomorrow, I'm too tired to concentrate now.</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=ABE7WYFLQWBT6YHRO4CZBS3QKAJG7A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD622AGA#issuecomment-531996696">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYELCJL23SU7FHP354DQKAJG7ANCNFSM4IPPPQ2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYFLGMBXM3ENLF7PZJ3QKAJG7A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD622AGA.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=ABE7WYFLQWBT6YHRO4CZBS3QKAJG7A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD622AGA#issuecomment-531996696",
"url": "https://github.com/RIOT-OS/RIOT/pull/12082?email_source=notifications\u0026email_token=ABE7WYFLQWBT6YHRO4CZBS3QKAJG7A5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD622AGA#issuecomment-531996696",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>