PORT-MAPPED I / O (параллельный порт)

345
Abdul Rahman

Я читал драйверы устройств Linux и читал и писал из параллельных портов. Я читаю что-то с эффектом

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; 

Что касается последней строки в предыдущем абзаце, я не понимаю, какие порты на моем компьютере соответствуют 0x000 или 0x300. Как я понимаю, LPT1 отображается на 0x378, а LPT2 отображается на 0X278.

1

1 ответ на вопрос

1
Ignacio Vazquez-Abrams

Ничто из этого не говорит вам о том, что там отображается, это просто для разрешения доступа к портам. Если вы хотите узнать, что на самом деле там отображается, изучите содержимое /proc/ioportsкак root.

Похожие вопросы