added Reader_FWT variable

Application with this may now change the frame waiting time which may be helpful for ISO14443A-4 processing
This commit is contained in:
Georg
2017-04-04 16:18:10 +02:00
parent 2ed4034c94
commit 06f6d970ba
4 changed files with 7 additions and 1 deletions
@@ -230,6 +230,7 @@ INLINE uint16_t Reader14443A_Select(uint8_t * Buffer, uint16_t BitCount)
{
case STATE_IDLE:
case STATE_HALT:
Reader_FWT = ISO14443A_RX_PENDING_TIMEOUT;
/* Send a REQA */
Buffer[0] = ISO14443A_CMD_WUPA; // whenever REQA works, WUPA also works, so we choose WUPA always
ReaderState = STATE_READY;
+2
View File
@@ -9,6 +9,8 @@
#include "../System.h"
#include "../LEDHook.h"
uint16_t Reader_FWT = ISO14443A_RX_PENDING_TIMEOUT;
#define READER_FIELD_MINIMUM_WAITING_TIME 70 // ms
static uint16_t ReaderFieldStartTimestamp = 0;
+3
View File
@@ -90,6 +90,9 @@
#define CodecPtrRegister2 (*((volatile uint8_t**) &GPIORA))
extern uint16_t ReaderThreshold;
extern uint16_t Reader_FWT;
#define FWI2FWT(x) ((uint32_t)(256 * 16 * ((uint32_t)1 << (x))) / (CODEC_CARRIER_FREQ / 1000) + 1)
typedef enum {
CODEC_SUBCARRIERMOD_OFF,
@@ -281,7 +281,7 @@ ISR(CODEC_TIMER_LOADMOD_CCA_VECT) // pause found
void Reader14443ACodecTask(void)
{
if (Flags.RxPending && SYSTICK_DIFF(RxPendingSince) > ISO14443A_RX_PENDING_TIMEOUT + 1)
if (Flags.RxPending && SYSTICK_DIFF(RxPendingSince) > Reader_FWT + 1)
{
BitCount = 0;
Flags.RxDone = true;