2011-09-22 04:18:42 Gpio_get_value in 526
Ganesh krish (INDIA)
Message: 103496
Hi world,
When i enable PF6 as an interrupt , but in ISR i need to read the status of tht gpio pin for tht im using gpio_get_value(GPIO_PF6) .... I do get the interrupt when PF6 goes high to low , i set the interrupt as FALLING ,,, then when i read the status of PF6 , i get the value as 1 when its physically 0 and 0 when its value is physically 1 ,,,, i do get the opposite value of tht pin ..HELP !!!!
QuoteReplyEditDelete
2011-09-23 01:26:28 Re: Gpio_get_value in 526
Sonic Zhang (CHINA)
Message: 103506
What polarity of the PIN do you set?
QuoteReplyEditDelete
2011-09-23 14:03:07 Re: Gpio_get_value in 526
James Kosin (UNITED STATES)
Message: 103517
Ganesh,
The polarity of the inputs can be switched by writting a 0 or 1 to the "/sys/class/gpio/gpio{pin}/active_low" file. A 1 means that a 0 value will be read from the value file as a 1 and visa-versa. A 0 means that the values will be their true states 0 is 0 and 1 is 1.
Be sure to look carefully at your schematics: because it may actually be reversed in hardware also.
James