ucb1x00_io_write(9)
π ucb1x00_io_write β kernel API manual, but make it make sense
okay so bestie, we're deep in the kernel API manual today (that's the manual name, no cap) and this little function is genuinely iconic. it's called ucb1x00_io_write and it's about to set or clear some IO outputs for you. periodt. π
β¨ NAME β¨
ucb1x00_io_write β set or clear IO outputs π
like literally, that's the whole vibe. set 'em or clear 'em.
πΈ SYNOPSIS πΈ
void ucb1x00_io_write (struct ucb1x00 *ucb, unsigned int set, unsigned int clear);
look at her. returns nothing (it's void, she's mysterious like that), takes three things, slays. π¦
π«Ά ARGUMENTS π«Ά
ucbβ thestruct ucb1x00 *that describes the chip. it's giving main character energy, everything hinges on her.setβ a bitfield of the IO pins you wanna flip up to logic'1'. βclearβ a bitfield of the IO pins you wanna drop down to logic'0'. π
π₯ DESCRIPTION π₯
so what she actually does: she sets the IO output state of whichever IO pins you pointed at. simple, effective, obsessed. β¨
the value is retained if the pins are subsequently configured as inputs β so she remembers, she doesn't forget, iykyk. π§
now here's the tea: the clear bitfield has priority over the set bitfield. so if a pin appears in both? outputs will be cleared. clear wins. always. not me being dramatic, that's just how she is. π
β οΈ bestie, you must have called ucb1x00_enable to enable the comms before using this function. no enable, no comms, no write. don't skip it. π
also β and this is important β this function takes a spinlock, which means it disables interrupts. so like, respect her time. π
π SEE ALSO π
kernel file ./drivers/mfd/ucb1x00-core.c, plus her whole friend group:
ucb1x00_io_set_dir(9)ucb1x00_io_read(9)ucb1x00_adc_enable(9)ucb1x00_adc_read(9)ucb1x00_adc_disable(9)
π and that's the whole page, bestie! sourced from ./drivers/mfd, dated October 2026, and stamped with ucb1x00_io_write(9) in the corner like a little bow. go forth and set those pins. π
π
π¦ 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