Direction methods - These methods concern the direction of the component (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 component.
-
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 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). This method cannot be disabled if direction is input.
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 component 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, HCS12X, 56800/E, MCF and ColdFireV1 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)
Note: Some methods can be implemented as macros.