From 26c89e8b0eb924a818eb96de60f2b4168a6449b1 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 12 Apr 2022 14:18:22 -0400 Subject: [PATCH] canboot: modify command bytes IDs This is just to avoid confusion between RX_EOF and the command trailer. Having both as 0x03 could potential lead to issues. Signed-off-by: Eric Callahan --- src/canboot_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/canboot_main.c b/src/canboot_main.c index 7b2c24c..c72982c 100644 --- a/src/canboot_main.c +++ b/src/canboot_main.c @@ -14,14 +14,14 @@ #define COMMAND_SIZE 8 #define CMD_BUF_SIZE 16 -#define CMD_CONNECT 0x01 -#define CMD_RX_BLOCK 0x02 -#define CMD_RX_EOF 0x03 -#define CMD_REQ_BLOCK 0x04 -#define CMD_COMPLETE 0x05 -#define ACK_COMMAND 0x10 -#define ACK_BLOCK_RX 0x11 -#define NACK 0x20 +#define CMD_CONNECT 0x11 +#define CMD_RX_BLOCK 0x12 +#define CMD_RX_EOF 0x13 +#define CMD_REQ_BLOCK 0x14 +#define CMD_COMPLETE 0x15 +#define ACK_COMMAND 0xa0 +#define ACK_BLOCK_RX 0xa1 +#define NACK 0xf0 // Command Format: // <4 byte header> <1 byte cmd> <2 byte arg> <1 byte trailer>