bcm2835_wr_fifo_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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_len has 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 ⭐

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