BMI323_SensorAPI
BMI323_SensorAPI copied to clipboard
check_data_index should check <= not <
In check_data_index there is the following check
if ((data_index + fifo_index) < fifo->length)
{
rslt = BMI3_OK;
}
This should have the following condition instead (data_index + fifo_index) < fifo->length. If data_index+fifo_index==fifo->length that just means that we will read all the data in the fifo not that we are going to overrun it.