ENUM W1_COMMANDS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” reads len bytes. that's it, that's the vibe 🌸
  • W1_CMD_WRITE β€” writes len bytes. 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 honestly
  • W1_CMD_ALARM_SEARCH β€” searches for devices that are currently alarming 😭🚨 like, are you okay babes? this finds them
  • W1_CMD_TOUCH β€” touches a series of bytes 🫢 yes that's really the wording. it touches them. we don't ask questions
  • W1_CMD_RESET β€” sends a bus reset on the given master ⚑ the "okay everybody calm down and restart" command
  • W1_CMD_SLAVE_ADD β€” adds a slave to the given master, and lowkey important detail: the 8 byte slave id goes at data[0] πŸ“ don't forget it bestie
  • W1_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 id at data[0] again 🎯
  • W1_CMD_LIST_SLAVES β€” gives you the list of slaves registered on this master πŸ“‹ literally the attendance sheet
  • W1_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