BUG Community

Welcome! Log In

Forums BUGmodules VonHippel GPIO Question

Subscribe to VonHippel GPIO Question  4 posts, 2 voices

Log in to reply to this topic
 
Feb 17, 2009 9:40pm
Img_missing_medium mgurr 2 posts

I’m having difficulties understanding how to use these pins. I can set them to make them inputs and outputs. I can also set each output pin to a 1 or 0. What I’m struggling with is how to read in from the input pins.

Thank you for your help. :D

Feb 19, 2009 11:23am
Medium Bug Labs team jconnolly 285 posts

mgurr
I'm having difficulties understanding how to use these pins. I can set them to make them inputs and outputs. I can also set each output pin to a 1 or 0. What I'm struggling with is how to read in from the input pins.

Thank you for your help. :D


Greetings mgurr,

The way to get the GPIO information from the VH device is to use the IVonHippelModuleControl interface, and getStatus() method. This returns an integer with the status of the GPIO pins encoded.

http://svn.buglabs.net/svn/!source/8228/bug/tags/release_candidates/RC1.4.7/com.buglabs.bug.module.vonhippel/com/buglabs/bug/module/vonhippel/pub/IVonHippelModuleControl.java#79

The encoding format can be found here:

http://svn.buglabs.net/svn/!source/8228/bug/tags/release_candidates/RC1.4.7/bug-linux-2.6.27.2/drivers/bmi/pims/vonhippel/bmi_vh.c#501

I'll get back to you about specifically which bits in the integer are the GPIO pin status bits.