stm32h7_spi_get_bpw_mask(9)
π NAME π
stm32h7_spi_get_bpw_mask β bestie, it just returns the bits-per-word mask β¨
So this is one of those pages from the Kernel API Manual (yes, the actual kernel, we're fancy now π) and it's honestly kind of a little legend: you hand it a controller, it hands you back a mask. That's the whole vibe. No cap.
πΈ SYNOPSIS πΈ
int stm32h7_spi_get_bpw_mask (struct stm32_spi *spi );
That's it. One argument, one int coming back at you. Short king behavior π
π¦ ARGUMENTS π¦
spiβ pointer to the spi controller data structure π«Ά literally just a pointer to the spi controller's data struct, that's the whole assignment, she's not asking for much
lowkey the most chill function signature ever β no flags, no callbacks, no environment variables, nothing to fumble π
β SEE ALSO β
okay so this page has friends, and we are not skipping a single one of them, because every link here matters, iykyk π
First up, the actual home turf β the kernel file itself:
./drivers/spi/spi-stm32.c
And then the whole squad of structs:
struct stm32_spi_reg(9)struct stm32_spi_regspec(9)struct stm32_spi_cfg(9)struct stm32_spi(9)
Then the bits-per-word mask siblings (they're a whole family, iconic):
stm32h7_spi_get_fifo_size(9)stm32f4_spi_get_bpw_mask(9)stm32f7_spi_get_bpw_mask(9)stm32mp25_spi_get_bpw_mask(9)
Setup / prep girlies:
Write path (tx gang, no skips):
Read path (rx girlies, equally valid):
Enable/disable era:
IRQ thread besties:
stm32fx_spi_irq_event(9)stm32fx_spi_irq_thread(9)stm32h7_spi_irq_thread(9)stm32_spi_prepare_msg(9)
DMA callback crew π:
Transfer-one variants (there are SO many, and we love that for them):
stm32fx_spi_transfer_one_irq(9)stm32h7_spi_transfer_one_poll(9)stm32h7_spi_transfer_one_irq(9)stm32fx_spi_transfer_one_dma_start(9)stm32f7_spi_transfer_one_dma_start(9)stm32h7_spi_transfer_one_dma_start(9)stm32_spi_prepare_rx_dma_mdma_chaining(9)stm32_spi_transfer_one_dma(9)
Bits-per-word setters, the ones this page is spiritually adjacent to:
Type / mode / framing energy π₯:
stm32_spi_communication_type(9)stm32fx_spi_set_mode(9)stm32h7_spi_set_mode(9)stm32h7_spi_data_idleness(9)stm32h7_spi_number_of_data(9)
Transfer plumbing:
stm32_spi_transfer_one_setup(9)stm32_spi_can_poll(9)stm32_spi_transfer_one(9)stm32_spi_unprepare_msg(9)
And the config girlies, closing us out π§:
fr fr, if you're diving into spi-stm32.c, this list is your whole reading curriculum. Take notes bestie ππ
π one last little sign-off π
This page lives in the source tree at ./drivers/spi and it's dated October 2026 β so yeah, born in the manual, raised in the kernel, and now she's here explaining bits-per-word masks to you like the main character she is πβ¨
Go get that mask, bestie. Slay π π
π¦ 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