forked from xamidev/pepperOS
comments
This commit is contained in:
@@ -34,7 +34,7 @@ struct spinlock_t term_lock = {0};
|
||||
extern int panic_count;
|
||||
|
||||
/*
|
||||
* _putchar - Writes a character to terminal
|
||||
* _putchar - Writes a character to terminal (DEPRECATED)
|
||||
* @character: character to write
|
||||
*/
|
||||
void _putchar(char character)
|
||||
@@ -43,6 +43,14 @@ void _putchar(char character)
|
||||
flanterm_write(ft_ctx, &character, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* internal_putc - Internal putchar function
|
||||
* @c: char to print
|
||||
* @_: (unused, for nanoprintf)
|
||||
*
|
||||
* Prints a character to the terminal if it's ready,
|
||||
* and also to the serial interface if it's ready.
|
||||
*/
|
||||
void internal_putc(int c, void *_)
|
||||
{
|
||||
(void)_;
|
||||
@@ -58,7 +66,6 @@ void internal_putc(int c, void *_)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (init.serial) {
|
||||
if (ch == '\n') {
|
||||
skputc('\r');
|
||||
@@ -67,6 +74,16 @@ void internal_putc(int c, void *_)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* printf - Fromatted printing
|
||||
* @fmt: format string
|
||||
* @...: variadic arguments
|
||||
*
|
||||
* Wrapper for nanoprintf
|
||||
*
|
||||
* Return:
|
||||
* <ret> - number of characters sent to the callback
|
||||
*/
|
||||
int printf(const char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
Reference in New Issue
Block a user