mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
lf: change macros to allow float freq, change 134 -> 134.2
This commit is contained in:
parent
cb06bea448
commit
eb7268cd98
5 changed files with 15 additions and 14 deletions
|
@ -590,9 +590,10 @@ typedef struct {
|
|||
#define PM3_EFATAL -99
|
||||
|
||||
// LF
|
||||
#define LF_DIVISOR(f) (((12000 + (f)/2)/(f))-1)
|
||||
#define LF_DIVISOR_125 LF_DIVISOR(125)
|
||||
#define LF_DIVISOR_134 LF_DIVISOR(134)
|
||||
#define LF_FREQ2DIV(f) ((int)(((12000.0 + (f)/2.0)/(f))-1))
|
||||
#define LF_DIVISOR_125 LF_FREQ2DIV(125)
|
||||
#define LF_DIVISOR_134 LF_FREQ2DIV(134.2)
|
||||
#define LF_DIV2FREQ(d) (12000.0/((d)+1))
|
||||
|
||||
// Receiving from USART need more than 30ms as we used on USB
|
||||
// else we get errors about partial packet reception
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue