uart_insert_char(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 uart_insert_char(9) β€” the Kernel API Manual, but make it bestie-friendly 🌸

okay so welcome to the Kernel API Manual entry for uart_insert_char(9), and honestly? it's a little one-pager and it ate πŸ’… let's get into it.


✨ NAME ✨

uart_insert_char β€” push a char to the uart layer πŸŽ€

like. you have a char. you want it in the uart layer. this is the function for that. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

void uart_insert_char (struct uart_port *port , unsigned int status ,
       unsigned int overrun , u8 ch , u8 flag );

five arguments, one void, zero drama. (well. okay. some drama, there's an overrun mask involved, keep reading 🫢)


πŸ’– ARGUMENTS πŸ’–

  • port β€” the corresponding port. your port. the port in question. main character port energy πŸ‘‘
  • status β€” the state of the serial port RX buffer (that's LSR for 8250, iykyk). basically the receipts of what the hardware is going through rn.
  • overrun β€” a mask of overrun bits in status. yes, a mask, of the overrun bits, inside status. it's giving layered. it's giving onion. it's giving "please read the status carefully" πŸ§…βœ¨
  • ch β€” the character to push. the actual lil guy. the payload. the u8 of the hour πŸ“
  • flag β€” the flag for the character (check TTY_NORMAL and friends, they're a whole friend group πŸ’œ)

🌈 DESCRIPTION 🌈

the user is responsible to call tty_flip_buffer_push when they are done with insertion. πŸ‘ˆ this is you. this is your job. nobody else is gonna do it for you, bestie 😭

so like, uart_insert_char pushes the char in, right? but it does not push the flip buffer for you. that's on you. once you're done inserting, you call tty_flip_buffer_push. no cap. don't forget, fr fr 🫢


⭐ SEE ALSO ⭐

the whole squad, in the order the manpage lists them, no rosters edited βœ… and all of it lives in the kernel file ./drivers/tty/serial/serial_core.c:


and that's the page!! mwah πŸ’‹ oh and the cute lil sign-off at the bottom says this one comes from ./drivers/tty/serial and it's dated October 2026 β€” iconic, timeless, periodt πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from