git.droids-corp.org
/
protos
/
xbee-avr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add send_hello command
[protos/xbee-avr.git]
/
rc_proto.h
diff --git
a/rc_proto.h
b/rc_proto.h
index
217bb96
..
a12de34
100644
(file)
--- a/
rc_proto.h
+++ b/
rc_proto.h
@@
-10,7
+10,7
@@
struct rc_proto_hdr {
#define RC_PROTO_HELLO 0
struct rc_proto_hello {
uint8_t type;
#define RC_PROTO_HELLO 0
struct rc_proto_hello {
uint8_t type;
- uint8_t datalen;
+ uint8_t datalen;
/* len of data excluding header */
uint8_t data[];
} __attribute__((packed));
uint8_t data[];
} __attribute__((packed));
@@
-18,7
+18,7
@@
struct rc_proto_hello {
#define RC_PROTO_ECHO_REQ 1
struct rc_proto_echo_req {
uint8_t type;
#define RC_PROTO_ECHO_REQ 1
struct rc_proto_echo_req {
uint8_t type;
- uint8_t datalen;
+ uint8_t datalen;
/* len of data excluding header */
uint8_t data[];
} __attribute__((packed));
uint8_t data[];
} __attribute__((packed));
@@
-26,7
+26,7
@@
struct rc_proto_echo_req {
#define RC_PROTO_ECHO_ANS 2
struct rc_proto_echo_ans {
uint8_t type;
#define RC_PROTO_ECHO_ANS 2
struct rc_proto_echo_ans {
uint8_t type;
- uint8_t datalen;
+ uint8_t datalen;
/* len of data excluding header */
uint8_t data[];
} __attribute__((packed));
uint8_t data[];
} __attribute__((packed));
@@
-52,6
+52,10
@@
struct rc_proto_ack {
uint8_t seq;
} __attribute__((packed));
uint8_t seq;
} __attribute__((packed));
+
+/* send a Hello message to a peer */
+int8_t rc_proto_send_hello(uint64_t addr, void *data, uint8_t data_len);
+
void rc_proto_rx_range(int power_level);
#endif
void rc_proto_rx_range(int power_level);
#endif