Machinekit

Machinekit

Machinekit Documentation

HAL Component — TOGGLE

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

toggle — 'push-on, push-off' from momentary pushbuttons

SYNOPSIS

toggle

USAGE SYNOPSIS

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

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

FUNCTIONS

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

PINS

toggle.N.in bit in ( OR <newinstname>.in bit in ) - button input

toggle.N.out bit io ( OR <newinstname>.out bit io ) - on/off output

toggle.N.debounce u32 io (default: 2) ( OR <newinstname>.debounce u32 io (default: 2) ) - debounce delay in periods

LICENCE

GPL