TS_CONF_GET(3)

πŸ’– TS_CONF_GET(3) β€” the tslib page that hands you your config modules πŸ’–

okay bestie, sit down, hydrate, because this is the page that gives you a pointer to the struct holding all the good stuff from your TSLIB_CONFFILE file. it's from tslib, it's manual page 3, and it's lowkey the gateway drug to every module config you'll ever touch. ✨


🌸 NAME 🌸

ts_conf_get β€” get a pointer to struct ts_module_conf holding data from the TSLIB_CONFFILE file.


πŸŽ€ SYNOPSIS πŸŽ€

#include <tslib.h>

struct ts_module_conf *ts_conf_get(struct tsdev *ts);

πŸ¦‹ DESCRIPTION πŸ¦‹

so ts_conf_get() literally hands you back a pointer to a struct ts_module_conf, and that struct is one member of a whole list of modules β€” the ones listed in the TSLIB_CONFFILE configuration file. πŸ’…

and the tea? ts_conf_get() actually reads TSLIB_CONFFILE. like, for real for real. one struct = one line in that file. and they get allocated for you right here, no cap:

struct ts_module_conf {
     char *name;
     char *params;
     int raw;
     int nr;

     struct ts_module_conf *next;
     struct ts_module_conf *prev;
};

every field is doing its little main character thing: name, params, raw, nr, and the linked-list besties next and prev. iconic. πŸ‘‘


✨ RETURN VALUE ✨

this function returns a pointer to a struct ts_module_conf. that's it, that's the whole vibe check. 🫢


πŸ’œ SEE ALSO πŸ’œ


heads up bestie: this is the <tslib.h> include, so keep that #include exactly as it is, and the struct fields exactly as they are. copy-paste energy only for the code. πŸ’€

and that's the page, fr fr. it lives in tslib, it's stamped as the TS_CONF_GET(3) page β€” the source and version tag at the bottom are the whole receipt, date included as printed. slay, go read your config. πŸŽ€πŸ’–βœ¨