From 5aae62cb7b099663d80f83591bd4f6f824fc88fb Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 18 May 2012 08:41:08 +0200 Subject: 7816_uart: add comment about f/d calculation --- firmware/src/simtrace/iso7816_uart.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'firmware/src/simtrace') diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c index 4169ab9..5f1bad0 100644 --- a/firmware/src/simtrace/iso7816_uart.c +++ b/firmware/src/simtrace/iso7816_uart.c @@ -157,6 +157,8 @@ static int compute_fidi_ratio(u_int8_t fi, u_int8_t di) if (d == 0) return -EINVAL; + /* See table 7 of ISO 7816-3: From 1000 on we divide by 1/d, + * which equals a multiplication by d */ if (di < 8) ret = f / d; else -- cgit v1.2.3