hf 14b got some love

This commit is contained in:
iceman1001 2021-04-23 22:25:58 +02:00
commit 2119c4e7bd
11 changed files with 645 additions and 393 deletions

View file

@ -44,9 +44,18 @@ typedef enum ISO14B_COMMAND {
typedef struct {
uint16_t flags; // the ISO14B_COMMAND enum
uint32_t timeout;
size_t rawlen;
uint16_t rawlen;
uint8_t raw[];
} PACKED iso14b_raw_cmd_t;
#define US_TO_SSP(x) ( (uint32_t)((x) * 3.39) )
#define SSP_TO_US(x) ( (uint32_t)((x) / 3.39) )
#define ETU_TO_SSP(x) ((x) * 32)
#define SSP_TO_ETU(x) ((x) / 32)
#define ETU_TO_US(x) ((((x) * 9440000) / 1000000) + 0.5)
#define US_TO_ETU(x) ((((x) * 1000000 / 9440000) + 0.5))
#endif // _ISO14B_H_