From e83dedd9f930ad0cc27b313ba3ec3695baeebe20 Mon Sep 17 00:00:00 2001 From: Michele Fiorito Date: Mon, 30 Oct 2023 16:51:57 +0100 Subject: [PATCH] LibMDPI fixes --- etc/libbambu/libmdpi/include/mdpi/mdpi_ipc.h | 4 ++-- etc/libbambu/libmdpi/mdpi.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/libbambu/libmdpi/include/mdpi/mdpi_ipc.h b/etc/libbambu/libmdpi/include/mdpi/mdpi_ipc.h index 18dee7f65..d44f404fd 100644 --- a/etc/libbambu/libmdpi/include/mdpi/mdpi_ipc.h +++ b/etc/libbambu/libmdpi/include/mdpi/mdpi_ipc.h @@ -122,8 +122,8 @@ typedef struct byte_t buffer[4096]; } IPC_STRUCT_ATTR mdpi_op_mem_t; -#define MDPI_ARG_IDX_OUT_OF_BOUNDS -1 -#define MDPI_ARG_IDX_EMPTY -2 +#define MDPI_ARG_IDX_OUT_OF_BOUNDS (UINT8_MAX) +#define MDPI_ARG_IDX_EMPTY (UINT8_MAX - 1) typedef struct { diff --git a/etc/libbambu/libmdpi/mdpi.c b/etc/libbambu/libmdpi/mdpi.c index d60474aa5..0724187c2 100644 --- a/etc/libbambu/libmdpi/mdpi.c +++ b/etc/libbambu/libmdpi/mdpi.c @@ -202,7 +202,6 @@ void m_setarg(CONSTARG svLogicVecVal* data, unsigned int index) debug("Parameter %u write\n", index); - bitsize = m_getptrargsize(index); __ipc_reserve(__REMOTE_ENTITY); __remote_operation.type = MDPI_OP_TYPE_ARG_READ; __remote_operation.payload.arg.index = index;