Difference between revisions of "IO ports in Linux"
From Organic Design wiki
(may not need mircrocontroller for media center) |
m |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: | + | [[Category:Hardware]][[Category:Media Center]] |
From linux you need to be ''setuid()'' to get to the pins of an IO port. This is not problem because we run as root anyway. The function prototypes to look at are: | From linux you need to be ''setuid()'' to get to the pins of an IO port. This is not problem because we run as root anyway. The function prototypes to look at are: | ||
− | * | + | *include <asm/io.h> |
*ioperm() | *ioperm() | ||
*inw() | *inw() | ||
*outw() | *outw() | ||
+ | |||
+ | [[+Portio.c]] | ||
+ | |||
=See also= | =See also= | ||
*http://tldp.org/HOWTO/IO-Port-Programming-2.html | *http://tldp.org/HOWTO/IO-Port-Programming-2.html | ||
*http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html | *http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html |
Latest revision as of 01:22, 23 March 2007
From linux you need to be setuid() to get to the pins of an IO port. This is not problem because we run as root anyway. The function prototypes to look at are:
- include <asm/io.h>
- ioperm()
- inw()
- outw()