STRUCT STM32_I2C_DMA(9)
π NAME π
struct stm32_i2c_dma β the DMA-specific data, bestie. Like, this is the little struct that holds all the direct-memory-access deets for the STM32 I2C driver. No cap.
Ok so real talk, this page lives in the Kernel API Manual, section 9 β very demure, very kernel-space. π§
β¨ SYNOPSIS β¨
Here's the whole vibe, verbatim, don't touch a character:
struct stm32_i2c_dma {
struct dma_chan *chan_tx;
struct dma_chan *chan_rx;
struct dma_chan *chan_using;
dma_addr_t dma_buf;
unsigned int dma_len;
enum dma_transfer_direction dma_transfer_dir;
enum dma_data_direction dma_data_dir;
struct completion dma_complete;
};
Look at her. Eight members. Absolutely iconic. π
π MEMBERS π
Ok let's meet the cast, one by one, main-character energy only:
chan_txβ the dma channel for TX transfer π like, the dedicated send-it channelchan_rxβ the dma channel for RX transfer π«Ά the dedicated receive-it channelchan_usingβ the dma channel that's actually being used for the current transfer (so that's either TX or RX, depending on the moment) βdma_bufβ the dma buffer πΈ that's where the bytes livedma_lenβ the dma buffer len π literally the length, that's it, that's the whole jobdma_transfer_dirβ the dma transfer direction indicator π§ (anenum dma_transfer_direction, fyi)dma_data_dirβ the dma transfer mode indicator π (anenum dma_data_direction, if we're being precise)dma_completeβ the dma transfer completion β this one's astruct completion, i.e. how you know the transfer is done-done
Ngl bestie, nothing here is dangerous β it's just a data struct. The only danger is forgetting to wait on dma_complete and then wondering why your buffer is sus. π
π¦ SEE ALSO π¦
Kernel file ./drivers/i2c/busses/i2c-stm32.hβ go read the header, iykyk π₯
Ok that's the whole page, mwah π β this masterpiece came from ./drivers/i2c/busses, dated October 2026, and it's your girl struct stm32_i2c_dma(9) signing off. Periodt. πβ¨
π¦ 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