mirror of https://gerrit.osmocom.org/simtrace2
sniffer: display F and D values frim PPS
Change-Id: I3641dcb6c24695a6d3dd3a1ee4333f56a07c99f0
This commit is contained in:
parent
de6e3488a0
commit
05cc8bd36a
|
@ -2,5 +2,11 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Table 7 of ISO 7816-3:2006 */
|
||||
extern const uint16_t fi_table[];
|
||||
|
||||
/* Table 8 from ISO 7816-3:2006 */
|
||||
extern const uint8_t di_table[];
|
||||
|
||||
/* compute the F/D ratio based on Fi and Di values */
|
||||
int compute_fidi_ratio(uint8_t fi, uint8_t di);
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#include "iso7816_fidi.h"
|
||||
|
||||
/* Table 7 of ISO 7816-3:2006 */
|
||||
static const uint16_t fi_table[] = {
|
||||
const uint16_t fi_table[] = {
|
||||
372, 372, 558, 744, 1116, 1488, 1860, 0,
|
||||
0, 512, 768, 1024, 1536, 2048, 0, 0
|
||||
};
|
||||
|
||||
/* Table 8 from ISO 7816-3:2006 */
|
||||
static const uint8_t di_table[] = {
|
||||
const uint8_t di_table[] = {
|
||||
0, 1, 2, 4, 8, 16, 32, 64,
|
||||
12, 20, 2, 4, 8, 16, 32, 64,
|
||||
};
|
||||
|
|
|
@ -566,7 +566,7 @@ static void process_byte_pps(uint8_t byte)
|
|||
fn = 1;
|
||||
dn = 1;
|
||||
}
|
||||
TRACE_INFO("PPS negotiation successful: Fn=%u Dn=%u\n\r", fn, dn);
|
||||
TRACE_INFO("PPS negotiation successful: Fn=%u Dn=%u\n\r", fi_table[fn], di_table[dn]);
|
||||
update_fidi(sniff_usart.base, pps_cur[2]);
|
||||
usb_send_fidi(pps_cur[2]); /* send Fi/Di change notification to host software over USB */
|
||||
} else { /* checksum is invalid */
|
||||
|
|
Loading…
Reference in New Issue