|
|
@@ -7,7 +7,7 @@ import "C"
|
|
|
import "unsafe"
|
|
|
|
|
|
// 通过串口使用 YMODEM 协议接收多个文件, >=0 实际成功接收的文件数, <0 接收过程中发生的错误
|
|
|
-func Ymodem_recv_files(dir string) int {
|
|
|
+func Recv_files(dir string) int {
|
|
|
dirC := C.CString(dir)
|
|
|
defer C.free(unsafe.Pointer(dirC))
|
|
|
ret := int(C.ymodem_recv_files(dirC))
|
|
|
@@ -15,7 +15,7 @@ func Ymodem_recv_files(dir string) int {
|
|
|
}
|
|
|
|
|
|
// 通过串口使用 YMODEM 协议发送一个文件, >=0 实际成功发送的字节数, <0 发送过程中发生的错误
|
|
|
-func Ymodem_send_file(path string) int {
|
|
|
+func Send_file(path string) int {
|
|
|
pathC := C.CString(path)
|
|
|
defer C.free(unsafe.Pointer(pathC))
|
|
|
ret := int(C.ymodem_send_file(pathC))
|