STRUCT STM32F7_I2C_MSG(9)
π struct stm32f7_i2c_msg(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this one's all about struct stm32f7_i2c_msg, and it's genuinely iconic. it's the little struct that holds client specific data for the STM32F7 I2C driver, and honestly? it ate. let's get into it π
π¦ NAME π¦
struct stm32f7_i2c_msg β client specific data π
that's it, that's the whole vibe. it's the per-message data holder, and she's serving exactly what she needs to serve.
β¨ SYNOPSIS β¨
here's the whole struct, copied exactly, no edits, no cap π«Ά:
struct stm32f7_i2c_msg {
u16 addr;
u32 count;
u8 *buf;
int result;
bool stop;
bool smbus;
int size;
char read_write;
u8 smbus_buf[I2C_SMBUS_BLOCK_MAX + 3];
};
likeβ¦ look at her. structured. aligned. main character energy π
πΈ Members πΈ
time for the member-by-member breakdown, and bestie I am obsessed with how organized this is π
addrβ the 8-bit or 10-bit slave addr, and yes it includes the r/w bit β don't forget that part, iykyk.countβ the number of bytes to be transferred. literally just the byte count, no drama πbufβ the data buffer. she holds the data. queen behavior πresultβ the result of the transfer. how'd it go? this field knows πstopβ the last I2C msg to be sent, i.e. STOP to be generated. so like, if this is the final message, STOP gets generated. periodt πsmbusβ a boolean to know if the I2C IP is used in SMBus mode. true/false, simple as π¦sizeβ the type of SMBus protocol. which protocol are we doing? this says π₯read_writeβ the direction of the SMBus protocol β specifically for SMBus block read and SMBus block write block read process call protocols πsmbus_bufβ the buffer used for SMBus protocol transfer. it'll contain a maximum of 32 bytes of data + byte command + byte count + PEC β¨ and this is the important caveat bestie, listen up: this buffer has to be 32-bit aligned to be compliant with the memory address register in DMA mode. so don't be out here misaligning her π
ngl the alignment thing on smbus_buf is not a suggestion, it's a requirement β 32-bit aligned or it's not DMA-compliant. you've been warned π
π§ SEE ALSO π§
go read these next, bestie, they're all part of the same friend group π«Ά:
- Kernel file
./drivers/i2c/busses/i2c-stm32f7.cstructstm32f7_i2c_regs(9) struct stm32f7_i2c_spec(9)struct stm32f7_i2c_setup(9)struct stm32f7_i2c_timings(9)struct stm32f7_i2c_alert(9)struct stm32f7_i2c_dev(9)
aaaand that's the whole page π this one came to you from the source/version ./drivers/i2c/busses, dated October 2026 β¨ mwah, go forth and send some messages, you've got this ππ
π
π¦ 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