better naming of term API
This commit is contained in:
parent
3870de0624
commit
b34f272588
|
@ -77,8 +77,8 @@ int main(int isappli, int optnum) {
|
|||
int off_state = 0;
|
||||
uint16_t backlight_save;
|
||||
|
||||
term_append(LOREM_IPSUM);
|
||||
term_append("-----------------------------------------------------------------");
|
||||
term_print(LOREM_IPSUM);
|
||||
term_print("-----------------------------------------------------------------");
|
||||
term_printf("isappli=%d optnum=%d\n", isappli, optnum);
|
||||
|
||||
set_statusbar(tick_ctr, shift_state, alpha_state, get_battery_voltage());
|
||||
|
|
|
@ -117,7 +117,7 @@ void term_scroll_down(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void term_append(const char *str) {
|
||||
int term_print(const char *str) {
|
||||
static int row = 1;
|
||||
static int col = 0;
|
||||
|
||||
|
@ -138,6 +138,8 @@ void term_append(const char *str) {
|
|||
|
||||
i += tgrid_sets(&row, &col, C_WHITE, C_BLACK, str + i);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
int term_printf(const char *restrict format, ...) {
|
||||
|
@ -146,7 +148,7 @@ int term_printf(const char *restrict format, ...) {
|
|||
|
||||
char buf[1024];
|
||||
const int n = vsprintf(buf, format, argp);
|
||||
term_append(buf);
|
||||
term_print(buf);
|
||||
|
||||
va_end(argp);
|
||||
return n;
|
||||
|
|
|
@ -9,7 +9,8 @@ void tgrid_display(void);
|
|||
|
||||
int term_writeat(int row, int col, int fg, int bg, const char *s);
|
||||
void term_scroll_down(void);
|
||||
void term_append(const char *str);
|
||||
|
||||
int term_print(const char *str);
|
||||
int term_printf(const char *restrict format, ...);
|
||||
|
||||
#endif // #ifndef UNS_TERM_H
|
Loading…
Reference in New Issue