/* Enable HART reception by enabling the demultiplexer that routes the AD5700 to the circuit inputs. To enable these multipliers the AD4111 GPIO0 must be driven high. */
int32_t cn0414_hart_enable(struct cn0414_dev *dev, uint8_t *arg)
/* Enable HART reception by enabling the demultiplexer that routes the AD5700 to the circuit inputs. To enable these multipliers the AD4111 GPIO0 must be driven high. */
int32_t cn0414_hart_enable(struct cn0414_dev *dev, uint8_t *arg)
{
	int32_t ret;
	ad717x_st_reg *preg;
	NVIC_DisableIRQ(TMR0_INT);
	NVIC_DisableIRQ(HART_CD_INT);
	AD717X_ReadRegister(dev->ad4111_device, AD717X_GPIOCON_REG);
	preg = AD717X_GetReg(dev->ad4111_device, AD717X_GPIOCON_REG);
	preg->value |= AD4111_GPIOCON_REG_DATA0;
	ret = AD717X_WriteRegister(dev->ad4111_device, AD717X_GPIOCON_REG);
	mdelay(5);
	modem_rec_flag = false;
	NVIC_EnableIRQ(TMR0_INT);
	NVIC_EnableIRQ(HART_CD_INT);
	return ret;
}