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 work with the whole width of the bean (with the 8 bits together).
Bit methods - These methods work with a single bit of the bean. The bit is specified
as a number from 0 to 7.
The bit value is expressed as a boolean value:
FALSE is "0" or "Low",
TRUE is "1" or "High".
GetDir
- Return selected direction.
ANSIC prototype: bool GetDir(void)
- Return value:bool - FALSE = Input, TRUE = Output
SetDir
- Set port direction.
ANSIC prototype: void SetDir(bool Dir)
- Dir:bool - Direction to set - FALSE = Input, TRUE = Output
GetVal
- Return the value of the Input/Output bean. If direction is input then reads the input value of the pins and returns it. If direction is output then returns the last written value.
ANSIC prototype: byte GetVal(void)
- Return value:byte - Input value
PutVal
- Put the specified value to the Input/Output bean. If direction is input saves the value to a memory or a register, this value will be written to the pins after switching to the output mode - using SetDir(TRUE). If direction is output writes the value to the port.
ANSIC prototype: void PutVal(byte Val)
- Val:byte - Output value
GetBit
- Return the value of the specified bit/pin of the Input/Output bean. If direction is input then reads the input value of the pin and returns it. If direction is output then returns the last written value.
ANSIC prototype: bool GetBit(byte Bit)
- Bit:byte - Number of the bit to read (0 to 7)
- Return value:bool - Bit value
PutBit
- Put the specified value to the specified bit/pin of the Input/Output bean. If direction is input saves the value to a memory or a register, this value will be written to the pin after switching to the output mode - using SetDir(TRUE). If direction is output writes the value to the pin.
ANSIC prototype: void PutBit(byte Bit,bool Val)
- Bit:byte - Number of the bit (0 to 7)
- Val:bool - New value of the bit (FALSE or TRUE) FALSE = "0" or "Low", TRUE = "1" or "High"
SetBit
- Set (set to one) the specified bit of the Input/Output bean. It is the same as PutBit(Bit,TRUE).
ANSIC prototype: void SetBit(byte Bit)
- Bit:byte - Number of the bit to set (0 to 7)
ClrBit
- Clear (set to zero) the specified bit of the Input/Output bean. It is the same as PutBit(Bit,FALSE).
ANSIC prototype: void ClrBit(byte Bit)
- Bit:byte - Number of the bit to clear (0 to 7)
NegBit
- Negate (invert) the specified bit of the Input/Output bean. It is the same as PutBit(Bit,!GetBit(Bit)).
ANSIC prototype: void NegBit(byte Bit)
- Bit:byte - Number of the bit to invert (0 to 7)