GX5702, GX5704
Gx5733ModuleSetPort (nHandle, nPort, dwData, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5733 board. |
nPort |
SHORT |
Module port 0 (GX5733_PORT0) only. |
dwData |
DWORD |
Sets the port word value: 0-0xFFFFFFFF. Where bit 0 corresponds to channel 0 and bit 31 to channel 31. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
This function allows the module to be used as a port out. Prior to calling this function the module’s operating mode needs to be set to Port I/O (GX5733_MODULE_OPERATION_PORT_IO). Use the Gx5733ModuleSetOperationMode to set the module’s operating mode.
Note: Calling this function will clear the Module’s buffer.
The following example sets the module port 0 data:
SHORT nStatus;
Gx5733ModuleSetPort (nHandle, GX5733_PORT0, 0xAAAA5555, &nStatus);
Gx5733ModuleSetOperationMode, Gx5733ModuleGetOperationMode, Gx5733ModuleGetPort