3 API
functions
8
BpbGetStates function
Parameter
[in] HANDLE
hOpen
Pointer to open context (handle) for identification
[out] PBPBSTATES
pBpbStates
Pointer to the states structure
Return values
S_OK Successful
E_HANDLE
Incorrect (handle is invalid)
The states are returned in the BpbStates structure. In the following the organisation
of this structure is shown.
BpbState structure
Structure of the status register:
UCHAR
hRaw
Raw value of the status information
Name
hName
Status information of the controller and the groups
Structure of the name
Structure of the name:
Bit 0 .. bit 1
Controller
Status of the controller
Bit 2 .. bit 3
Group1
Status of group 1
Bit 4 .. bit 5
Group2
Status of group 2
Bit 6 .. bit 7
Group3
Status of group 3
The byte is divided according to the status byte of the 3241 controller status register
and the I/O modules configured.
Return values of the controller
1 BPB_
CONTROLLER_STATE_INIT
2
BPB_ CONTROLLER_STATE_PREOP
3 BPB_
CONTROLLER_STATE_OP
Return values of the group
0 BPB_GROUP_STATE_UNAVAILABLE
1
BPB_GROUP_STATE_INIT
2 BPB_GROUP_STATE_RUNNING
3
BPB_GROUP_STATE_ERROR
Please note: Under XP the grouping for the programming interface is simplified, so
that there only is one group. During transmission this group contains all output data,
and during reception it contains all input data.