i2c and gpio from C

836 views
Skip to first unread message

Victor Whiskey Yankee

unread,
Mar 22, 2012, 8:31:46 PM3/22/12
to panda...@googlegroups.com
Hello,
I am looking for how to interface with i2c and gpio from within a C program on the pandaboard.
Can anyone please post some C code?
Thanks!

Alison Chaiken

unread,
Mar 23, 2012, 12:08:41 AM3/23/12
to panda...@googlegroups.com
Victor Whiskey Yankee inquires:

> I am looking for how to interface with i2c and gpio from within a C program
> on the pandaboard.

Check out these slides form Hunyue Yau's recent talk at Embedded Linux
Conference:

https://events.linuxfoundation.org/images/stories/pdf/lf_elc12_yau.pdf

There should be a video as well somewhere.

--
Alison Chaiken
(650) 279-5600  (cell)                       {she-devel.com,
exerciseforthereader.org}
"User innovation is an advanced form of product management."  -- Dirk
Riehle, SAP
http://www.se-radio.net/2008/04/episode-94-open-source-business-models-with-dirk-riehle/

Victor Yankee

unread,
Mar 25, 2012, 4:51:13 PM3/25/12
to pandaboard
Alison,
Thank you for the kind reply. I read through the presentation you
suggested. But although using GPIO and i2c is mentioned and a few very
narrow technical details are also mentioned, I am left where I was
before... knowing it is possible but knowing exactly how.

What I am really looking for is a complete source code example of
opening, reading and writing to an i2c and gpio from C.

Vic
> Riehle, SAPhttp://www.se-radio.net/2008/04/episode-94-open-source-business-model...

Erik Andresen

unread,
Mar 26, 2012, 1:33:47 AM3/26/12
to panda...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Read
- -Documentation/i2c/dev-interface
- -Documentation/gpio.txt
of your Linux kernel.
it will tell you all you need to know.

greetings,
Erik


- --
"Those who cannot remember the past are condemned to repeat it."
- -- George Santayana
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9v/7oACgkQ8NqlQQxmej7XLwCeOU0qxWRuElaet8BrCDweJR/r
YZQAn0CTNyAhkIhz35ElfbUi5JwtFwnd
=8sHl
-----END PGP SIGNATURE-----

Nigel Hsiung

unread,
Mar 27, 2012, 1:20:08 AM3/27/12
to panda...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages