fixup uart examples

This commit is contained in:
Jade Mattsson 2024-10-24 12:05:11 +11:00
parent 231db92619
commit 21122827e6
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ uart.on("data", 4,
if data=="quit" then
uart.on("data") -- unregister callback function
end
end, 0)
end)
-- when '\r' is received.
uart.on("data", "\r",
function(data)
@ -51,7 +51,7 @@ uart.on("data", "\r",
if data=="quit\r" then
uart.on("data") -- unregister callback function
end
end, 0)
end)
-- uart 2
uart.on(2, "data", "\r",