diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-06-30 13:55:00 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-06-30 13:55:00 +0200 |
commit | 30cb576ca5ed5281e997333fd522440faa595565 (patch) | |
tree | ab546bcb17fda5924c18bcde81e37644c982058b | |
parent | e95ccd8f1db1f43d729153a30f3b5cf84cbc6606 (diff) |
simtrace: initialize sniffer mode right after start-up
-rw-r--r-- | firmware/src/simtrace/main_simtrace.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/firmware/src/simtrace/main_simtrace.c b/firmware/src/simtrace/main_simtrace.c index ed2921c..f919690 100644 --- a/firmware/src/simtrace/main_simtrace.c +++ b/firmware/src/simtrace/main_simtrace.c @@ -34,24 +34,6 @@ #include <simtrace/iso7816_uart.h> #include <simtrace/sim_switch.h> -void _init_func(void) -{ - /* low-level hardware initialization */ - pio_irq_init(); - iso_uart_init(); - tc_etu_init(); - sim_switch_init(); - - usbtest_init(); - - /* high-level protocol */ - //opicc_usbapi_init(); - led_switch(1, 0); - led_switch(2, 1); - - iso_uart_rx_mode(); -} - enum simtrace_md { SIMTRACE_MD_OFF, SIMTRACE_MD_SNIFFER, @@ -101,6 +83,26 @@ static void simtrace_set_mode(enum simtrace_md mode) } } +void _init_func(void) +{ + /* low-level hardware initialization */ + pio_irq_init(); + iso_uart_init(); + tc_etu_init(); + sim_switch_init(); + + usbtest_init(); + + /* high-level protocol */ + //opicc_usbapi_init(); + led_switch(1, 0); + led_switch(2, 1); + + iso_uart_rx_mode(); + simtrace_set_mode(SIMTRACE_MD_SNIFFER); +} + + static void help(void) { DEBUGPCR("r: iso uart Rx mode\r\n" @@ -108,6 +110,7 @@ static void help(void) "l: set nRST to low (active)\r\n" "h: set nRST to high (inactive)\r\n" "o: set nRST to input\r\n" + "r: set Rx mode for UART\r\n" "s: disconnect SIM bus switch\r\n" "S: connect SIM bus switch\r\n"); } @@ -123,6 +126,7 @@ int _main_dbgu(char key) break; case 'S': simtrace_set_mode(SIMTRACE_MD_SNIFFER); + break; case 'r': iso_uart_rx_mode(); break; |