chiark
/
gitweb
/
~ijackson
/
trains.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hostside: hidrawconv: cope with difference between 2.6.26 and 2.6.33, guessing the...
[trains.git]
/
hostside
/
hidrawconv-joytechneos.c
diff --git
a/hostside/hidrawconv-joytechneos.c
b/hostside/hidrawconv-joytechneos.c
index 64b6a2bd36573989a7808bc7c16066fbbf3c2d0c..adeb086191038b0b26dbf33cf7b3edded17cd8b3 100644
(file)
--- a/
hostside/hidrawconv-joytechneos.c
+++ b/
hostside/hidrawconv-joytechneos.c
@@
-29,11
+29,21
@@
static void pr(const uint8_t *msg, int msglen, const uint8_t *last) {
reportlocs(msg, last, msglen, vallocs);
}
reportlocs(msg, last, msglen, vallocs);
}
+ProcessReport *const nested_processors[MAXREPORTS]= {
+ [0x4a] = pr
+};
+
const char *progname= "hidrawconv-joytechneos";
const char *const descriptor=
"05010904a101854a0901a1000501093009311580257f350045ff660000750895028102c0050209ba150026ff00750895018102050209bb150026ff007508950181020501093915012508360000463b016514750895018102950c7501050945013500150025011901290c810295040605ff09018102c005140924a101854d150026ff000931750895079182c005010906a101854b050719e029e71500250175019508810295017508810195057501050819012905910295017503910195057508150025680507190029688100c0";
const char *progname= "hidrawconv-joytechneos";
const char *const descriptor=
"05010904a101854a0901a1000501093009311580257f350045ff660000750895028102c0050209ba150026ff00750895018102050209bb150026ff007508950181020501093915012508360000463b016514750895018102950c7501050945013500150025011901290c810295040605ff09018102c005140924a101854d150026ff000931750895079182c005010906a101854b050719e029e71500250175019508810295017508810195057501050819012905910295017503910195057508150025680507190029688100c0";
+static LastReports inner_lasts;
+
+static void pr_outer(const uint8_t *msg, int msglen, const uint8_t *last) {
+ dispatch(&inner_lasts,"inner message: ",nested_processors, msg+1,msglen-1);
+}
+
ProcessReport *const report_processors[MAXREPORTS]= {
ProcessReport *const report_processors[MAXREPORTS]= {
- [0x
4a] = p
r
+ [0x
00] = pr_oute
r
};
};