From 60e397aebc8bfb9a98bc333451abd7208e499a2e Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Thu, 16 Mar 2023 16:20:13 +0100 Subject: [PATCH] Change ESCvar member datatypes * Align ESCvar.Alevent with ESC HW. Legacy it was 16-bit to be used with 2-byte mode SPI transfers that returned 0x220-0x221. * Increase size for fragments variables to avoid conversion warnings when counting mailbox data size. ESCvar.frags and ESCvar.fragsleft. --- soes/esc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soes/esc.h b/soes/esc.h index d06aa1e..f155087 100644 --- a/soes/esc.h +++ b/soes/esc.h @@ -489,8 +489,8 @@ typedef struct uint8_t segmented; void *data; uint16_t entries; - uint16_t frags; - uint16_t fragsleft; + uint32_t frags; + uint32_t fragsleft; uint16_t index; uint8_t subindex; uint16_t flags; @@ -506,7 +506,7 @@ typedef struct /* Volatile since it may be read from ISR */ volatile int watchdogcnt; volatile uint32_t Time; - volatile uint16_t ALevent; + volatile uint32_t ALevent; volatile int8_t synccounter; volatile _App App; uint8_t mbxdata[PREALLOC_BUFFER_SIZE];