spi_w8r16be(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hiii bestie πŸ’– this is the spi_w8r16be(9) page from the Kernel API Manual, and we're gonna make it make sense together. No cap.

✨ NAME ✨

spi_w8r16be β€” SPI synchronous 8 bit write followed by 16 bit big-endian read. That's the whole vibe: write 8 bits, then read 16 bits big-endian. πŸ’…

🌸 SYNOPSIS 🌸

ssize_t spi_w8r16be (struct spi_device *spi , u8 cmd );

πŸŽ€ ARGUMENTS πŸŽ€

  • spi β€” device with which data will be exchanged. literally the device bestie is talking to.
  • cmd β€” command to be written before data is read back. writes first, then reads back.

😴 CONTEXT 😴

can sleep β€” yes bestie, it can sleep. 😴 Callable only from contexts that can sleep.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this function is similar to spi_w8r16, with the exception that it will convert the read 16 bit data word from big-endian to native endianness. so it's the big-endian-to-native-endianness remix of spi_w8r16. πŸ”₯

Callable only from contexts that can sleep. that's the rule, bestie β€” no sneaky calls from places that can't sleep. πŸ™ˆ

πŸ’œ RETURN πŸ’œ

You get the (unsigned) sixteen bit number returned by the device in CPU endianness, or else a negative error code. That's the tea. β˜•

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/linux/spi/spi.h β€” plus the whole squad:

mwah πŸ’‹ this page's source/version is ./include/linux/spi, dated October 2026, and it's the spi_w8r16be(9) manual page β€” bye bestie! 🫢✨

πŸ“¦ where this page comes from