From 333233717bfc198fb115185947798b3ad98350da Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 22 Oct 2024 11:03:02 +1300 Subject: [PATCH] Imported changes from files generated by latest cbexigen. Signed-off-by: Ashley --- include/cbv2g/common/exi_bitstream.h | 2 +- lib/cbv2g/app_handshake/appHand_Decoder.c | 1 + lib/cbv2g/app_handshake/appHand_Encoder.c | 1 + lib/cbv2g/common/exi_basetypes_encoder.c | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/cbv2g/common/exi_bitstream.h b/include/cbv2g/common/exi_bitstream.h index 0d41de4..4e57222 100644 --- a/include/cbv2g/common/exi_bitstream.h +++ b/include/cbv2g/common/exi_bitstream.h @@ -39,7 +39,7 @@ extern "C" { typedef void (*exi_status_callback)(int message_id, int status_code, int value_1, int value_2); -typedef struct { +typedef struct exi_bitstream { /* byte array size and data */ uint8_t* data; size_t data_size; diff --git a/lib/cbv2g/app_handshake/appHand_Decoder.c b/lib/cbv2g/app_handshake/appHand_Decoder.c index 5da8d4a..bef01f3 100644 --- a/lib/cbv2g/app_handshake/appHand_Decoder.c +++ b/lib/cbv2g/app_handshake/appHand_Decoder.c @@ -26,6 +26,7 @@ #include "cbv2g/common/exi_header.h" #include "cbv2g/common/exi_types_decoder.h" #include "cbv2g/app_handshake/appHand_Datatypes.h" +#include "cbv2g/app_handshake/appHand_Decoder.h" diff --git a/lib/cbv2g/app_handshake/appHand_Encoder.c b/lib/cbv2g/app_handshake/appHand_Encoder.c index 43254e5..83e3079 100644 --- a/lib/cbv2g/app_handshake/appHand_Encoder.c +++ b/lib/cbv2g/app_handshake/appHand_Encoder.c @@ -24,6 +24,7 @@ #include "cbv2g/common/exi_error_codes.h" #include "cbv2g/common/exi_header.h" #include "cbv2g/app_handshake/appHand_Datatypes.h" +#include "cbv2g/app_handshake/appHand_Encoder.h" diff --git a/lib/cbv2g/common/exi_basetypes_encoder.c b/lib/cbv2g/common/exi_basetypes_encoder.c index 9bc3684..a8d2729 100644 --- a/lib/cbv2g/common/exi_basetypes_encoder.c +++ b/lib/cbv2g/common/exi_basetypes_encoder.c @@ -71,7 +71,7 @@ int exi_basetypes_encoder_bytes(exi_bitstream_t* stream, size_t bytes_len, const return EXI_ERROR__BYTE_BUFFER_TOO_SMALL; } - uint8_t* current_byte = (uint8_t*)bytes; + const uint8_t* current_byte = bytes; for (size_t n = 0; n < bytes_len; n++) { @@ -253,7 +253,7 @@ int exi_basetypes_encoder_characters(exi_bitstream_t* stream, size_t characters_ return EXI_ERROR__CHARACTER_BUFFER_TOO_SMALL; } - uint8_t* current_char = (uint8_t*)characters; + const uint8_t* current_char = (const uint8_t*)characters; for (size_t n = 0; n < characters_len; n++) {