ni_tio_set_bits(9)
π 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β astruct ni_gpctcounter. 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms