ADICUP 360: How to Digital Read Value of GPIO Pin

Hey there,

I want to connect my ADCIUP360 to a switch so that whenever the switch is turned On or OFF the value of a variable can be modified. However I am unable to read whether the Pin is High or Low. There is a function in DioLib.c that says that it reads value of pin but I am unable to read its output as I am printing it on Serial using Putty but it returns empty.

@brief uint32_t DioRd(ADI_GPIO_TypeDef *pPort)
========== Reads values of port pins.
@param pPort :{pADI_GP0,pADI_GP1,pADI_GP2}
- pADI_GP0 for GP0.
- pADI_GP1 for GP1.
- pADI_GP2 for GP2.
@return value on port pins.
uint32_t DioRd(ADI_GPIO_TypeDef *pPort)
return (pPort->GPIN);

Kindly help me with this function as it also does not specifies the pin number to be read.

Parents Reply Children