forked from MagerValp/CGTerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xfer.h
34 lines (28 loc) · 800 Bytes
/
xfer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
typedef enum direction {
DIR_NONE = 0,
DIR_SEND,
DIR_RECV
} Direction;
typedef enum protocol {
PROT_NONE = 0,
PROT_XMODEM,
PROT_XMODEMCRC,
PROT_XMODEM1K,
PROT_PUNTER
} Protocol;
extern Direction xfer_direction;
extern Protocol xfer_protocol;
extern char xfer_filename[];
extern int xfer_cancel;
extern int xfer_saved_bytes;
extern int xfer_file_size;
extern unsigned char xfer_buffer[];
extern int xfer_debug;
int xfer_recv(void);
void xfer_send(char *filename);
void xfer_save_file(char *filename);
void xfer_send_byte(unsigned char c);
signed int xfer_recv_byte(int timeout);
signed int xfer_recv_byte_error(int timeout, int errorcnt);
int xfer_save_data(unsigned char *data, int length);
int xfer_load_data(unsigned char *data, int length);