PORT-MAPPED I / O (parallele Schnittstelle)

496
Abdul Rahman

Ich las in Linux-Gerätetreiber und las und schrieb an parallelen Ports. Ich habe etwas zur Wirkung von gelesen

ioperm(from, num, turn_on), where:  from is the first port number to give access to num the number of consecutive ports to give access to turn_on is a boolean value.  Example: ioperm(0x300, 5, 1) would give access to ports 0x300 through 0x304 (a total of 5 ports). The last argument is a Boolean value specifying whether to give access to the program to the ports (true (1)) or to remove access (false (0)). You can call ioperm() multiple times to enable multiple non-consecutive ports. ioperm() can only give access to ports 0x000 through 0x3ff; 

In der letzten Zeile des obigen Absatzes bin ich verwirrt darüber, welche Ports in meinem PC auf 0x000 oder 0x300 abgebildet sind. Wie ich es verstehe, ist LPT1 auf 0x378 und LPT2 auf 0X278 abgebildet.

1

1 Antwort auf die Frage

1
Ignacio Vazquez-Abrams

Nichts davon sagt Ihnen, was dort abgebildet ist, das heißt, um einfach auf die Ports zugreifen zu können. Wenn Sie wissen wollen, was dort tatsächlich gemappt ist, prüfen Sie den Inhalt von /proc/ioportsroot.