Machinekit

Machinekit

Machinekit Documentation

HAL Component — SELECTN

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

selectn — select one of n

SYNOPSIS

selectn

USAGE SYNOPSIS

loadrt selectn
OR
newinst selectn <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

FUNCTIONS

selectn.N.funct ( OR <newinstname>.funct )

PINS

selectn.N.enable bit io (default: true) ( OR <newinstname>.enable bit io (default: true) ) - Set enable to false to cause all outputs to be set false

selectn.N.sel s32 in ( OR <newinstname>.sel s32 in ) - The number of the output to set true. All other outputs well be set false

selectn.N.out%01d bit out (M=0..pincount) ( OR <newinstname>.out%01d bit out (M=0..pincount) ) - Output bits. If enable is set and the sel input is between 0 and 7, then the corresponding output bit will be set true

INST_PARAMETERS

pincount int (default: 2)

AUTHOR

Alexander Roessler

LICENCE

GPL