]> rtime.felk.cvut.cz Git - sysless.git/blob - arch/arm/mach-lpc21xx/tools/tolpc/tolpc_fn.h
cmdproc: Make backspace work even in sterm
[sysless.git] / arch / arm / mach-lpc21xx / tools / tolpc / tolpc_fn.h
1 #ifndef _TOLPC_FN_H
2 #define _TOLPC_FN_H
3
4 #include <bfd.h>
5
6 extern int tolpc_verbose_level;
7
8 struct tolpc_env {
9     // File descriptor and stream of open serial line
10     int fd;
11     //FILE *f;
12
13     char *sdev;                 // Serial device to open
14     int baud;                   // Communication baudrate
15     int crystal;                // Crtystal freq of LPC21xx
16     long waitrep;               // How long to wait for reply.
17   FILE *comm_stream;
18 };
19
20 void tolpc_verbose(int level, const char *fmt, ...);
21 //int tolpc_synchronize(struct tolpc_env *env);
22
23 int tolpc_open_target(struct tolpc_env *env);
24 int tolpc_go(struct tolpc_env *env, unsigned int start, char arm_mode);
25 int tolpc_partid(struct tolpc_env *env, char* part_id, int size);
26 int tolpc_break(struct tolpc_env *env);
27 int tolpc_write_ram(struct tolpc_env *env, unsigned int start, int length, unsigned char *data);
28 int tolpc_unlock(struct tolpc_env *env);
29 int tolpc_bootver(struct tolpc_env *env, char* part_id, int size);
30 int tolpc_echo(struct tolpc_env *env, char on);
31
32 #endif /* _TOLPC_FN_H */
33
34