summaryrefslogtreecommitdiffstats
path: root/utils/hwstub
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-24 15:22:43 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-24 15:22:43 +0100
commitf698b201adf18e0e046554d382531df1ae6d1d27 (patch)
tree5214b99c77553e20e2353baeabf82c87eef887ad /utils/hwstub
parentcc2389b7a61784c229b42da4abbc238a42e5173d (diff)
downloadrockbox-f698b201adf18e0e046554d382531df1ae6d1d27.tar.gz
rockbox-f698b201adf18e0e046554d382531df1ae6d1d27.tar.bz2
rockbox-f698b201adf18e0e046554d382531df1ae6d1d27.zip
hwstub/jz4760b: fix some typos in lua script after register name changes
Change-Id: Ie46ec293fcd5a16143818e77cd6c79cc08620fb5
Diffstat (limited to 'utils/hwstub')
-rw-r--r--utils/hwstub/tools/lua/fiiox1.lua3
-rw-r--r--utils/hwstub/tools/lua/jz/gpio.lua16
2 files changed, 10 insertions, 9 deletions
diff --git a/utils/hwstub/tools/lua/fiiox1.lua b/utils/hwstub/tools/lua/fiiox1.lua
index c038f4077b..4453951c29 100644
--- a/utils/hwstub/tools/lua/fiiox1.lua
+++ b/utils/hwstub/tools/lua/fiiox1.lua
@@ -92,7 +92,7 @@ function FIIOX1.init_lcd()
-- setup Fiio X1 specific pins
FIIOX1.setup_fiio_lcd_pins()
-- reset lcd
- JZ.lcd_reset()
+ FIIOX1.lcd_reset()
end
-- call with nil to get automatic name
@@ -139,6 +139,7 @@ function FIIOX1.dump_spl(file)
end
function FIIOX1.init()
+ FIIOX1.hw_detect()
FIIOX1.init_backligt()
FIIOX1.test_backlight()
FIIOX1.init_lcd()
diff --git a/utils/hwstub/tools/lua/jz/gpio.lua b/utils/hwstub/tools/lua/jz/gpio.lua
index d85529f9bb..d411de6acf 100644
--- a/utils/hwstub/tools/lua/jz/gpio.lua
+++ b/utils/hwstub/tools/lua/jz/gpio.lua
@@ -23,8 +23,8 @@ function JZ.gpio.pinmask(bank, mask)
end
t.gpio = function()
- HW.GPIO.FUN[bank].CLR.write(mask)
- HW.GPIO.SEL[bank].CLR.write(mask)
+ HW.GPIO.FUNCTION[bank].CLR.write(mask)
+ HW.GPIO.SELECT[bank].CLR.write(mask)
end
t.dir = function(out)
@@ -56,17 +56,17 @@ function JZ.gpio.pinmask(bank, mask)
end
t.std_function = function(fun_nr)
- HW.GPIO.FUN[bank].SET.write(mask)
+ HW.GPIO.FUNCTION[bank].SET.write(mask)
if fun_nr >= 2 then
- HW.GPIO.TRG[bank].SET.write(mask)
+ HW.GPIO.TRIGGER[bank].SET.write(mask)
fun_nr = fun_nr - 2
else
- HW.GPIO.TRG[bank].CLR.write(mask)
+ HW.GPIO.TRIGGER[bank].CLR.write(mask)
end
if fun_nr >= 2 then
- HW.GPIO.SEL[bank].SET.write(mask)
+ HW.GPIO.SELECT[bank].SET.write(mask)
else
- HW.GPIO.SEL[bank].CLR.write(mask)
+ HW.GPIO.SELECT[bank].CLR.write(mask)
end
end
return t
@@ -79,4 +79,4 @@ function JZ.gpio.pin(bank,pin)
return bit32.extract(HW.GPIO.IN[bank].read(), pin)
end
return t
-end \ No newline at end of file
+end