Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 8
Allow for the configuration of a module by an external source
static int devctrl( inout_module_t *pModule,
int event,
void *ptr );
This function lets an external source — typically another module —
configure a module.
It's invoked by an output module at arbitrary points of execution.
The pModule parameter holds a pointer to a module descriptor.
What this function should do depends on which layer it's in:
- Device
- If event is meaningful, assign type to
ptr and process. Read and update the pointer as
appropriate.
If event isn't meaningful, return -1 and set
errno to EINVAL.
- Protocol
- If event is meaningful, assign type to
ptr and process. Read and update the pointer as
appropriate.
If event isn't meaningful and there's a linked
input module, invoke the input module's devctrl()
callback.
|
To add a new DEVCTL command, make an entry in
include/const.h and define any data sent with the
DEVCTL in struct.h. |
EOK
Your code
Safety: | |
Interrupt handler |
Yes |
Signal handler |
Yes |
Thread |
Yes |
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 126
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/input/api/devctrl.html on line 126