libdragon
Loading...
Searching...
No Matches
Macros | Functions
ioctl.h File Reference

ioctl Implementation More...

Go to the source code of this file.

Macros

#define _IO(type, nr)   ((((type) & 0xFFFF) << 16)|((nr) & 0xFFFF))
 Generate an ioctl Command Code.
 

Functions

int ioctl (int fd, unsigned long cmd, void *argp)
 Perform IO Control Request.
 

Detailed Description

ioctl Implementation

Author
gamemasterplc gamem.nosp@m.aste.nosp@m.rplc@.nosp@m.gmai.nosp@m.l.com

Macro Definition Documentation

◆ _IO

#define _IO (   type,
  nr 
)    ((((type) & 0xFFFF) << 16)|((nr) & 0xFFFF))

Generate an ioctl Command Code.

Parameters
[in]typeA 16-bit number, often a character literal, specific to a subsystem or driver
[in]nrA 16-bit number identifying the specific command, unique for a given value of 'type'
Returns
An ioctl Command Code

Function Documentation

◆ ioctl()

int ioctl ( int  fd,
unsigned long  cmd,
void *  argp 
)

Perform IO Control Request.

Parameters
[in]fdFile handle
[in]cmdRequest ioctl command code
[in]argpPointer to a request-specific data structure
Returns
Zero on success, or a negative value on error.