propagate jtag_pins_conf_t and add support for bitbang mode

This commit is contained in:
Gwenhael Goavec-Merou
2020-03-07 11:44:17 +01:00
parent e8bff2d2f2
commit c4f6178733
3 changed files with 25 additions and 11 deletions
+6 -2
View File
@@ -86,6 +86,7 @@ void displaySupported(const struct arguments &args);
int main(int argc, char **argv)
{
cable_t cable;
jtag_pins_conf_t *pins_config = NULL;
/* command line args. */
struct arguments args = {false, false, false, 0, "", "-", "-", "-",
@@ -100,6 +101,9 @@ int main(int argc, char **argv)
/* if a board name is specified try to use this to determine cable */
if (args.board[0] != '-' && board_list.find(args.board) != board_list.end()) {
/* set pins config */
pins_config = &board_list[args.board].pins_config;
/* search for cable */
auto t = cable_list.find(board_list[args.board].cable_name);
if (t == cable_list.end()) {
args.cable = "-";
@@ -124,9 +128,9 @@ int main(int argc, char **argv)
/* jtag base */
Jtag *jtag;
if (args.device == "-")
jtag = new Jtag(cable, 6000000, false);
jtag = new Jtag(cable, pins_config, 6000000, false);
else
jtag = new Jtag(cable, args.device, 6000000, false);
jtag = new Jtag(cable, pins_config, args.device, 6000000, false);
/* chain detection */
vector<int> listDev;