Skip to content

Commit

Permalink
Merge pull request #445 from pu-cc/gatemate-dirtyjtag-gpio
Browse files Browse the repository at this point in the history
gatemate: fix unintended gpio access with dirtyJtag cables
  • Loading branch information
trabucayre authored Mar 14, 2024
2 parents a1fd711 + 1304f67 commit 2b86c07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/colognechip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CologneChip::CologneChip(Jtag* jtag, const std::string &filename,

/* check which cable/board we're using in order to select pin definitions */
std::string ftdi_board_name;
if (board_name != "-") {
if ((board_name != "-") && (cable_name != "dirtyJtag")) {
ftdi_board_name = std::regex_replace(board_name, std::regex("jtag"), "spi");
} else if (cable_name == "gatemate_pgm") {
ftdi_board_name = "gatemate_pgm_spi";
Expand All @@ -51,7 +51,7 @@ CologneChip::CologneChip(Jtag* jtag, const std::string &filename,
if (ftdi_board_name != "") {
target_board_t *board = &(board_list[ftdi_board_name]);

/* pin configurations valid for both evaluation board and programer */
/* pin configurations valid for both evaluation board and programmer */
_rstn_pin = board->reset_pin;
_done_pin = board->done_pin;
_fail_pin = DBUS6;
Expand Down

0 comments on commit 2b86c07

Please sign in to comment.