chiark / gitweb /
e42b48c747ecd2ae0a646d9153a2724f847dd963
[trains.git] / hostside / skelproto-pic.h
1 /* @skeleton@ @1@ @L@ */
2 /*
3  * arranges for the declarations of
4  *  enco_pic_WHATEVER
5  *  on_pic_WHATEVER
6  * and the tables
7  * and related functions
8  */
9
10 #ifndef AUPROTO_PIC_H
11 #define AUPROTO_PIC_H
12
13 typedef struct PicInsnInfo PicInsnInfo;
14
15 void enco_pic_@cname@(PicInsn *out);            @h2p@ @arglentf=0@
16 void enco_pic_@cname@(PicInsn *out, int objum); @h2p@ @arglentf=1@
17
18 void on_pic_@cnameyn@(void);       @p2h@ @arglentf=0@
19 void on_pic_@cnameyn@(int objnum); @p2h@ @arglentf=1@
20
21 extern void enco_pic_polarity_begin(PicInsn *out);
22 extern void enco_pic_polarity_setbit(PicInsn *out, int objnum);
23 extern void on_pic_debug(int ch);
24
25 extern void enco_pic_anyinsn(PicInsn *out, const PicInsnInfo *pii, int objnum);
26
27 const PicInsnInfo *lookup_byopcode(Byte byte0, const PicInsnInfo *table);
28
29 struct PicInsnInfo {
30   const char *name;
31   Byte opcode, mask;
32   int argbits;
33 };
34
35 extern const PicInsnInfo pic_command_infos[], pic_reply_infos[];
36
37 #endif /*AUPROTO_PIC_H*/