Direction methods - These methods concern the direction of the bean (encapsulation of the direction of the allocated physical device).
The direction is expressed as a boolean value:
FALSE =
input,
TRUE =
output.
Value methods - These methods concern the input/output values
(
FALSE corresponds to logical "0" or "Low",
TRUE corresponds to logical "1" or "High") of the bean.
GetDir
- Returns the selected direction.
ANSIC prototype: bool GetDir(void)
- Return value:bool - Possible values:
FALSE - Input
TRUE - Output
SetDir
- Sets a pin direction (available only if the direction = input/output).
ANSIC prototype: void SetDir(bool Dir)
- Dir:bool - Direction to set. Possible values:
FALSE - Input
TRUE - Output
SetInput
- Sets a pin direction to input (available only if the direction = input/output).
ANSIC prototype: void SetInput(void)
SetOutput
- Sets a pin direction to output (available only if the direction = input/output).
ANSIC prototype: void SetOutput(void)
GetVal
- Returns the value of the input/output value. If the direction is input then the input value of the pin is read and returned. If the direction is output then the last written value is returned (see Safe mode property for limitations).
ANSIC prototype: bool GetVal(void)
- Return value:bool - Input value. Possible values:
FALSE - logical "0" (Low level)
TRUE - logical "1" (High level)
PutVal
- The specified output value is set. If the direction is input, the bean saves the value to a memory or a register and this value will be written to the pin after switching to the output mode (using SetDir(TRUE); see Safe mode property for limitations). If the direction is output, it writes the value to the pin. (Method is available only if the direction = output or input/output).
ANSIC prototype: void PutVal(bool Val)
- Val:bool - Output value. Possible values:
FALSE - logical "0" (Low level)
TRUE - logical "1" (High level)
ClrVal
- Clears (set to zero) the output value. It is equivalent to the PutVal(FALSE). This method is available only if the direction = output or input/output.
ANSIC prototype: void ClrVal(void)
SetVal
- Sets (to one) the output value. It is equivalent to the PutVal(TRUE). This method is available only if the direction = output or input/output.
ANSIC prototype: void SetVal(void)
NegVal
- Negates (inverts) the output value. It is equivalent to the PutVal(!GetVal()). This method is available only if the direction = output or input/output.
ANSIC prototype: void NegVal(void)
Methods for HCS12 and 56800 derivatives.
-
GetRawVal
- Method returns the input value of the pin. The method uses raw data input register, i.e., a register that always reads back the status of the pin regardless of the pin’s direction. The method is available only if raw data input is supported on the pin.
ANSIC prototype: bool GetRawVal(void)
- Return value:bool - Input value. Possible values:
FALSE - logical "0" (Low level)
TRUE - logical "1" (High level)