TOGGLE(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸŽ€ 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 that N 🧚

✨ PINS ✨

  • toggle.N.in β€” type bit, direction in. it's the button input bestie, that's where your momentary press shows up πŸ’œ
  • toggle.N.out β€” type bit, direction io. this is your on/off output, the one that actually remembers what happened πŸ‘‘

✨ PARAMETERS ✨

  • toggle.N.debounce β€” type u32, rw, default is 2. it's the debounce delay in periods</seach>... ok in periods πŸ’€ like, how many periods it waits before fully believing that button press. default 2. 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 default 2, all of it. don't freestyle on my girl toggle πŸ™ˆ

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