Start Back Next End
  
ZBasic System Library
224
ZBasic Microcontrollers
PinOutput
Type
Subroutine
Invocation
PinOutput(pin, flags)
PinOutput(pin)
Parameter
Method
Type
Description
pin
ByVal
integral
A pin number (value must be known at compile time).
flags
ByVal
integral
Flag bits giving additional configuration information.
Discussion
This subroutine configures a pin as an output.  If the value of the pin parameter is not known at compile
time (e.g. a constant) a compile error will result.  The second form of invocation is equivalent to the first
form with flags set to zero.  The flags parameter gives additional configuration information as shown
in the table below.
Flags Bits
Description
xxxx xxx0
Initial state is low.
xxxx xxx1
Initial state is high.
All other bits are reserved for future use and should be set to zero for compatibility with such changes.  
The advantage of using this subroutine instead of using PutPin() to achieve the same result is that the call
to this subroutine results in much smaller/faster code.  The disadvantage is that the pin number must be
known at compile time.
Compatibility
This subroutine is only available for native mode devices (ZX or generic target devices) and is not
available in BasicX compatibility mode.
See Also
Previous page Top Next page