forked from len0rd/rockbox
hwstub/jz4760b: fix some typos in lua script after register name changes
Change-Id: Ie46ec293fcd5a16143818e77cd6c79cc08620fb5
This commit is contained in:
parent
cc2389b7a6
commit
f698b201ad
2 changed files with 10 additions and 9 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue