/* Set the IMU3000 sample rate. 
The internal sampling rate is 1KHz for all filter bandwidths except 256Hz, which uses an 8KHz internal rate. */
static bool imu3000_set_sample_rate(sensor_hal_t *hal, int16_t rate)
/* Set the IMU3000 sample rate. 
The internal sampling rate is 1KHz for all filter bandwidths except 256Hz, which uses an 8KHz internal rate. */
static bool imu3000_set_sample_rate(sensor_hal_t *hal, int16_t rate)
{
	uint16_t const internal_rate = (hal->bandwidth == 256) ? 8000 : 1000;
	uint8_t const divider = (internal_rate / rate) - 1;
	sensor_bus_put(hal, IMU3000_SMPLRT_DIV, divider);
	return true;
}