aboutsummaryrefslogtreecommitdiff
path: root/center_fw/protocol.h
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2019-04-17 16:32:43 +0900
committerjaseg <git@jaseg.net>2019-04-17 16:32:43 +0900
commit9eef62547efdf8e18009b6d6d6b3f7c80bf64e13 (patch)
tree8594db8c91ddc47614859e4eabbc9e7cf36d0d09 /center_fw/protocol.h
parentf6b959086671fb1bf8b2003d5c5384c7311a7735 (diff)
download8seg-9eef62547efdf8e18009b6d6d6b3f7c80bf64e13.tar.gz
8seg-9eef62547efdf8e18009b6d6d6b3f7c80bf64e13.tar.bz2
8seg-9eef62547efdf8e18009b6d6d6b3f7c80bf64e13.zip
center/fw: Add backchannel infrastructure
Untested!
Diffstat (limited to 'center_fw/protocol.h')
-rw-r--r--center_fw/protocol.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/center_fw/protocol.h b/center_fw/protocol.h
index 9178c42..89c93e2 100644
--- a/center_fw/protocol.h
+++ b/center_fw/protocol.h
@@ -2,6 +2,7 @@
#define __PROTOCOL_H__
#include <stdint.h>
+#include <stdbool.h>
#define PKT_TYPE_BULK_FLAG 0x80
@@ -12,7 +13,7 @@ struct proto_rx_st {
int address;
uint8_t argbuf[8];
int offset;
- struct command_if_def *cmd_if;
+ const struct command_if_def *cmd_if;
};
struct command_if_def {
@@ -20,10 +21,13 @@ struct command_if_def {
int payload_len[0];
};
+extern volatile uint32_t decoding_error_cnt, protocol_error_cnt;
+extern volatile bool backchannel_frame;
+
/* Callback */
void handle_command(int command, uint8_t *args);
void receive_symbol(struct proto_rx_st *st, int symbol);
-void reset_receiver(struct proto_rx_st *st, struct command_if_def *cmd_if);
+void reset_receiver(struct proto_rx_st *st, const struct command_if_def *cmd_if);
#endif