ni_tio_set_bits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ni_tio_set_bits(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for ni_tio_set_bits β€” yes the (9) means it's a kernel function, we're in the big leagues now πŸŽ€


✨ NAME ✨

ni_tio_set_bits β€” write a counter register safely. like, no cap, safely. that's the whole vibe πŸ”₯


🌸 SYNOPSIS 🌸

void ni_tio_set_bits (struct ni_gpct *counter , enum ni_gpct_register
reg , unsigned int mask , unsigned int value );

look at that signature, it's giving very proper kernel function πŸ’œ copy it exactly, don't freestyle it, i'm begging 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • counter β€” a struct ni_gpct counter. that's your little guy, your main character πŸ’«
  • reg β€” the register you wanna write to. choose wisely ✨
  • mask β€” the bits you're changing. literally just the bits, bestie 🎯
  • value β€” the new value for those bits. the new era, the glow-up 🌈

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” you use this to write to a register, and update the software copy of it.

but like, why do you need a special function for that? because the register's bits might get twiddled in interrupt context 😭 or the software copy might be read in interrupt context. so this is the safe little wrapper so nothing goes sideways. highkey important, ngl πŸ‘‘

bestie this is exactly the kind of thing where you don't wanna be clever and hand-roll it. interrupt context does not care about your feelings πŸ’€

⭐ SEE ALSO ⭐

kernel file ./drivers/comedi/drivers/ni_tio.c β€” go read it, it's iconic, iykyk πŸ’…

all the siblings, all slay, go check them out 🧚


and that's the page!! πŸŽ€ this lil cutie lives under ./drivers/comedi/drivers and dated October 2026 β€” mwah, periodt, bye bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from