TsctlEDIOHBridgeDesc

From embeddedTS Manuals

Sets the H-Bridge functionality of the specified pin num to the given state. The possible states are:

  • HB_LEFT : positive voltage is applied on the specified pin, with negative (or ground) on the auxiliary pin associated with this pin.
  • HB_RIGHT : positive voltage is applied on the auxiliary pin associated with the specified pin, with negative (or ground) on the specified pin itself.
  • HB_FREE_RUNNING : no voltage is applied across either pin
  • HB_BRAKING : both pins are connected to the same rail

Returns a negative error code if the specified pin cannot be used as an H-Bridge, or if the specified state is unsupported on this pin.

typedef enum HBState {
  HB_LEFT=1,HB_RIGHT=2,HB_FREE_RUNNING=3,HB_BRAKING=4
} HBState;