summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lmx2487lib.lua7
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