MT_GetSwitchStatus

■Description

Get the state of uSW of BX-320.

■Synopsis

int MT_GetSwitchStatus(int fd, PSWITCHSTATUS pSW)

■Argument

int fd
  Please specify handle acquired by MT_Open function.

PSWITCHSTATUS pSW
  Specify the Pointer to the structure that stores the state of the uSW.

  typedef struct _SwitchStatus {
    DWORD dwSW;
    DWORD dwReserved[ 15 ];
  } SwitchStatus, *PSwitchStatus;


The status is set for the member variable dwSW. dwReserved [15] is not used for reservation.
The acquired status has the following meaning. Please also refer to the manual of BOX - PC itself.
BX-320: Acquires the value read from I/O port 8802H. Store the state of Switch in bit 0 of variable dwSW. Values other than bit 0 are undefined.

■RETURN VALUE

If the function succeeds, NO_ERROR is returned.
Push ON : USW_ON is set for pSW -> lSW.
Push OFF : USW_OFF is set for pSW -> lSW.

If the function fails, a code other than NO_ERROR is returned.
The other errors : Error code details



Function List