mirror of https://gerrit.osmocom.org/simtrace2
perst/sim_switch: Log events using TRACE_INFO
This commit is contained in:
parent
44622dfd8d
commit
0709d2d842
|
@ -41,10 +41,13 @@ int sim_switch_use_physical(unsigned int nr, int physical)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (physical)
|
||||
if (physical) {
|
||||
TRACE_INFO("%u: Use local/physical SIM\r\n", nr);
|
||||
PIO_Clear(pin);
|
||||
else
|
||||
} else {
|
||||
TRACE_INFO("%u: Use remote/emulated SIM\r\n", nr);
|
||||
PIO_Set(pin);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "board.h"
|
||||
#include "trace.h"
|
||||
#include "wwan_perst.h"
|
||||
#include "osmocom/core/timer.h"
|
||||
|
||||
|
@ -33,6 +34,7 @@ static void perst_tmr_cb(void *data)
|
|||
{
|
||||
struct wwan_perst *perst = data;
|
||||
/* release the (low-active) reset */
|
||||
TRACE_INFO("De-asserting modem reset\r\n");
|
||||
PIO_Clear(&perst->pin);
|
||||
}
|
||||
|
||||
|
@ -63,6 +65,7 @@ int wwan_perst_do_reset_pulse(int modem_nr, unsigned int duration_ms)
|
|||
if (!perst)
|
||||
return -1;
|
||||
|
||||
TRACE_INFO("%u: Asserting modem reset\r\n", modem_nr);
|
||||
PIO_Set(&perst->pin);
|
||||
osmo_timer_schedule(&perst->timer, duration_ms/1000, (duration_ms%1000)*1000);
|
||||
|
||||
|
@ -76,10 +79,13 @@ int wwan_perst_set(int modem_nr, int active)
|
|||
return -1;
|
||||
|
||||
osmo_timer_del(&perst->timer);
|
||||
if (active)
|
||||
if (active) {
|
||||
TRACE_INFO("%u: Asserting modem reset\r\n", modem_nr);
|
||||
PIO_Set(&perst->pin);
|
||||
else
|
||||
} else {
|
||||
TRACE_INFO("%u: De-asserting modem reset\r\n", modem_nr);
|
||||
PIO_Clear(&perst->pin);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue