diff options
| author | Meco Man <[email protected]> | 2022-08-04 01:08:38 -0400 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2022-08-04 01:50:04 -0400 |
| commit | c33289ace78e7413005c0ea7e4e174ac8d2c0b58 (patch) | |
| tree | 6d56c110b90ba5503e2c4362a23eb5a980b09b12 | |
| parent | 16ceacda801d79871a86eac0711e18648cddfe4f (diff) | |
[ymodem] move error codes to rym_code to silence warnings
| -rw-r--r-- | components/utilities/ymodem/ymodem.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/components/utilities/ymodem/ymodem.h b/components/utilities/ymodem/ymodem.h index 2f05e4f2f2..398e168dfa 100644 --- a/components/utilities/ymodem/ymodem.h +++ b/components/utilities/ymodem/ymodem.h @@ -1,5 +1,5 @@ /* - * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd + * COPYRIGHT (C) 2011-2022, 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 |
