SYNOPSIS

loadrt mux16 [count=N|names=name1[,name2…]]

FUNCTIONS

mux16.N (requires a floating-point thread)

PINS

mux16.N.use-graycode bit in

This signifies the input will use Gray code instead of binary. Gray code is a good choice when using physical switches because for each increment only one select input changes at a time.

mux16.N.suppress-no-input bit in

This suppresses changing the output if all select lines are false. This stops unwanted jumps in output between transitions of input. but make in00 unavailable.

mux16.N.debounce-time float in

sets debounce time in seconds. eg. .10 = a tenth of a second input must be stable this long before outputs changes. This helps to ignore noisy switches.

mux16.N.selM bit in (M=0..3)

Together, these determine which inN value is copied to out.

mux16.N.out-f float out

mux16.N.out-s s32 out

Follows the value of one of the inN values according to the four sel values and whether use-graycode is active. The s32 value will be trunuated and limited to the max and min values of signed values.

sel3

sel2

sel1

sel0

out follows

0

0

0

0

in00

0

0

0

1

in01

0

0

1

0

in02

0

0

1

1

in03

0

1

0

0

in04

0

1

0

1

in05

0

1

1

0

in06

0

1

1

1

in07

1

0

0

0

in08

1

0

0

1

in09

1

0

1

0

in10

1

0

1

1

in11

1

1

0

0

in12

1

1

0

1

in13

1

1

1

0

in14

1

1

1

1

in15

mux16.N.inMM float in (MM=00..15)

array of selectable outputs

PARAMETERS

mux16.N.elapsed float r

Current value of the internal debounce timer for debugging.

mux16.N.selected s32 r

Current value of the internal selection variable after conversion for debugging

SEE ALSO

mux2(9), mux4(9), mux8(9), mux_generic(9).

AUTHOR

Chris S Morley

LICENSE

GPL