summaryrefslogtreecommitdiffstats
path: root/utils/hwstub/tools/lua/stmp/digctl.lua
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-09-05 23:14:07 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-09-05 23:16:27 +0200
commitf40b15d0cbe726e72652fcd8ff775d08b19affda (patch)
treec1ba87d1be4dedea86825e45c30e4ee19a9b21e3 /utils/hwstub/tools/lua/stmp/digctl.lua
parentf13cad4c8ef0dae4393682d7da294ce63f0eb7f7 (diff)
downloadrockbox-f40b15d0cbe726e72652fcd8ff775d08b19affda.tar.gz
rockbox-f40b15d0cbe726e72652fcd8ff775d08b19affda.zip
hwstub: improve lcdif, digtctl, add sony nwz-e370
Change-Id: I5316cc9fd9addfca8a674628695fed1c1bf9269f
Diffstat (limited to 'utils/hwstub/tools/lua/stmp/digctl.lua')
-rw-r--r--utils/hwstub/tools/lua/stmp/digctl.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/hwstub/tools/lua/stmp/digctl.lua b/utils/hwstub/tools/lua/stmp/digctl.lua
index 8dfc13b7f2..2ef3551c77 100644
--- a/utils/hwstub/tools/lua/stmp/digctl.lua
+++ b/utils/hwstub/tools/lua/stmp/digctl.lua
@@ -35,4 +35,15 @@ function STMP.digctl.package()
end
return pack
+end
+
+function STMP.digctl.udelay(us)
+ local tend = HW.DIGCTL.MICROSECONDS.read() + us
+ while HW.DIGCTL.MICROSECONDS.read() < tend do
+
+ end
+end
+
+function STMP.digctl.mdelay(ms)
+ STMP.digctl.udelay(ms * 1000)
end \ No newline at end of file