Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
c33289ac
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c33289ac
编写于
8月 04, 2022
作者:
mysterywolf
提交者:
mysterywolf
8月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ymodem] move error codes to rym_code to silence warnings
上级
16ceacda
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
24 deletion
+12
-24
components/utilities/ymodem/ymodem.h
components/utilities/ymodem/ymodem.h
+12
-24
未找到文件。
components/utilities/ymodem/ymodem.h
浏览文件 @
c33289ac
/*
* COPYRIGHT (C) 2011-202
1
, Real-Thread Information Technology Ltd
* COPYRIGHT (C) 2011-202
2
, Real-Thread Information Technology Ltd
* All rights reserved
*
* SPDX-License-Identifier: Apache-2.0
...
...
@@ -8,6 +8,7 @@
* Date Author Notes
* 2013-04-14 Grissiom initial implementation
* 2019-12-09 Steven Liu add YMODEM send protocol
* 2022-08-04 Meco Man move error codes to rym_code to silence warnings
*/
#ifndef __YMODEM_H__
...
...
@@ -17,7 +18,6 @@
#include <string.h>
/* The word "RYM" is stand for "Real-YModem". */
enum
rym_code
{
RYM_CODE_NONE
=
0x00
,
...
...
@@ -28,29 +28,17 @@ enum rym_code
RYM_CODE_NAK
=
0x15
,
RYM_CODE_CAN
=
0x18
,
RYM_CODE_C
=
0x43
,
};
/* RYM error code
*
* We use the rt_err_t to return error values. We take use of current error
* codes available in RTT and append ourselves.
*/
/* timeout on handshake */
#define RYM_ERR_TMO 0x70
/* wrong code, wrong SOH, STX etc. */
#define RYM_ERR_CODE 0x71
/* wrong sequence number */
#define RYM_ERR_SEQ 0x72
/* wrong CRC checksum */
#define RYM_ERR_CRC 0x73
/* not enough data received */
#define RYM_ERR_DSZ 0x74
/* the transmission is aborted by user */
#define RYM_ERR_CAN 0x75
/* wrong answer, wrong ACK or C */
#define RYM_ERR_ACK 0x76
/* transmit file invalid */
#define RYM_ERR_FILE 0x77
/* RYM error code */
RYM_ERR_TMO
=
0x70
,
/* timeout on handshake */
RYM_ERR_CODE
=
0x71
,
/* wrong code, wrong SOH, STX etc */
RYM_ERR_SEQ
=
0x72
,
/* wrong sequence number */
RYM_ERR_CRC
=
0x73
,
/* wrong CRC checksum */
RYM_ERR_DSZ
=
0x74
,
/* not enough data received */
RYM_ERR_CAN
=
0x75
,
/* the transmission is aborted by user */
RYM_ERR_ACK
=
0x76
,
/* wrong answer, wrong ACK or C */
RYM_ERR_FILE
=
0x77
,
/* transmit file invalid */
};
/* how many ticks wait for chars between packet. */
#ifndef RYM_WAIT_CHR_TICK
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录