Machinekit Documentation
HAL Component — MULTISWITCH
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
multiswitch — This component toggles between a specified number of output bits
SYNOPSIS
multiswitch
USAGE SYNOPSIS
loadrt multiswitch
OR
newinst multiswitch <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]
( args in [ ] denote possible args and parameters, may not be used in all components )
FUNCTIONS
multiswitch.N.funct ( OR <newinstname>.funct (requires a floating-point thread) )
PINS
multiswitch.N.up bit in (default: false) ( OR <newinstname>.up bit in (default: false) ) - Receives signal to toggle up
multiswitch.N.down bit in (default: false) ( OR <newinstname>.down bit in (default: false) ) - Receives signal to toggle down
multiswitch.N.top-position u32 io ( OR <newinstname>.top-position u32 io ) - Number of positions
multiswitch.N.position s32 io ( OR <newinstname>.position s32 io ) - Current state (may be set in the HAL)
multiswitch.N.bit-%02d bit out (MM=00..pincount) (default: false) ( OR <newinstname>.bit-%02d bit out (MM=00..pincount) (default: false) ) - Output bits
INST_PARAMETERS
pincount int (default: 6)
AUTHOR
ArcEye arceye@mgware.co.uk / Andy Pugh andy@bodgesoc.org
LICENCE
GPL2