diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-06-16 21:16:13 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-06-16 21:16:13 +0200 |
commit | cda126a7ef6fbb54a18a4786c15117800a13f7b3 (patch) | |
tree | 0017691b939da6b2d8e09e5d194bb61fff21fa81 /firmware/src/simtrace/main_simtrace.c | |
parent | ff741ee31fe2a6b25f8f7fcfb1397bb0c82616d6 (diff) |
simtrace: add support for the analog bus switch
Diffstat (limited to 'firmware/src/simtrace/main_simtrace.c')
-rw-r--r-- | firmware/src/simtrace/main_simtrace.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/firmware/src/simtrace/main_simtrace.c b/firmware/src/simtrace/main_simtrace.c index 740d35d..581fd59 100644 --- a/firmware/src/simtrace/main_simtrace.c +++ b/firmware/src/simtrace/main_simtrace.c @@ -31,6 +31,7 @@ #include <simtrace/tc_etu.h> #include <simtrace/iso7816_uart.h> +#include <simtrace/sim_switch.h> void _init_func(void) { @@ -38,6 +39,7 @@ void _init_func(void) pio_irq_init(); iso_uart_init(); tc_etu_init(); + sim_switch_init(); usbtest_init(); @@ -55,7 +57,9 @@ static void help(void) "c: toggle clock master/slave\r\n" "l: set nRST to low (active)\r\n" "h: set nRST to high (inactive)\r\n" - "o: set nRST to input\r\n"); + "o: set nRST to input\r\n" + "s: disconnect SIM bus switch\r\n" + "S: connect SIM bus switch\r\n"); } int _main_dbgu(char key) @@ -64,6 +68,11 @@ int _main_dbgu(char key) DEBUGPCRF("main_dbgu"); switch (key) { + case 's': + sim_switch_mode(0, 0); + break; + case 'S': + sim_switch_mode(1, 1); case 'r': iso_uart_rx_mode(); break; |