mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
consistently use 0-based counting of modems/slots
This commit is contained in:
@@ -27,12 +27,12 @@ int sim_switch_use_physical(unsigned int nr, int physical)
|
||||
|
||||
switch (nr) {
|
||||
#ifdef PIN_SIM_SWITCH1
|
||||
case 1:
|
||||
case 0:
|
||||
pin = &pin_conn_usim1;
|
||||
break;
|
||||
#endif
|
||||
#ifdef PIN_SIM_SWITCH2
|
||||
case 2:
|
||||
case 1:
|
||||
pin = &pin_conn_usim2;
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -184,17 +184,17 @@ void board_exec_dbg_cmd(int ch)
|
||||
break;
|
||||
case '1':
|
||||
printf("Resetting Modem 1 (of this SAM3)\n\r");
|
||||
wwan_perst_do_reset_pulse(1, 300);
|
||||
wwan_perst_do_reset_pulse(0, 300);
|
||||
break;
|
||||
case '2':
|
||||
printf("Resetting Modem 2 (of this SAM3)\n\r");
|
||||
wwan_perst_do_reset_pulse(2, 300);
|
||||
wwan_perst_do_reset_pulse(1, 300);
|
||||
break;
|
||||
case '!':
|
||||
sim_switch_use_physical(1, 0);
|
||||
sim_switch_use_physical(0, 0);
|
||||
break;
|
||||
case '@':
|
||||
sim_switch_use_physical(2, 0);
|
||||
sim_switch_use_physical(0, 0);
|
||||
break;
|
||||
default:
|
||||
if (!qmod_sam3_is_12())
|
||||
|
||||
@@ -45,11 +45,11 @@ static struct wwan_perst *get_perst_for_modem(int modem_nr)
|
||||
|
||||
switch (modem_nr) {
|
||||
#ifdef PIN_PERST1
|
||||
case 1:
|
||||
case 0:
|
||||
return &perst1;
|
||||
#endif
|
||||
#ifdef PIN_PERST2
|
||||
case 2:
|
||||
case 1:
|
||||
return &perst2;
|
||||
#endif
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user