diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-10-29 16:50:45 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-10-29 16:50:45 -0400 |
commit | b2ed5962d28ab36472084f70d52f033cf3e69330 (patch) | |
tree | 85e3cf19018265f9190d882065df97d931e8de2f /lmx2487lib.lua | |
parent | 0ba63b54e0faecc7f0c0ccc0dbbaddfd92f90408 (diff) | |
download | nodeMCU_rf_source_lmx2487-b2ed5962d28ab36472084f70d52f033cf3e69330.tar.gz nodeMCU_rf_source_lmx2487-b2ed5962d28ab36472084f70d52f033cf3e69330.zip |
added data sending part
Diffstat (limited to 'lmx2487lib.lua')
-rw-r--r-- | lmx2487lib.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lmx2487lib.lua b/lmx2487lib.lua index 8cdb36f..1312ccf 100644 --- a/lmx2487lib.lua +++ b/lmx2487lib.lua @@ -15,10 +15,17 @@ function set_lmx2487register(value, register) -- otherwise we do nothing end +function get_lmx2487register(register) + -- register labeled 0, 1, 2, ..., 7 + print("register " .. register .. " is set to " .. lmx2487_registers[register+1]) + return lmx2487_registers[register+1] +end + function send_register_lmx2487( register) if ( lmx2487_need_update[register] ) then print("sending register " .. register .. " with value " .. lmx2487_registers[register]) -- do hardware talking + microwire_send_data( get_lmx2487register( register ) lmx2487_need_update[register]=false end end |