83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
70 lines
1.6 KiB
C
70 lines
1.6 KiB
C
/* SPDX-License-Identifier: eCos-2.0 */
|
|
/*
|
|
*==========================================================================
|
|
*
|
|
* xyzModem.h
|
|
*
|
|
* RedBoot stream handler for xyzModem protocol
|
|
*
|
|
*==========================================================================
|
|
*#####DESCRIPTIONBEGIN####
|
|
*
|
|
* Author(s): gthomas
|
|
* Contributors: gthomas
|
|
* Date: 2000-07-14
|
|
* Purpose:
|
|
* Description:
|
|
*
|
|
* This code is part of RedBoot (tm).
|
|
*
|
|
*####DESCRIPTIONEND####
|
|
*
|
|
*==========================================================================
|
|
*/
|
|
|
|
#ifndef _XYZMODEM_H_
|
|
#define _XYZMODEM_H_
|
|
|
|
#define xyzModem_xmodem 1
|
|
#define xyzModem_ymodem 2
|
|
/* Don't define this until the protocol support is in place */
|
|
/*#define xyzModem_zmodem 3 */
|
|
|
|
#define xyzModem_access -1
|
|
#define xyzModem_noZmodem -2
|
|
#define xyzModem_timeout -3
|
|
#define xyzModem_eof -4
|
|
#define xyzModem_cancel -5
|
|
#define xyzModem_frame -6
|
|
#define xyzModem_cksum -7
|
|
#define xyzModem_sequence -8
|
|
|
|
#define xyzModem_close 1
|
|
#define xyzModem_abort 2
|
|
|
|
|
|
#define CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT
|
|
#define CYGACC_CALL_IF_SET_CONSOLE_COMM(x)
|
|
|
|
#define diag_vprintf vprintf
|
|
#define diag_printf printf
|
|
#define diag_vsprintf vsprintf
|
|
|
|
#define CYGACC_CALL_IF_DELAY_US(x) udelay(x)
|
|
|
|
typedef struct {
|
|
char *filename;
|
|
int mode;
|
|
int chan;
|
|
} connection_info_t;
|
|
|
|
|
|
|
|
int xyzModem_stream_open(connection_info_t *info, int *err);
|
|
void xyzModem_stream_close(int *err);
|
|
void xyzModem_stream_terminate(bool method, int (*getc)(void));
|
|
int xyzModem_stream_read(char *buf, int size, int *err);
|
|
char *xyzModem_error(int err);
|
|
|
|
#endif /* _XYZMODEM_H_ */
|