Did you know...
|
|
This mode is used to indicate that a channel is being
controlled by another channel. For example, the CHANNEL_MODE_ROTARY_ENCODER
requires two pins to monitor the status of the encoder. The first
pin is configured to rotary encoder mode. During this
configuration, the second pin is specified as part of the
initialization of the first pin. The initialization of the rotary
encoder function places this second pin in CHANNEL_MODE_CONTROLLED.
In CHANNEL_MODE_CONTROLLED no updates are made to
the controlled pins buffer, unless the controlling pin causes the
update.
CHANNEL_MODE_CONTROLLED can also be used for
testing. When the host explicitly sets a pin to CHANNEL_MODE_CONTROLLED
the host sets the state of the pin (high, low, or high impedance)
and also sets the value of the public data buffer. This allows
the user to set any desired value for the public data buffer. For
example, suppose the user configured pin 17 as a hysteresis
output based upon analog data provided by pin 2. For testing
purposes, the user could initialize pin 2 as CHANNEL_MODE_CONTROLLED
in order to simulate a specific value from the A/D converter.
This helps facilitate automated testing, and allows testing at
boundry and out-of-bounds conditions that may not be easily
created with the real system attached to an A/D.
Return packet is an echo of the sent packet.
|
|