/* Enable the output direction of the specified GPIO.  */
int32_t gpio_direction_output(struct gpio_desc *desc, uint8_t value)
/* Enable the output direction of the specified GPIO.  */
int32_t gpio_direction_output(struct gpio_desc *desc, uint8_t value)
{
	int32_t ret;
	uint16_t pin;
	uint8_t port;
	gpio_get_portpin(desc, &pin, &port);
	ret = adi_gpio_OutputEnable(port, pin, true);
	if(ret != SUCCESS)
		return ret;
	if(value == 1)
		return adi_gpio_SetHigh(port, pin);
	else
		return adi_gpio_SetLow(port, pin);
}