set pulldown for broadcom jtag pins

This commit is contained in:
jerryneedell 2021-12-28 11:26:47 -05:00
parent ea638c0401
commit ed3ddea2da

View File

@ -48,14 +48,15 @@ void reset_pin_number(uint8_t pin_number) {
pin_in_use[pin_number] = false; pin_in_use[pin_number] = false;
never_reset_pin[pin_number] = false; never_reset_pin[pin_number] = false;
// Reset JTAG pins back to JTAG. // Reset JTAG pins back to JTAG.
BP_PULL_Enum pull = BP_PULL_NONE;
if (22 <= pin_number && pin_number <= 27) { if (22 <= pin_number && pin_number <= 27) {
gpio_set_function(pin_number, GPIO_FUNCTION_ALT4); gpio_set_function(pin_number, GPIO_FUNCTION_ALT4);
pull = BP_PULL_DOWN;
return; return;
} else { } else {
gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); gpio_set_function(pin_number, GPIO_FUNCTION_INPUT);
} }
// Set the pull to match the datasheet. // Set the pull to match the datasheet.
BP_PULL_Enum pull = BP_PULL_NONE;
if (pin_number < 9 || if (pin_number < 9 ||
(33 < pin_number && pin_number < 37) || (33 < pin_number && pin_number < 37) ||
pin_number > 45) { pin_number > 45) {