summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-11 11:33:08 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-11 11:33:08 -0400
commit51b2a202407d0e3f11f0a7e62c19ae16902b0882 (patch)
tree3802538fab6eca152f427692786b5f90acb81b6c
parent80c53273e040db9abb7a7a0174327802abb9eb5d (diff)
downloadnodeMCU_rf_source_lmx2487-51b2a202407d0e3f11f0a7e62c19ae16902b0882.tar.gz
nodeMCU_rf_source_lmx2487-51b2a202407d0e3f11f0a7e62c19ae16902b0882.zip
FreqToSettingsBin -> FreqToSettings
-rw-r--r--lmx2487lib.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/lmx2487lib.lua b/lmx2487lib.lua
index bfaf717..ce504c7 100644
--- a/lmx2487lib.lua
+++ b/lmx2487lib.lua
@@ -102,7 +102,7 @@ mask_bits5to24=bit.bor(mask_bits5to14, mask_bits15to24)
mask_low12bits = bit.bit(12)-1
mask_bits13andAbove = bit.bnot(mask_low12bits)
-function FreqToSettingsBin(freq)
+function FreqToSettings(freq)
local freq, RF_N, RF_FN, RF_FD = freq2regestersValues(freq)
R0_new=get_lmx2487register(0)
R1_new=get_lmx2487register(1)
@@ -145,36 +145,36 @@ end
-- test setFreq
set_lmx2487_board_to_default_state()
-FreqToSettingsBin(6.834e9)
+FreqToSettings(6.834e9)
if
get_lmx2487register(0) ~= 11192320
and get_lmx2487register(1) ~= 4362243
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 16003291
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
-FreqToSettingsBin(6.8204e9)
+FreqToSettings(6.8204e9)
if
get_lmx2487register(0) ~= 11174912
and get_lmx2487register(1) ~= 4362243 -- should not change
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 15992043
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
-FreqToSettingsBin(6.8346e9)
+FreqToSettings(6.8346e9)
if
get_lmx2487register(0) ~= 11193856
and get_lmx2487register(1) ~= 4362243 -- should not change
and get_lmx2487register(2) ~= 8560613 -- should not change
and get_lmx2487register(5) ~= 16005163
then
- print("ERROR in FreqToSettingsBin: registers do not match")
+ print("ERROR in FreqToSettings: registers do not match")
end
function setFreq(freq)
- FreqToSettingsBin(freq)
+ FreqToSettings(freq)
update_lmx2487state()
end