first attempt at rx timeout handling
The general idea is to provide hints to cuart so it can calculate
a reasonable timeout value when receiving multiple bytes instead of
having per-byte timeouts
Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454
diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h
index 6a782db..1df0c49 100644
--- a/ccid_common/cuart.h
+++ b/ccid_common/cuart.h
@@ -23,6 +23,7 @@
enum card_uart_ctl {
CUART_CTL_RX, /* enable/disable receiver */
+ CUART_CTL_RX_TIMER_HINT, /* tell cuart approximate number of rx bytes */
CUART_CTL_NO_RXTX, /* enable/disable receiver */
CUART_CTL_POWER, /* enable/disable ICC power */
CUART_CTL_CLOCK, /* enable/disable ICC clock */
@@ -78,6 +79,8 @@
uint32_t wtime_etu;
struct osmo_timer_list wtime_tmr;
+ /* expected number of bytes, for timeout */
+ uint32_t current_wtime_byte;
/* driver-specific private data */
union {