bcm2835_wr_fifo_count(9)
π bcm2835_wr_fifo_count β like, the Kernel API Manual one
okay so bestie, buckle up, because this is a kernel function page and it's from the Kernel API Manual and the vibe is very much "trust me, I know what I'm doing" π«Ά
β¨ NAME β¨
bcm2835_wr_fifo_count β blindly write exactly count bytes to TX FIFO π
ngl the word "blindly" is doing so much heavy lifting here and we should all respect it π
πΈ SYNOPSIS πΈ
void bcm2835_wr_fifo_count (struct bcm2835_spi *bs , int count );
like, that's it. that's the whole function signature. no return value, it's giving "i do this and i leave" energy π
π ARGUMENTS π
bsβ the BCM2835 SPI controller. your main character, fr fr πcountβ the bytes to write to TX FIFO. exactly how many, no more no less, periodt β¨
π¦ DESCRIPTION π¦
so here's the thing, and listen closely because this is the whole plot: the caller must ensure a few things before calling this. and by "the caller must ensure" i mean you, bestie. it's a whole vibe check and you have to pass it π
bs->tx_lenhas to be greater than or equal to count β no overachieving, okay?- the TX FIFO has to be able to accommodate count bytes β like, there has to be room at the inn π¨
- the DMA Enable flag in the CS register has to be set, such that a write to the FIFO register transmits 32-bit instead of just 8-bit. lowkey crucial, don't skip it or it's giving chaos π
no cap, this function does not check any of that for you. it "blindly" writes, which is literally in the NAME. the guardrails are your problem, not hers π
β SEE ALSO β
- the kernel file
./drivers/spi/spi-bcm2835.cβ the mothership πΈ struct bcm2835_spi(9)struct bcm2835_spidev(9)bcm2835_rd_fifo_count(9)bcm2835_wait_tx_fifo_empty(9)bcm2835_rd_fifo_blind(9)bcm2835_wr_fifo_blind(9)bcm2835_spi_transfer_prologue(9)bcm2835_spi_undo_prologue(9)bcm2835_spi_dma_rx_done(9)bcm2835_spi_dma_tx_done(9)bcm2835_spi_prepare_sg(9)bcm2835_spi_transfer_one_dma(9)
it's a whole friend group honestly, they all show up together π§π
and that's the page bestie!! this one lives in ./drivers/spi and it's dated October 2026 π go forth, write your bytes, and remember the DMA Enable flag πΈβ¨
π¦ 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