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