#include <stdlib.h>
#include <errno.h>
#include <assert.h>
+#include <string.h>
#include "hostside.h"
oprintf(&ps->cl->ch,"noop successful\n");
}
+typedef struct PicCmdInfo PicCmdInfo;
+struct PicCmdInfo {
+ const char *name;
+ Byte opcode;
+ int argbits;
+};
+
+static void cmd_pic(ParseState *ps, const CmdInfo *ci) {
+ if (!ps_needword(ps)) return;
+}
+
const CmdInfo toplevel_cmds[]= {
-#if 0
- { "pic", cmd_pic }, /* eg pic point 3 */
-#endif
+ { "pic", cmd_pic },
{ "nmra", cmd_nmra, },
{ "noop", cmd_noop },
{ 0 }
int l;
} Nmra;
+typedef struct PicInsn {
+ Byte d[COMMAND_ENCODED_MAX];
+ int l;
+} PicInsn;
+
/*---------- from serialio.c ----------*/
void vdie(const char *fmt, int ev, va_list al)
--- /dev/null
+/*
+ * arranges for the declarations of
+ * enco_pic_WHATEVER
+ * onrecv_pic_WHATEVER
+ * and the tables
+ */
+
+#ifndef PROTOCOL_H
+#define PROTOCOL_H
+
+#define HOST2PIC_0(n,o,a) extern void enco_pic_##n(PicInsn *out);
+#define HOST2PIC_1(n,o,a) extern void enco_pic_##n(PicInsn *out, int objnum);
+#define PIC2HOST_0(n,o,a) extern void on_pic_##n(void);
+#define PIC2HOST_1(n,o,a) extern void on_pic_##n(int objnum);
+#include "proto-spec.h"
+#undef HOST2PIC_0
+#undef HOST2PIC_1
+#undef PIC2HOST_0
+#undef PIC2HOST_1
+
+extern void enco_pic_polarity_begin(PicInsn *out);
+extern void enco_pic_polarity_setbit(PicInsn *out, int objnum);
+extern void on_pic_debug(int ch);
+
+typedef struct PicInsnInfo PicInsnInfo;
+struct PicInsnInfo {
+ const char *name;
+ Byte opcode;
+ int argbits;
+};
+
+#endif /*NMRA_H*/