bugfix: adding brackets for proper Operator Precedence (#275)

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-08-09 14:59:46 -04:00 committed by GitHub
parent 14f3a341f9
commit b73770fe85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -12,14 +12,16 @@
#define WB_OPCODE_DATA 2
#define WB_OPCODE_REBOOT 3
#define WB_BL_BASE (WB_BL_HEADER << 4)
// 0xEF0'0000
#define WB_BL_ENTER ((WB_BL_HEADER << 4 + WB_OPCODE_START) << 16)
#define WB_BL_ENTER ((WB_BL_BASE + WB_OPCODE_START) << 16)
// 0xEF1'5A5A
#define WB_BL_ERASE ((WB_BL_HEADER << 4 + WB_OPCODE_ERASE) << 16 + WB_ERASE_TAG)
#define WB_BL_ERASE ((WB_BL_BASE + WB_OPCODE_ERASE) << 16 + WB_ERASE_TAG)
// 0xEF2'0000
#define WB_BL_DATA_BASE ((WB_BL_HEADER << 4 + WB_OPCODE_DATA) << 16)
#define WB_BL_DATA_BASE ((WB_BL_BASE + WB_OPCODE_DATA) << 16)
// 0xEF3'0000
#define WB_BL_REBOOT ((WB_BL_HEADER << 4 + WB_OPCODE_REBOOT) << 16)
#define WB_BL_REBOOT ((WB_BL_BASE + WB_OPCODE_REBOOT) << 16)
#define WB_MSG_SET_INDEX 0xEF4'0000
#define WB_MGS_ECU_STATUS 0xEF5'0000
#define WB_DATA_BASE_ADDR 0x190