Hi,
I am currently working on the "ImpedanceMeasurement_4WireBioIsolated" example for ADuCM350, but for my application I need to add some input and output digital pin.
Where can I find a code example where some GPIOs are configured and used? (Input/Output, Pull-up/down resistor, set/clear bit)
Thanks for your help
Best Regards
Ivan
There is a set of example codes when you install the ADuCM350 installer. In the examples folder you'll see the "GpioTest" where you will find several basic commands. I copied several lines below from the example.
/* configure the pin as an output */ if ((Result = adi_GPIO_SetOutputEnable(pGPIOEntry->Port, pGPIOEntry->PinValue, true)) != ADI_GPIO_SUCCESS) { break; }
/* configure the pin as an input also */ if ((Result = adi_GPIO_SetInputEnable(pGPIOEntry->Port, pGPIOEntry->PinValue, true)) != ADI_GPIO_SUCCESS) { break; }
/* drive the pin high */ if ((Result = adi_GPIO_SetHigh(pGPIOEntry->Port, pGPIOEntry->PinValue)) != ADI_GPIO_SUCCESS) { break; }
/* drive the pin low */ if ((Result = adi_GPIO_SetLow(pGPIOEntry->Port, pGPIOEntry->PinValue)) != ADI_GPIO_SUCCESS) { break; }