/* If the new channel update rate is bigger than the ADC output data rate give warning message and adjust to a safe value. */
static void cn0414_adc_odr_check(struct cn0414_dev *dev, uint32_t *rate_index)
/* If the new channel update rate is bigger than the ADC output data rate give warning message and adjust to a safe value. */
static void cn0414_adc_odr_check(struct cn0414_dev *dev, uint32_t *rate_index)
{
	if(odr_actual_rate_values[*rate_index] <
	    (uint32_t)dev->adc_update_desc->f_update) {
		cn0414_status_update_rate(dev);
		usr_uart_write_string(dev->uart_descriptor,
				      (uint8_t*)
				      "ADC output data rate cannot be lower than the channel update rate.\n");
		usr_uart_write_string(dev->uart_descriptor,
				      (uint8_t*)"ODR has been adjusted to 31250 samples per second.\n");
		*rate_index = 0;
	}
}