<p><b>@maribu</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12082#discussion_r325139663">cpu/atmega_common/periph/gpio.c</a>:</p>
<pre style='color:#555'>> @@ -416,6 +416,25 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
     return 0;
 }
 
+int gpio_set_cb(gpio_t pin, gpio_cb_t cb, void *arg)
+{
+    int8_t int_num = _int_num(pin);
+
+    if (int_num < 0) {
+        return -1;
+    }
+
+    if (cb) {
+        config[int_num].cb = cb;
+    }
+
+    if (arg) {
+        config[int_num].arg = arg;
+    }
</pre>
<blockquote>
<div class="highlight highlight-source-c"><pre><span class="pl-k">int</span> <span class="pl-en">gpio_update_cb</span>(<span class="pl-c1">gpio_t</span> pin, <span class="pl-c1">gpio_cb_t</span> cb, <span class="pl-k">void</span> *arg)
{
    <span class="pl-k">if</span> (cb) {
        config[pin].<span class="pl-smi">cb</span> = cb;
    }
    
    <span class="pl-k">if</span> (arg || cb == <span class="pl-c1">NULL</span>) {
        config[pin].<span class="pl-smi">arg</span> = arg;
    }
}</pre></div>
</blockquote>
<p>Not <code>(arg || cb != NULL) </code>?</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=ABE7WYFUHMUX6PAIWMY5HDTQKDFAXA5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCE6TX7A#discussion_r325139663">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYG7F7WFLMHER2PGUB3QKDFAXANCNFSM4IPPPQ2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYHDIJRTIAFLRDM2IRDQKDFAXA5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCE6TX7A.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=ABE7WYFUHMUX6PAIWMY5HDTQKDFAXA5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCE6TX7A#discussion_r325139663",
"url": "https://github.com/RIOT-OS/RIOT/pull/12082?email_source=notifications\u0026email_token=ABE7WYFUHMUX6PAIWMY5HDTQKDFAXA5CNFSM4IPPPQ2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCE6TX7A#discussion_r325139663",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>