KSDIAGMODE (Enable/Disable Diagnostics Mode)

Purpose

Enables/disables diagnostics mode.

Syntax

#include <sys/inputdd.h>

int ioctl (FileDescriptor, KSDIAGMODE, Arg)
uint * Arg;

Description

The KSDIAGMODE ioctl subroutine call enables and disables keyboard diagnostics mode. When diagnostics mode is enabled, the keyboard driver undefines the keyboard driver interrupt handler and stops processing keyboard events. When diagnostics mode is disabled, the keyboard driver redefines its interrupt handler, then resets and reconfigures the keyboard.

When keyboard diagnostics mode is enabled, the following keyboard ioctl subroutine calls fail and set the errno global variable to a value of EBUSY:

Parameters

Item Description
FileDescriptor Specifies the open file descriptor for the keyboard.
Arg Specifies the address of an integer that is equal to one of the following values:
#define KSDDISABLE   0   /*Disables diagnostics mode.*/
#define KSDENABLE    1   /*Enables diagnostics mode.*/

Return Values

The KSDIAGMODE ioctl subroutine call returns a value of -1 and sets the errno global variable to a value of EINVAL when called by a kernel extension. The KSDIAGMODE ioctl subroutine call sets the errno global variable to a value of EBUSY on the RS1/RS2 platform when the tablet special file is open.