summaryrefslogtreecommitdiff
path: root/src/hal/components/tristate_bit.comp
blob: 75886411c77b8461dbcf9dc329b0fd752f2a5622 (plain)
1
2
3
4
5
6
7
8
9
10
component tristate_bit "Place a signal on an I/O pin only when enabled, similar to a tristate buffer in electronics";

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

function _ nofp "If \\fBenable\\fR is TRUE, copy \\fBin\\fR to \\fBout\\fR.";
license "GPL";
;;
if(enable) out = in_;