61b104bb4ec9705e967c6d05459ccc434ea57b3f
[protos/xbee-avr.git] / rc_proto.h
1 #ifndef RC_PROTO_H
2 #define RC_PROTO_H
3
4 #define AXIS_NUMBER 4
5
6 #define RC_PROTO_TYPE_CHANNEL 0
7 #define RC_PROTO_TYPE_RANGE   1
8
9
10 /* TODO: Authenticate packet!! */
11
12 struct rc_proto_hdr {
13         uint8_t type;
14 };
15 struct rc_proto_channel {
16         uint8_t type;
17         int16_t axis[AXIS_NUMBER];
18 };
19
20 struct rc_proto_range {
21         uint8_t type;
22         uint8_t power_level;
23 };
24
25
26 void rc_proto_rx_range(int power_level);
27
28 #endif