// +build ignore

#include "ymodem.h"

int main(int argc,char *argv[])
{
  // 发送测试
  int ret; const char *send_file_name = "./test.bin";
  int send_file_size = sw_file_getSize(send_file_name);
  if(send_file_size <= 0) return -1;
  ret = ymodem_send_file(send_file_name);
  sw_log_info("[%s] 发送测试结束 -> File: %s, Size: %d字节, Sent: %d字节", UART_MODULE_NAME, send_file_name, send_file_size, ret);

  // 接收测试
  ret = ymodem_recv_files("./received");
  sw_log_info("[%s] 接收测试结束 <- Received files: %d个", UART_MODULE_NAME, ret);

  return 0;
}
