Please refer to the "UsbSPIGpioMode" FW example provided along with the SDK.
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspigpiomode
For input pins following configuration is suitable:
gpioConfig.outValue = CyFalse;
gpioConfig.inputEn = CyTrue;
gpioConfig.driveLowEn = CyFalse;
gpioConfig.driveHighEn = CyFalse;
gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;
Thanks & Regards
NO, I wanna config a GPIO BOTH input and output function, not only input.
its simply config gpio into output mode
what i need is config GPIO into tri-stats that comfort IIC protool SDA need
We can not configure the GPIO in both input and output.
It can only work as either of two.
If you want this functionality, you have to modify the GPIO configuration whenever you want to switch to another mode (Input to Output or Vice versa).
FX3 comes with one I2C Master. Is this not meeting your requirements?
Why do you need another I2C Master here?