From f698b201adf18e0e046554d382531df1ae6d1d27 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 24 Jan 2017 15:22:43 +0100 Subject: hwstub/jz4760b: fix some typos in lua script after register name changes Change-Id: Ie46ec293fcd5a16143818e77cd6c79cc08620fb5 --- utils/hwstub/tools/lua/fiiox1.lua | 3 ++- utils/hwstub/tools/lua/jz/gpio.lua | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'utils/hwstub/tools') 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 -- cgit v1.2.3