IRQ handler rewrite by Gabor Juhos, uses C no longer assembly
[openwrt/svn-archive/archive.git] / target / linux / etrax-2.6 / image / e100boot / src / sbl / common.h
1 /*!***************************************************************************
2 *!
3 *! FILE NAME : common.h
4 *!
5 *! DESCRIPTION: Common stuff for e100boot.
6 *!
7 *! ---------------------------------------------------------------------------
8 *! HISTORY
9 *!
10 *! DATE NAME CHANGES
11 *! ---- ---- -------
12 *! 2002 05 02 Ronny Ranerup Initial version
13 *! ---------------------------------------------------------------------------
14 *! (C) Copyright 1999, 2000, 2001, 2002 Axis Communications AB, LUND, SWEDEN
15 *!***************************************************************************/
16 /************************** Include files ********************************/
17 /************************** Constants and macros *************************/
18 /* max length of argument strings */
19 #define MAX_STRING_LEN 256
20 /************************** Type definitions *****************************/
21 struct packet_buf {
22 unsigned int size;
23 struct packet_buf *next;
24 unsigned int seq;
25 char *data;
26 struct boot_files_T *boot_file;
27 unsigned int baud_rate;
28 };
29
30 struct boot_files_T {
31 char *fileName;
32 unsigned int *size_p; /* Pointer to size in boot_cmds. */
33 unsigned int size; /* Size of file. */
34 unsigned int size_sent; /* Number of bytes sent so far. */
35 struct boot_files_T *next;
36 FILE *fd;
37 };
38
39 /************************** Global variables *****************************/
40 extern int db1;
41 extern int db2;
42 extern int db3;
43 extern int db4;
44
45 extern char device[MAX_STRING_LEN];
46 extern struct packet_buf *first_packet;
47 extern int cmdsOnly; /* Just dump boot cmds to file. */
48 extern int toFiles; /* Dump all packets to files. */
49
50 /************************** Function prototypes **************************/
51
52 struct packet_buf* create_packet (unsigned int seq);
53 struct packet_buf* free_packet (struct packet_buf *p);
54 void find_string (char *str);
55
56
57