[firmware] wwan_perst: Print index when releasing WWAN_PERST

This commit is contained in:
Harald Welte
2017-11-03 20:40:56 +01:00
parent e7f2f9a5e0
commit 514c6d1da0

View File

@@ -12,18 +12,21 @@
#include "osmocom/core/timer.h" #include "osmocom/core/timer.h"
struct wwan_perst { struct wwan_perst {
uint8_t idx;
const Pin pin; const Pin pin;
struct osmo_timer_list timer; struct osmo_timer_list timer;
}; };
#ifdef PIN_PERST1 #ifdef PIN_PERST1
static struct wwan_perst perst1 = { static struct wwan_perst perst1 = {
.idx = 0,
.pin = PIN_PERST1, .pin = PIN_PERST1,
}; };
#endif #endif
#ifdef PIN_PERST2 #ifdef PIN_PERST2
static struct wwan_perst perst2 = { static struct wwan_perst perst2 = {
.idx = 1,
.pin = PIN_PERST2, .pin = PIN_PERST2,
}; };
#endif #endif
@@ -34,7 +37,7 @@ static void perst_tmr_cb(void *data)
{ {
struct wwan_perst *perst = data; struct wwan_perst *perst = data;
/* release the (low-active) reset */ /* release the (low-active) reset */
TRACE_INFO("De-asserting modem reset\r\n"); TRACE_INFO("%u: De-asserting modem reset\r\n", perst->idx);
PIO_Clear(&perst->pin); PIO_Clear(&perst->pin);
} }