1 /* SPDX-License-Identifier: eCos-2.0 */
3 *==========================================================================
7 * RedBoot stream handler for xyzModem protocol
9 *==========================================================================
10 *#####DESCRIPTIONBEGIN####
13 * Contributors: gthomas
18 * This code is part of RedBoot (tm).
20 *####DESCRIPTIONEND####
22 *==========================================================================
28 #include <linux/delay.h>
30 #define xyzModem_xmodem 1
31 #define xyzModem_ymodem 2
32 /* Don't define this until the protocol support is in place */
33 /*#define xyzModem_zmodem 3 */
35 #define xyzModem_access -1
36 #define xyzModem_noZmodem -2
37 #define xyzModem_timeout -3
38 #define xyzModem_eof -4
39 #define xyzModem_cancel -5
40 #define xyzModem_frame -6
41 #define xyzModem_cksum -7
42 #define xyzModem_sequence -8
44 #define xyzModem_close 1
45 #define xyzModem_abort 2
48 #define CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT
49 #define CYGACC_CALL_IF_SET_CONSOLE_COMM(x)
51 #define diag_vprintf vprintf
52 #define diag_printf printf
53 #define diag_vsprintf vsprintf
55 #define CYGACC_CALL_IF_DELAY_US(x) udelay(x)
65 int xyzModem_stream_open(connection_info_t *info, int *err);
66 void xyzModem_stream_close(int *err);
67 void xyzModem_stream_terminate(bool method, int (*getc)(void));
68 int xyzModem_stream_read(char *buf, int size, int *err);
69 char *xyzModem_error(int err);
71 #endif /* _XYZMODEM_H_ */