component tristate_float "Place a signal on an I/O pin only when enabled, similar to a tristate buffer in electronics";

pin in float in_ "Input value";
pin io float out "Output value";
pin in bit enable "When TRUE, copy in to out";

function _  "If \\fBenable\\fR is TRUE, copy \\fBin\\fR to \\fBout\\fR.";
license "GPL";
;;

FUNCTION(_)
{
    if(enable) out = in_;

return 0;
}
