Updated: April 19, 2023 |
Control a device
#include <sys/types.h> #include <unistd.h> #include <devctl.h> int posix_devctl( int filedes, int dcmd, void * dev_data_ptr, size_t n_bytes, int * dev_info_ptr );
See devctl().
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The posix_devctl() function sends the device-specific command dcmd to the process managing the device opened as filedes. We've defined posix_devctl() to be an alias for devctl().
See devctl().
POSIX Part 26: Device Control Application Program Interface
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |