QNX中in32和out32函数

 内容来源于QNX IDE

1、in32()

#include 

uint32_t in32( uintptr_t port );

-----------------The in32() function reads a 32-bit value from the specified port.

注意:

The calling thread must have I/O privileges; see ThreadCtl()'s _NTO_TCTL_IO command for details.

-----------------------------ThreadCtl(_NTO_TCTL_IO, 0) ;

The calling process must also use mmap_device_io() to access the device's I/O registers.

 

2、out32()

#include 

void out32( uintptr_t port, 
            uint32_t val );

--------------The out32() function writes the 32-bit value, specified by val, to the specified port.

注意:

The calling thread must have I/O privileges; see ThreadCtl()'s _NTO_TCTL_IO command for details.

-----------------------------ThreadCtl(_NTO_TCTL_IO, 0) ;

The calling process must also use mmap_device_io() to access the device's I/O registers.

你可能感兴趣的:(QNX)