FreeCalypso > hg > fc-sim-tools
comparison serial/spenh.c @ 53:fbedb67d234f
serial: fix parity for inverse coding convention
Important note: it is my (Mother Mychaela's) understanding that
SIM cards with inverse coding convention are extremely rare,
and I have never seen such a card. Therefore, our support for
the inverse coding convention will likely remain forever untested.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Mar 2021 20:46:09 +0000 |
parents | 6cc3eea720cb |
children |
comparison
equal
deleted
inserted
replaced
52:0fec41a10131 | 53:fbedb67d234f |
---|---|
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 extern u_char atr_buf[]; | 10 extern u_char atr_buf[]; |
11 extern unsigned baud_spenh, spenh_host_max; | 11 extern unsigned baud_spenh, spenh_host_max; |
12 extern int inverse_coding; | |
12 | 13 |
13 void | 14 void |
14 spenh_logic() | 15 spenh_logic() |
15 { | 16 { |
16 unsigned spenh_sim_max, use_spenh; | 17 unsigned spenh_sim_max, use_spenh; |
65 exit(1); | 66 exit(1); |
66 if (bcmp(pts_req, pts_resp, 4)) { | 67 if (bcmp(pts_req, pts_resp, 4)) { |
67 fprintf(stderr, "error: PTS response does not match request\n"); | 68 fprintf(stderr, "error: PTS response does not match request\n"); |
68 exit(1); | 69 exit(1); |
69 } | 70 } |
70 set_serial_params(baud_spenh * use_spenh); | 71 set_serial_params(baud_spenh * use_spenh, inverse_coding); |
71 printf("X Using F=512 D=%u speed enhancement\n", use_spenh * 8); | 72 printf("X Using F=512 D=%u speed enhancement\n", use_spenh * 8); |
72 } | 73 } |