i2c_master_send_dmasafe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to the Kernel API Manual glow-up of i2c_master_send_dmasafe β€” this function issues a single I2C message in master transmit mode using a DMA safe buffer. iconic behavior, no cap. πŸ¦‹


✨ SYNOPSIS ✨

int i2c_master_send_dmasafe (const struct i2c_client *client , const char *buf , int count );

πŸŽ€ ARGUMENTS πŸŽ€

  • client β€” handle to slave device β€” the whole point, your fave connection πŸ’…
  • buf β€” data that will be written to the slave, must be safe to use with DMA. yes, DMA safe, not just vibes safe 🫢
  • count β€” how many bytes to write, must be less than 64k since msg.len is u16. keep it under 64k, periodt.

🌸 DESCRIPTION 🌸

it returns a negative errno, or else the number of bytes written. that's the whole tea: negative errno = error path, otherwise you get the byte count. πŸ’–


🌈 SEE ALSO 🌈

the Kernel file is ./include/linux/i2c.h, and the whole bestie squad is:

k bye bestie πŸ’… this page's source/version is ./include/linux and the date is October 2026 β€” go slay your I2C DMA safe sends πŸŽ€
πŸ“¦ where this page comes from