lf: change macros to allow float freq, change 134 -> 134.2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user