/* CLI command to get and display the sample rate.  */
int32_t ad7124_8pmdz_odr_get(struct ad7124_8pmdz_dev *dev, uint8_t *arg)
/* CLI command to get and display the sample rate.  */
int32_t ad7124_8pmdz_odr_get(struct ad7124_8pmdz_dev *dev, uint8_t *arg)
{
	int32_t ret;
	float odr;
	uint8_t ascii_buff[50];
	ret = ad7124_8pmdz_odr_logic_get(dev, &odr);
	if (ret != SUCCESS) {
		cli_write_string(dev->cli_handler,
				 (uint8_t *)"ERROR: Can't get ODR.");
		return FAILURE;
	}
	sprintf((char *)ascii_buff, "New ODR is: %.3f", odr);
	return cli_write_string(dev->cli_handler, ascii_buff);
}