ENUM W1_COMMANDS(9)
π enum w1_commands(9)
okay bestie, so this is a page from the Kernel API Manual β¨ and it's all about enum w1_commands β literally the list of commands available for master or slave operations in the 1-Wire subsystem π¦. yeah. we're doing kernel stuff today. slay.
β¨ SYNOPSIS β¨
enum w1_commands {
W1_CMD_READ ,
W1_CMD_WRITE ,
W1_CMD_SEARCH ,
W1_CMD_ALARM_SEARCH ,
W1_CMD_TOUCH ,
W1_CMD_RESET ,
W1_CMD_SLAVE_ADD ,
W1_CMD_SLAVE_REMOVE ,
W1_CMD_LIST_SLAVES ,
W1_CMD_MAX
};
that's the whole squad right there π ten constants, zero drama.
π Constants π
okay now the fun part, let's meet every single one of these icons π
W1_CMD_READβ readslenbytes. that's it, that's the vibe πΈW1_CMD_WRITEβ writeslenbytes. the mirror twin of the one above, we love a symmetrical moment πW1_CMD_SEARCHβ kicks off a standard search and returns only the slave devices that were found during that search π no extras, no plus-ones, iconic behavior honestlyW1_CMD_ALARM_SEARCHβ searches for devices that are currently alarming ππ¨ like, are you okay babes? this finds themW1_CMD_TOUCHβ touches a series of bytes π«Ά yes that's really the wording. it touches them. we don't ask questionsW1_CMD_RESETβ sends a bus reset on the given master β‘ the "okay everybody calm down and restart" commandW1_CMD_SLAVE_ADDβ adds a slave to the given master, and lowkey important detail: the8 byte slave idgoes atdata[0]π don't forget it bestieW1_CMD_SLAVE_REMOVEβ removes a slave to the given master (yes, the manpage says "to", we're keeping it exactly as written π),8 byte slave idatdata[0]again π―W1_CMD_LIST_SLAVESβ gives you the list of slaves registered on this master π literally the attendance sheetW1_CMD_MAXβ the number of available commands π’ it's the "how many are there" counter, main character of the enum's tail end
ngl, every argument, every value, every little data[0] detail stays exactly where it was β the vibe got a glow-up, the facts did not π
π¦ SEE ALSO π¦
go read these next, fr fr, they're all hanging out in the Kernel file ./drivers/w1/w1_netlink.h π:
enum w1_cn_msg_flags(9)enum w1_netlink_message_types(9)struct w1_netlink_msg(9)struct w1_netlink_cmd(9)
β¨ and that's the whole page! this cutie lives over in ./drivers/w1, dated October 2026 ποΈπ thanks for reading bestie, go forth and command your masters and slaves responsibly π§ββοΈπ«
π¦ 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