I think I have a slight preference for @fauxpark's implementation. Yes, it's duplicated code, but I find it easier to follow than a bunch of nested `ifdef`s.    Caveat: I have no idea what JTAG is, and only know that it requires disabling so that its pins can be used for GPIO.  