6. RAS FEATURES IN HF-W100E/IoT
6-3
(1) Control function for the external general purpose outputs (GendoControlN)
<Name>
GendoControlN - Controls the external general purpose outputs (output1 to 8)
<Syntax>
DWORD GendoControlN(USINT usiOutput, USINT usiMask);
<Description of the functionality>
This function controls the external general purpose outputs (output1 to 8).
The parameters of this function are explained below.
usiOutput: Sets the output level to the general purpose outputs. Table 6-3 shows how
bits are allocated to each general purpose output. To set a general purpose
output to the low level, set the bit to “0”. To set the output to the high level,
set the bit to “1”.
usiMask: Specifies a general purpose output to be controlled. The bit allocation is the
same as usiOutput as shown in Table 6-3. If the parameter is to be controlled,
set the bit to “1”, Otherwise, set the bit to “0”.
Table 6-3 Bit Allocation of usiOutput and usiMask for GendoContorlN
bit0
output1
bit1
output2
bit2
output3
bit3
output4
bit4
output5
bit5
output6
bit6
output7
bit7
output8
<Return value>
If this function completes successfully, the function returns RET_TRUE (0x01). If this
function terminates with an error, the function returns a value as follows.
Table 6-4 Return Value from the GendoControlN Function (Error Cases)
Return value
Description
W2KRAS_INVALID_PARAMETER (0x2001) There is an error in the specified arguments.
W2KRAS_INTERNAL_ERROR (0x2007)
An internal error has been generated.
W2KRAS_RESOURCE_LOCKED (0x2101)
Another process uses the same resources.
RET_FALSE (0x00)
An error other than
W2KRAS_INVALID_PARAMETER,
W2KRAS_INTERNAL_ERROR, or
W2KRAS_RESOURCE_LOCKED has been generated.