mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
defines
This commit is contained in:
parent
2b3d339714
commit
ce741d3b44
1 changed files with 10 additions and 6 deletions
|
@ -65,13 +65,17 @@ typedef struct {
|
||||||
} PACKED iso14b_raw_cmd_t;
|
} PACKED iso14b_raw_cmd_t;
|
||||||
|
|
||||||
|
|
||||||
#define US_TO_SSP(x) ( (uint32_t)((x) * 3.39) )
|
#define US_TO_SSP(x) ( (int32_t)((x) * 3.39) )
|
||||||
#define SSP_TO_US(x) ( (uint32_t)((x) / 3.39) )
|
#define SSP_TO_US(x) ( (int32_t)((x) / 3.39) )
|
||||||
|
|
||||||
#define ETU_TO_SSP(x) ((uint32_t)((x) * 32))
|
#define ETU_TO_SSP(x) ( (int32_t)((x) * 32) )
|
||||||
#define SSP_TO_ETU(x) ((uint32_t)((x) / 32))
|
#define SSP_TO_ETU(x) ( (int32_t)((x) / 32) )
|
||||||
|
|
||||||
#define ETU_TO_US(x) ((uint32_t)((((x) * 9440000) / 1000000) + 0.5))
|
#define ONE_ETU_IN_US (12800000.0 / 1356000.0)
|
||||||
#define US_TO_ETU(x) ((uint32_t)(((x) * 1000000 / 9440000) + 0.5))
|
#define ETU_TO_US(x) (float)(ONE_ETU_IN_US * (x))
|
||||||
|
|
||||||
|
// #define ETU_TO_US(x) ( (int32_t)( ((x) * 9440000) / 1000000) )
|
||||||
|
#define US_TO_ETU(x) ( (int32_t)( ((x) * 1000000) / 9440000) )
|
||||||
|
|
||||||
#endif // _ISO14B_H_
|
#endif // _ISO14B_H_
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue