/* Disable HART reception by disabling the demultiplexer that routes the AD5700 to the circuit inputs. To enable these multipliers the AD4111 GPIO0 must be driven low. */
int32_t cn0414_hart_disable(struct cn0414_dev *dev, uint8_t *arg)
/* Disable HART reception by disabling the demultiplexer that routes the AD5700 to the circuit inputs. To enable these multipliers the AD4111 GPIO0 must be driven low. */
int32_t cn0414_hart_disable(struct cn0414_dev *dev, uint8_t *arg)
{
	ad717x_st_reg *preg;
	NVIC_DisableIRQ(TMR0_INT);
	NVIC_DisableIRQ(HART_CD_INT);
	preg = AD717X_GetReg(dev->ad4111_device, AD717X_GPIOCON_REG);
	preg->value &= ~AD4111_GPIOCON_REG_DATA0;
	NVIC_EnableIRQ(TMR0_INT);
	NVIC_EnableIRQ(HART_CD_INT);
	return AD717X_WriteRegister(dev->ad4111_device, AD717X_GPIOCON_REG);
}