__ssp_receive_char(9)
π __ssp_receive_char (9) β the Kernel API Manual, bestie edition π
okay so you found your way into the kernel API manual, section 9, and the star of the show today is __ssp_receive_char π
this is a page from the Kernel API Manual, and honestly? she's a little one-byte girlboss and we're obsessed.
β¨ NAME β¨
__ssp_receive_char β receive a byte from the UART π
like, one (1) single byte. she's not greedy. she's not doing the whole buffer. that's somebody else's job (see: SEE ALSO, where the whole friend group lives).
πΈ SYNOPSIS πΈ
char __ssp_receive_char (struct sifive_serial_port *ssp , char *is_empty
);
that's the whole vibe check right there. she takes two things and hands you back a char. periodt.
π¦ ARGUMENTS π¦
sspβ pointer to astruct sifive_serial_portπ«Ά this is your little handle on the SiFive serial port, she's the plug, she's the connect.is_emptyβcharpointer to return whether the RX FIFO is empty β it's an out-param, so you pass the address and let her write the answer in for you. no cap, you don't get to know from the return value alone.
π DESCRIPTION π
So here's the whole thing, bestie: she tries to read a byte from the SiFive UART RX FIFO, the one referenced by ssp, and she returns that byte. main character behavior honestly.
She also returns the RX FIFO empty bit in the char pointed to by ch β and yeah, ngl, the page says ch here even though the argument is named is_empty up in ARGUMENTS π the docs are being a little quirky, we love her anyway, don't @ me.
π¨ important one, don't skip it: the caller must pass the byte back to the Linux serial layer if needed. she hands you the byte, but she does not file the paperwork. that's on you. iykyk.
π₯ RETURN π₯
the byte read from the UART RX FIFO. β¨ that's it, that's the return value. one byte, served fresh, no drama. π
π SEE ALSO π
okay this is the whole group chat, and yes we're tagging everyone π
- Kernel file
./drivers/tty/serial/sifive.c struct sifive_serial_port(9)__ssp_early_writel(9)__ssp_early_readl(9)__ssp_writel(9)__ssp_readl(9)sifive_serial_is_txfifo_full(9)__ssp_transmit_char(9)__ssp_transmit_chars(9)__ssp_enable_txwm(9)__ssp_enable_rxwm(9)__ssp_disable_txwm(9)__ssp_disable_rxwm(9)__ssp_receive_chars(9)__ssp_update_div(9)__ssp_update_baud_rate(9)__ssp_set_stop_bits(9)__ssp_wait_for_xmitr(9)sifive_serial_clk_notifier(9)
π tiny reminder before you go: everything above is literally straight from the page, so if you're holding the byte, you're holding the responsibility. slay responsibly. π«Ά
k bye, go read your UART π
βΏ that's the whole page, bestie βΏ straight from ./drivers/tty/serial, stamped October 2026, and yeah β __ssp_receive_char(9) is the one and only. mwah πππ
π¦ 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