STRUCT CHARLCD_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct charlcd_ops(9) πŸ’–

okay bestie, so this is a page from the Kernel API Manual, and it's all about struct charlcd_ops β€” the icon ✨

🌸 NAME 🌸

struct charlcd_ops β€” the functions used by charlcd. Drivers have to implement these. no cap, it's literally their whole job 🫢


πŸŽ€ SYNOPSIS πŸŽ€

struct charlcd_ops {
    void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
    int (*print)(struct charlcd *lcd, int c);
    int (*gotoxy)(struct charlcd *lcd, unsigned int x, unsigned int y);
    int (*home)(struct charlcd *lcd);
    int (*clear_display)(struct charlcd *lcd);
    int (*init_display)(struct charlcd *lcd);
    int (*shift_cursor)(struct charlcd *lcd, enum charlcd_shift_dir
dir);
    int (*shift_display)(struct charlcd *lcd, enum charlcd_shift_dir
dir);
    int (*display)(struct charlcd *lcd, enum charlcd_onoff on);
    int (*cursor)(struct charlcd *lcd, enum charlcd_onoff on);
    int (*blink)(struct charlcd *lcd, enum charlcd_onoff on);
    int (*fontsize)(struct charlcd *lcd, enum charlcd_fontsize size);
    int (*lines)(struct charlcd *lcd, enum charlcd_lines lines);
    int (*redefine_char)(struct charlcd *lcd, char *esc);
};

like, that's the whole squad right there πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • backlight β€” turn the backlight on or off. lowkey optional, so nobody's forcing you πŸ’…
  • print β€” print one character to the display at the current cursor position. the buffered cursor position gets advanced by charlcd. and listen: the cursor should not wrap to the next line at the end of a line. not me warning you in advance 😭
  • gotoxy β€” set the cursor to x, y. the x and y values you're setting are previously set in addr.x and addr.y by charlcd, so they're already served up for you πŸ“
  • home β€” set the cursor to 0, 0. the values in addr.x and addr.y are set to 0, 0 by charlcd prior to calling this function. home sweet home ✨
  • clear_display β€” clear the whole display and set the cursor to 0, 0. the values in addr.x and addr.y are set to 0, 0 by charlcd after calling this function (yes, after β€” read it twice, i did πŸ™ˆ)
  • init_display β€” initialize the display. main character energy, honestly πŸ’œ
  • shift_cursor β€” shift the cursor left or right one position 🌈
  • shift_display β€” shift the whole display content left or right. the entire vibe, moving πŸ”₯
  • display β€” turn the display on or off.
  • cursor β€” turn the cursor on or off.
  • blink β€” turn cursor blink on or off. iconic.
  • lines β€” one or two lines. that's it, that's the whole thing 🀏
  • redefine_char β€” redefine the actual pixel matrix of the character. like a glow-up but for pixels 🧚
ngl bestie, fontsize shows up in the struct up there but it doesn't get its own little entry in this list β€” so don't come for me, i'm just telling you what the page says πŸ’€

⭐ SEE ALSO ⭐

  • Kernel file ./drivers/auxdisplay/charlcd.h β€” go read it, iykyk πŸ“–

kisses and bye-bye bestie πŸ«ΆπŸ’– this slay little page lives in ./drivers/auxdisplay, dated October 2026, and it goes by struct charlcd_ops(9) β€” periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from