Fixed bug causing gpios set in alternate function mode to have the internal pull-up resistor enabled, even if not requested.