From b2ed5962d28ab36472084f70d52f033cf3e69330 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 29 Oct 2020 16:50:45 -0400 Subject: added data sending part --- lmx2487lib.lua | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3