sdio_writeb_readb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sdio_writeb_readb(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk β€” you're in the Kernel API Manual, and the page you want is sdio_writeb_readb. that's the one. no cap, this is the whole vibe: write a byte, read it right back, all in one little request. ✨


🌸 NAME 🌸

sdio_writeb_readb β€” write and read a byte from SDIO function πŸ¦‹


✨ SYNOPSIS ✨

u8 sdio_writeb_readb (struct sdio_func *func , u8 write_byte , unsigned
int addr , int *err_ret );

like, that's the whole signature. iconic. keep it verbatim or it's not gonna compile, and we do NOT want that energy 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • func β€” the SDIO function you're accessing πŸ’– that's your main character right there.
  • write_byte β€” the byte you're writing. literally just the byte. one (1) byte.
  • addr β€” the address you're writing to. πŸ“
  • err_ret β€” optional status value from the transfer. it's optional, but honestly bestie, you're gonna want it.

🫢 DESCRIPTION 🫢

so here's what's happening: this does a RAW (Read After Write) operation, exactly as defined by the SDIO spec πŸ”₯

a single byte gets written to the address space of a given SDIO function, and then the response gets read back from that same address β€” and the way that it does both of those is with a single request. one shot. ate. πŸ’…

now for the not-so-slay part: if there's a problem with the operation, 0xff is returned and err_ret will contain the error code πŸ’€ so heads up, 0xff is your "something went wrong" flag, not a real read. don't get caught out by that, iykyk.

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./drivers/mmc/core/sdio_io.c β€” go read it if you're feeling nerdy 🧚 and here's the whole friend group:


that's the page, bestie πŸ’œ this lil beauty comes to you from the Kernel API Manual, sourced out of ./drivers/mmc/core, and it's dated October 2026 β€” go forth and write-then-read responsibly, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from