Closed Steffen-W closed 1 year ago
Unfortunately, the iis3dwb_fifo_out_multi_raw_get function does not work correctly. Most likely it is due to sizeof(iis3dwb_fifo_out_raw_t).
iis3dwb_fifo_out_multi_raw_get
sizeof(iis3dwb_fifo_out_raw_t)
typedef struct { enum { IIS3DWB_XL_TAG = 2, IIS3DWB_TEMPERATURE_TAG, IIS3DWB_TIMESTAMP_TAG, } tag; uint8_t data[6]; } iis3dwb_fifo_out_raw_t; int32_t iis3dwb_fifo_out_multi_raw_get(stmdev_ctx_t *ctx, iis3dwb_fifo_out_raw_t *fdata, uint16_t num) { int32_t ret; /* read out all FIFO entries in a single read */ ret = iis3dwb_read_reg(ctx, IIS3DWB_FIFO_DATA_OUT_TAG, (uint8_t *)fdata, sizeof(iis3dwb_fifo_out_raw_t) * num); return ret; }
The enum has the size 4 byte. Probably the size 1 byte was expected. The flag "-fshort-enums" is not a option for me.
Hello @Steffen-W this is another problem related to what I described in #6, with the same root reason
Closed via PR #9
Unfortunately, the
iis3dwb_fifo_out_multi_raw_get
function does not work correctly. Most likely it is due tosizeof(iis3dwb_fifo_out_raw_t)
.The enum has the size 4 byte. Probably the size 1 byte was expected. The flag "-fshort-enums" is not a option for me.