Root/
Source at commit 87cc67d5f7bdc1e5c67de41fb05a9efc643734aa created 11 years 9 months ago. By Werner Almesberger, fw/: add image data upload (completely untested) | |
---|---|
1 | /* |
2 | * fw/dispatch.h - Wireless protocol dispatcher |
3 | * |
4 | * Written 2012 by Werner Almesberger |
5 | * Copyright 2012 Werner Almesberger |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2 of the License, or |
10 | * (at your option) any later version. |
11 | */ |
12 | |
13 | #ifndef DISPATCH_H |
14 | #define DISPATCH_H |
15 | |
16 | #include <stdbool.h> |
17 | #include <stdint.h> |
18 | |
19 | #include "proto.h" |
20 | |
21 | |
22 | struct handler { |
23 | enum pck_type type; |
24 | bool (*first)(const uint8_t *payload); |
25 | bool (*more)(uint8_t seq, uint8_t limit, const uint8_t *payload); |
26 | }; |
27 | |
28 | |
29 | extern struct handler image_handler; |
30 | extern struct handler reset_handler; |
31 | |
32 | |
33 | bool dispatch(const uint8_t *buf, uint8_t len, const struct handler **protos); |
34 | |
35 | #endif /* !PROTO_H */ |
36 |
Branches:
master
tornado-v1