From f6b959086671fb1bf8b2003d5c5384c7311a7735 Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 16 Apr 2019 23:38:46 +0900 Subject: center/fw: rename --- center_fw/protocol.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 center_fw/protocol.h (limited to 'center_fw/protocol.h') diff --git a/center_fw/protocol.h b/center_fw/protocol.h new file mode 100644 index 0000000..9178c42 --- /dev/null +++ b/center_fw/protocol.h @@ -0,0 +1,29 @@ +#ifndef __PROTOCOL_H__ +#define __PROTOCOL_H__ + +#include + +#define PKT_TYPE_BULK_FLAG 0x80 + +struct proto_rx_st { + int packet_type; + int is_bulk; + int rxpos; + int address; + uint8_t argbuf[8]; + int offset; + struct command_if_def *cmd_if; +}; + +struct command_if_def { + int packet_type_max; + int payload_len[0]; +}; + +/* 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); + +#endif -- cgit