/* Assert the nRTS pin, transmit the message and deassert nRTS pin. */
int32_t ad5700_transmit(struct ad5700_dev *dev, uint8_t *data, uint32_t size)
/* Assert the nRTS pin, transmit the message and deassert nRTS pin. */
int32_t ad5700_transmit(struct ad5700_dev *dev, uint8_t *data, uint32_t size)
{
	int32_t ret;
	ret = gpio_set_value(dev->gpio_nrts, GPIO_LOW);
	if(ret < 0)
		return ret;
	mdelay(6);
	ret = swuart_write_string(dev->swuart_desc, data, size);
	if(ret < 0)
		return ret;
	mdelay(6);
	return gpio_set_value(dev->gpio_nrts, GPIO_HIGH);
}