On Friday, November 2, 2012 3:07:24 PM UTC+5:30, vincent wrote:
>
> Hi All,
>
>         I am newer of Android and Linux. Now I am doing a task which 
> request to access GPIO in hwc.c or Surfaceflinger.cpp.
>
>         (I am using a panda board, and have light up it, now I want to 
> modify something).
>
>
You could try using user-space GPIO access. In the kernel documentation, 
check Documentation/gpio.txt. 
Basically, this boils down to 
  # echo GPIO_NUMBER > /sys/class/gpio/export
  # echo DIRECTION > /sys/class/gpio/direction  
  # echo VALUE > /sys/class/gpio/value
 
After you export the GPIO to user-space, you'd want to restrict permissions 
to the user-space GPIO node. I'd do this in some of the init scripts.

HTH
-- Shree

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to