sim module firmware is now v4.60, (sim020.bin) it adds a better drain when T=0 exits abnormal (abort). Better waiting time floor, with faster ETU which doesnt shrink with WWT.\n Changes to i2c with SDA timings, also modified the fixed msleep(100) with an idle time waiting which leads to 107 ms off from every iteration.\n Added a ATR cache to remember which TA1 was autonegotiated. This impact i2c comms speed with sim module for same card. 'smart pps' is better documented.\n The sam_common.c now also logs 61xx and GET_RESPONSE :) and generic long-form ASN-1 lengths. trace list -t 7816 now also shows rdr frames in us. \n All in all, this should lead for 'emv reader -w' to go from 5.87sec to 2.78sec. 'hf seos sam' is down to 1.92sec. 'hw ping' is down to 0.57sec. A USB round trip is down from 20.8ms to 1.3ms. It should give a snappier end user experience
This commit is contained in:
1 parent
d996b75578
commit
76181dfb8e
12 files changed
+283
-17
No files matched your search
@@ -80,6 +80,30 @@ static uint64_t last_packet_time;
|
||||
|
||||
static bool dl_it(uint8_t *dest, uint32_t bytes, PacketResponseNG *response, size_t ms_timeout, bool show_warning, uint32_t rec_cmd);
|
||||
|
||||
// Wait until the comm thread has actually put a queued command on the wire.
|
||||
// Callers used to sleep a fixed guess instead, which was reasonable when a
|
||||
// command could sit in the buffer for a whole receive timeout; it is now sent
|
||||
// within a millisecond or so.
|
||||
bool WaitForTxIdle(uint32_t ms_timeout) {
|
||||
|
||||
uint64_t start = msclock();
|
||||
|
||||
for (;;) {
|
||||
|
||||
pthread_mutex_lock(&txBufferMutex);
|
||||
bool pending = txBuffer_pending;
|
||||
pthread_mutex_unlock(&txBufferMutex);
|
||||
|
||||
if (pending == false) {
|
||||
return true;
|
||||
}
|
||||
if (msclock() - start >= ms_timeout) {
|
||||
return false;
|
||||
}
|
||||
msleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Simple alias to track usages linked to the Bootloader, these commands must not be migrated.
|
||||
// - commands sent to enter bootloader mode as we might have to talk to old firmwares
|
||||
// - commands sent to the bootloader as it only supports OLD frames (which will always be the case for old BL)
|
||||
|
||||
Reference in new issue
Block a user