mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 01:57:05 +08:00
[ymodem] move error codes to rym_code to silence warnings
This commit is contained in:
parent
16ceacda80
commit
c33289ace7
@ -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
|
* All rights reserved
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
@ -8,6 +8,7 @@
|
|||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2013-04-14 Grissiom initial implementation
|
* 2013-04-14 Grissiom initial implementation
|
||||||
* 2019-12-09 Steven Liu add YMODEM send protocol
|
* 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__
|
#ifndef __YMODEM_H__
|
||||||
@ -17,7 +18,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* The word "RYM" is stand for "Real-YModem". */
|
/* The word "RYM" is stand for "Real-YModem". */
|
||||||
|
|
||||||
enum rym_code
|
enum rym_code
|
||||||
{
|
{
|
||||||
RYM_CODE_NONE = 0x00,
|
RYM_CODE_NONE = 0x00,
|
||||||
@ -28,29 +28,17 @@ enum rym_code
|
|||||||
RYM_CODE_NAK = 0x15,
|
RYM_CODE_NAK = 0x15,
|
||||||
RYM_CODE_CAN = 0x18,
|
RYM_CODE_CAN = 0x18,
|
||||||
RYM_CODE_C = 0x43,
|
RYM_CODE_C = 0x43,
|
||||||
};
|
|
||||||
|
|
||||||
/* RYM error code
|
/* RYM error code */
|
||||||
*
|
RYM_ERR_TMO = 0x70, /* timeout on handshake */
|
||||||
* We use the rt_err_t to return error values. We take use of current error
|
RYM_ERR_CODE = 0x71, /* wrong code, wrong SOH, STX etc */
|
||||||
* codes available in RTT and append ourselves.
|
RYM_ERR_SEQ = 0x72, /* wrong sequence number */
|
||||||
*/
|
RYM_ERR_CRC = 0x73, /* wrong CRC checksum */
|
||||||
/* timeout on handshake */
|
RYM_ERR_DSZ = 0x74, /* not enough data received */
|
||||||
#define RYM_ERR_TMO 0x70
|
RYM_ERR_CAN = 0x75, /* the transmission is aborted by user */
|
||||||
/* wrong code, wrong SOH, STX etc. */
|
RYM_ERR_ACK = 0x76, /* wrong answer, wrong ACK or C */
|
||||||
#define RYM_ERR_CODE 0x71
|
RYM_ERR_FILE = 0x77, /* transmit file invalid */
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* how many ticks wait for chars between packet. */
|
/* how many ticks wait for chars between packet. */
|
||||||
#ifndef RYM_WAIT_CHR_TICK
|
#ifndef RYM_WAIT_CHR_TICK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user