Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
70cad7de
Commit
70cad7de
authored
Apr 29, 2020
by
seregaxvm
Committed by
Marcel Stör
Jun 09, 2020
Browse files
fix liquidcrystal luacheck warnings (#3081)
Co-authored-by:
Matsievskiy S.V
<
matsievskiysv@gmail.com
>
parent
bbeb09b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
lua_modules/liquidcrystal/lc-gpio4bit.lua
View file @
70cad7de
...
...
@@ -56,25 +56,25 @@ return function(bus_args)
-- Return backend object
return
{
fourbits
=
true
,
command
=
function
(
screen
,
cmd
)
command
=
function
(
_
,
cmd
)
return
send4bitGPIO
(
cmd
,
false
,
false
,
false
)
end
,
busy
=
function
(
screen
)
busy
=
function
(
_
)
if
rw
==
nil
then
return
false
end
return
bit
.
isset
(
send4bitGPIO
(
0xff
,
false
,
true
,
true
),
7
)
end
,
position
=
function
(
screen
)
position
=
function
(
_
)
if
rw
==
nil
then
return
0
end
return
bit
.
clear
(
send4bitGPIO
(
0xff
,
false
,
true
,
true
),
7
)
end
,
write
=
function
(
screen
,
value
)
write
=
function
(
_
,
value
)
return
send4bitGPIO
(
value
,
true
,
false
,
false
)
end
,
read
=
function
(
screen
)
read
=
function
(
_
)
if
rw
==
nil
then
return
nil
end
return
send4bitGPIO
(
0xff
,
true
,
true
,
true
)
end
,
backlight
=
function
(
screen
,
on
)
backlight
=
function
(
_
,
on
)
if
(
bl
)
then
gpio
.
write
(
bl
,
on
and
gpio
.
HIGH
or
gpio
.
LOW
)
end
return
on
end
,
...
...
lua_modules/liquidcrystal/lc-gpio8bit.lua
View file @
70cad7de
...
...
@@ -53,25 +53,25 @@ return function(bus_args)
-- Return backend object
return
{
fourbits
=
false
,
command
=
function
(
screen
,
cmd
)
command
=
function
(
_
,
cmd
)
return
send8bitGPIO
(
cmd
,
false
,
false
,
false
)
end
,
busy
=
function
(
screen
)
busy
=
function
(
_
)
if
rw
==
nil
then
return
false
end
return
bit
.
isset
(
send8bitGPIO
(
0xff
,
false
,
true
,
true
),
7
)
end
,
position
=
function
(
screen
)
position
=
function
(
_
)
if
rw
==
nil
then
return
0
end
return
bit
.
clear
(
send8bitGPIO
(
0xff
,
false
,
true
,
true
),
7
)
end
,
write
=
function
(
screen
,
value
)
write
=
function
(
_
,
value
)
return
send8bitGPIO
(
value
,
true
,
false
,
false
)
end
,
read
=
function
(
screen
)
read
=
function
(
_
)
if
rw
==
nil
then
return
nil
end
return
send8bitGPIO
(
0xff
,
true
,
true
,
true
)
end
,
backlight
=
function
(
screen
,
on
)
backlight
=
function
(
_
,
on
)
if
(
bl
)
then
gpio
.
write
(
bl
,
on
and
gpio
.
HIGH
or
gpio
.
LOW
)
end
return
on
end
,
...
...
lua_modules/liquidcrystal/lc-i2c4bit.lua
View file @
70cad7de
...
...
@@ -73,26 +73,26 @@ return function(bus_args)
-- Return backend object
return
{
fourbits
=
true
,
command
=
function
(
screen
,
cmd
)
command
=
function
(
_
,
cmd
)
return
send4bitI2C
(
cmd
,
false
,
false
,
false
)
end
,
busy
=
function
(
screen
)
busy
=
function
(
_
)
local
rv
=
send4bitI2C
(
0xff
,
false
,
true
,
true
)
send4bitI2C
(
bit
.
bor
(
0x80
,
bit
.
clear
(
rv
,
7
)),
false
,
false
,
false
)
return
bit
.
isset
(
rv
,
7
)
end
,
position
=
function
(
screen
)
position
=
function
(
_
)
local
rv
=
bit
.
clear
(
send4bitI2C
(
0xff
,
false
,
true
,
true
),
7
)
send4bitI2C
(
bit
.
bor
(
0x80
,
rv
),
false
,
false
,
false
)
return
rv
end
,
write
=
function
(
screen
,
value
)
write
=
function
(
_
,
value
)
return
send4bitI2C
(
value
,
true
,
false
,
false
)
end
,
read
=
function
(
screen
)
read
=
function
(
_
)
return
send4bitI2C
(
0xff
,
true
,
true
,
true
)
end
,
backlight
=
function
(
screen
,
on
)
backlight
=
function
(
_
,
on
)
backlight
=
on
local
rv
=
bit
.
clear
(
send4bitI2C
(
0xff
,
false
,
true
,
true
),
7
)
send4bitI2C
(
bit
.
bor
(
0x80
,
rv
),
false
,
false
,
false
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment