xmodem - xmodem Drive#
Adaptation status unknown
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
Example
--Note: due to the use of sys.wait() all apis need to be used in the coroutine
-- Usage Examples
local xmodem = require "xmodem"
sys.taskInit(function()
xmodem.send(2,115200,"/luadb/test.bin")
while 1 do
sys.wait(1000)
end
end)
xmodem.send(uart_id, uart_br, file_path,type)#
xmodem Send File
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
uart_id uart Port number |
number |
uart_br uart Baud rate |
string |
file_path File Path |
bool |
type 1k/128 Default 1k |
Return Value
return value type |
explanation |
---|---|
bool |
Send Results |
Examples
xmodem.send(2,115200,"/luadb/test.bin")
xmodem.close(uart_id)#
Close xmodem
Parameters
Incoming Value Type |
Explanation |
---|---|
number |
uart_id uart Port number |
Return Value
None
Examples
-- After the xmodem transmission is executed, it is recommended to close the xmodem context regardless of whether the transmission is successful or not.uart
xmodem.close(2)