diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-03-22 15:20:54 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-03-22 15:20:54 +0100 |
commit | 559fc6858377def4705fdcb15bf8cb8a72a54f92 (patch) | |
tree | 974af02d3b84709e94161f07d5336e7cc5633340 /firmware/src/simtrace/sim_switch.c | |
parent | 94143382bfef8425b5c1b7bf2d8d01d3e1daeeb2 (diff) |
make VCC / card detect more reliable
Diffstat (limited to 'firmware/src/simtrace/sim_switch.c')
-rw-r--r-- | firmware/src/simtrace/sim_switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/src/simtrace/sim_switch.c b/firmware/src/simtrace/sim_switch.c index f83290f..faf48f0 100644 --- a/firmware/src/simtrace/sim_switch.c +++ b/firmware/src/simtrace/sim_switch.c @@ -51,7 +51,7 @@ void sim_switch_mode(int connect_io, int connect_misc) static void sw_sim_irq(u_int32_t pio) { - if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, pio)) + if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, SIMTRACE_PIO_SW_SIM)) DEBUGPCR("SIM card inserted"); else DEBUGPCR("SIM card removed"); @@ -59,7 +59,7 @@ static void sw_sim_irq(u_int32_t pio) static void vcc_phone_irq(u_int32_t pio) { - if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, pio)) + if (!AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, SIMTRACE_PIO_VCC_PHONE)) DEBUGPCR("VCC_PHONE off"); else DEBUGPCR("VCC_PHONE on"); |