fixup uart examples
This commit is contained in:
parent
231db92619
commit
21122827e6
|
@ -43,7 +43,7 @@ uart.on("data", 4,
|
||||||
if data=="quit" then
|
if data=="quit" then
|
||||||
uart.on("data") -- unregister callback function
|
uart.on("data") -- unregister callback function
|
||||||
end
|
end
|
||||||
end, 0)
|
end)
|
||||||
-- when '\r' is received.
|
-- when '\r' is received.
|
||||||
uart.on("data", "\r",
|
uart.on("data", "\r",
|
||||||
function(data)
|
function(data)
|
||||||
|
@ -51,7 +51,7 @@ uart.on("data", "\r",
|
||||||
if data=="quit\r" then
|
if data=="quit\r" then
|
||||||
uart.on("data") -- unregister callback function
|
uart.on("data") -- unregister callback function
|
||||||
end
|
end
|
||||||
end, 0)
|
end)
|
||||||
|
|
||||||
-- uart 2
|
-- uart 2
|
||||||
uart.on(2, "data", "\r",
|
uart.on(2, "data", "\r",
|
||||||
|
|
Loading…
Reference in New Issue