TOGGLE(9)
π TOGGLE(9) β HAL Component π
okay bestie, welcome to TOGGLE(9), the HAL component page for toggle. it's giving β¨tiny but mightyβ¨ and honestly? iconic. let's get into it π
β¨ NAME β¨
toggle β it does the whole 'push-on, push-off' thing, and it gets that from momentary pushbuttons π«Ά
like, you tap a button, it stays on. you tap it again, it goes off. that's the whole vibe. no cap.
β¨ SYNOPSIS β¨
loadrt toggle [count=N|names=name1[,name2...]]
load it with count=N if you want a bunch of them, or names=name1[,name2...] if you want to give them cute little names of your own choosing π
β¨ DESCRIPTION β¨
so here's the energy. you got a button that's only pressed for a sec β a momentary one β and you want it to act like a light switch. this is literally that. the in goes boop, the out flips, and it stays flipped till the next boop π
look at this lil diagram, it ate:
β ββββ ββββ
in : βββββββ ββββββββββ βββ
β βββββββββββββ
out: βββββββ ββββββ
see how in does those lil pulses and out just commits. main character energy fr fr π¦
β¨ FUNCTIONS β¨
toggle.Nβ the function, one per instance, numbered with thatNπ§
β¨ PINS β¨
toggle.N.inβ typebit, directionin. it's the button input bestie, that's where your momentary press shows up πtoggle.N.outβ typebit, directionio. this is your on/off output, the one that actually remembers what happened π
β¨ PARAMETERS β¨
toggle.N.debounceβ typeu32,rw, default is2. it's the debounce delay in periods</seach>... ok inperiodsπ like, how many periods it waits before fully believing that button press. default2. leave it or tweak it, your call, no judgement πΈ
β¨ AUTHOR β¨
John Kasunich β thank you for your service king π«‘π
β¨ LICENSE β¨
GPL β yeah. GPL. go read it, it's a whole thing πβ¨
β οΈ real talk reminder: every single detail on this page is load-bearing. the option names, the pin types, the default2, all of it. don't freestyle on my girltoggleπ
and that's the whole page bestie, we're done here π
this was TOGGLE(9) from the LinuxCNC Documentation, dated 2026-03-17 β tysm for coming to my ted talk, mwah π
ππ
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms