annotate src/lwwire.h @ 10:36c4cda4b6c4

Add extension support with the PINGPONG extension Add extension support. There are two ways to add extensions: 1. as a shared object which will be loaded with ext=<filename> as a parameter to lwwire. See the lwwire_pingpong.c file for details. 2. By doing basically the same thing as a shared object but linking it into the main binary and calling lwwire_register_extension() appropriately.
author William Astle <lost@l-w.ca>
date Sat, 30 Jul 2016 13:16:39 -0600
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
1 /*
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
2 lwwire.h
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
3
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
4 */
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
5 #ifndef lwwire_h_seen___
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
6 #define lwwire_h_seen___
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
7
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
8 void lwwire_protoerror(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
9 int lwwire_readdata(void *, int, int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
10 int lwwire_writedata(void *, int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
11 void lwwire_write(void *, int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
12 int lwwire_read(void *, int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
13 int lwwire_read2(void *, int, int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
14 void lwwire_reset(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
15 int lwwire_fetch_sector(int dn, int lsn, void *);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
16 int lwwire_save_sector(int dn, int lsn, void *);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
17 int nonblock(int);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
18 int lwwire_drive_readononly(int dn);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
19 int lwwire_register_extension(int, int (*handler)(int), int (*enable)(void), int (*disable)(void), void (*reset)(void));
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
20 void lwwire_proto_read(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
21 void lwwire_proto_write(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
22 void lwwire_proto_readex(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
23 void lwwire_proto_requestextension(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
24 void lwwire_proto_disableextension(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
25 void lwwire_proto_extensionop(void);
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
26
36c4cda4b6c4 Add extension support with the PINGPONG extension
William Astle <lost@l-w.ca>
parents:
diff changeset
27 #endif // lwwire_h_seen___