<blockquote>
<p>IMO readablility can be improved by a) seperating the two switch cases, and b) turning the "DISABLE_JTAG" test into a C-level if statement:</p>
</blockquote>
<p>Thanks for the suggestion, I was thinking the same thing. I applied the diff.</p>
<p>Also I removed the break a because I realized for some cpu's GPIO's are not in a sequential order so I need to check all ports and not break immediately. e.g. "stm32f410"</p>
<pre><code>#define GPIOA_BASE            (AHB1PERIPH_BASE + 0x0000U)
#define GPIOB_BASE            (AHB1PERIPH_BASE + 0x0400U)
#define GPIOC_BASE            (AHB1PERIPH_BASE + 0x0800U)
#define GPIOH_BASE            (AHB1PERIPH_BASE + 0x1C00U)
</code></pre>

<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/11758?email_source=notifications&email_token=ABE7WYGLMAG2K2AEI6LFEY3P5M5KZA5CNFSM4H4DJ4D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZA7TEY#issuecomment-507640211">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDCGEGDWZYDLFB3HUDP5M5KZANCNFSM4H4DJ4DQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYDYGSEPB6GBZVCI6TTP5M5KZA5CNFSM4H4DJ4D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZA7TEY.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/11758?email_source=notifications\u0026email_token=ABE7WYGLMAG2K2AEI6LFEY3P5M5KZA5CNFSM4H4DJ4D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZA7TEY#issuecomment-507640211",
"url": "https://github.com/RIOT-OS/RIOT/pull/11758?email_source=notifications\u0026email_token=ABE7WYGLMAG2K2AEI6LFEY3P5M5KZA5CNFSM4H4DJ4D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZA7TEY#issuecomment-507640211",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>