--- /dev/null
+#ifndef HIDRAWCONV_H
+#define HIDRAWCONV_H
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include "common.h"
+
+#define MAXREPORTLEN 256
+#define MAXREPORTS 256
+
+typedef void ProcessReport(uint8_t msg[MAXREPORTLEN], int msglen,
+ const uint8_t last[MAXREPORTLEN]);
+
+extern const char *const descriptor;
+extern ProcessReport *const report_processors[MAXREPORTS];
+
+typedef struct {
+ const char *str;
+ int pos;
+ uint8_t mask;
+} KeyBit;
+
+typedef struct {
+ const char *str;
+ int pos, rshift, sign; /* mask is applied before rshift */
+ uint8_t mask, zero;
+} ValLoc;
+
+void reportbits(const uint8_t msg[], const uint8_t last[],
+ int len, const KeyBit bits[]);
+
+void reportlocs(const uint8_t msg[], const uint8_t last[],
+ int len, const ValLoc locs[]);
+
+#endif /*HIDRAWCONV_H*/