From 559fc6858377def4705fdcb15bf8cb8a72a54f92 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 22 Mar 2012 15:20:54 +0100 Subject: make VCC / card detect more reliable --- firmware/src/simtrace/sim_switch.c | 4 ++-- 1 file 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"); -- cgit v1.2.3