STRUCT STM32_I2C_DMA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 channel
  • chan_rx β€” the dma channel for RX transfer 🫢 the dedicated receive-it channel
  • chan_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 live
  • dma_len β€” the dma buffer len πŸ“ literally the length, that's it, that's the whole job
  • dma_transfer_dir β€” the dma transfer direction indicator 🧭 (an enum dma_transfer_direction, fyi)
  • dma_data_dir β€” the dma transfer mode indicator 🌈 (an enum dma_data_direction, if we're being precise)
  • dma_complete β€” the dma transfer completion βœ… this one's a struct 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