ExtBitIO
 
 
 Bean ExtBitIO
 
External 1-bit Input/Output with Direction Register

Methods are user callable functions/subroutines that are means of controlling the bean functions.

Methods:

    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 pin direction.

      ANSIC prototype: void SetDir(bool Output)
    • Output: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 pin and returns it. If direction is output then returns the last written value.

      ANSIC prototype: bool GetVal(void)
    • Return value:bool - 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 pin after switching to the output mode - using SetDir(TRUE). If direction is output writes the value to the pin.

      ANSIC prototype: void PutVal(bool Output)
    • Output:bool - Put output value into pin

  • ClrVal - Clear (set to zero) the Input/Output bean. It is the same as PutVal(FALSE).

      ANSIC prototype: void ClrVal(void)

  • SetVal - Set (set to one) the Input/Output bean. It is the same as PutVal(TRUE).

      ANSIC prototype: void SetVal(void)

  • NegVal - Negate (invert) the Input/Output bean. It is the same as PutVal(!GetVal()).

      ANSIC prototype: void NegVal(void)


Note: Some methods can be implemented as macros.



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.