]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/xyzModem.h
Convert CONFIG_BOOTCOUNT_ENV to Kconfig
[people/ms/u-boot.git] / include / xyzModem.h
CommitLineData
cf48eb9a
WD
1/*
2 *==========================================================================
3 *
4 * xyzModem.h
5 *
6 * RedBoot stream handler for xyzModem protocol
7 *
8 *==========================================================================
e85427fd 9 * SPDX-License-Identifier: eCos-2.0
cf48eb9a
WD
10 *==========================================================================
11 *#####DESCRIPTIONBEGIN####
12 *
13 * Author(s): gthomas
14 * Contributors: gthomas
15 * Date: 2000-07-14
16 * Purpose:
17 * Description:
18 *
19 * This code is part of RedBoot (tm).
20 *
21 *####DESCRIPTIONEND####
22 *
23 *==========================================================================
24 */
f2841d37
MK
25
26#ifndef _XYZMODEM_H_
27#define _XYZMODEM_H_
28
29#define xyzModem_xmodem 1
30#define xyzModem_ymodem 2
cf48eb9a
WD
31/* Don't define this until the protocol support is in place */
32/*#define xyzModem_zmodem 3 */
f2841d37
MK
33
34#define xyzModem_access -1
35#define xyzModem_noZmodem -2
36#define xyzModem_timeout -3
37#define xyzModem_eof -4
38#define xyzModem_cancel -5
39#define xyzModem_frame -6
40#define xyzModem_cksum -7
41#define xyzModem_sequence -8
42
43#define xyzModem_close 1
44#define xyzModem_abort 2
45
46
f2841d37
MK
47#define CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT
48#define CYGACC_CALL_IF_SET_CONSOLE_COMM(x)
49
50#define diag_vprintf vprintf
51#define diag_printf printf
52#define diag_vsprintf vsprintf
53
54#define CYGACC_CALL_IF_DELAY_US(x) udelay(x)
55
56typedef struct {
57 char *filename;
58 int mode;
59 int chan;
f2841d37
MK
60} connection_info_t;
61
f2841d37
MK
62
63
cf48eb9a
WD
64int xyzModem_stream_open(connection_info_t *info, int *err);
65void xyzModem_stream_close(int *err);
66void xyzModem_stream_terminate(bool method, int (*getc)(void));
67int xyzModem_stream_read(char *buf, int size, int *err);
f2841d37
MK
68char *xyzModem_error(int err);
69
cf48eb9a 70#endif /* _XYZMODEM_H_ */