aboutsummaryrefslogtreecommitdiffstats
path: root/src/hal/components/tristate_bit.comp
blob: 67c6a3aeeb81d0656d321daea342cfaf3ad11833 (plain)
1
2
3
4
5
6
7
8
9
10
11
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";
author "Jeff Epler";
;;
if(enable) out = in_;
bues.ch cgit interface