1
0

initcalls: Add initial implementation

Create simple serial subsystem which makes use of initcalls, and convert
existing serial drivers to its use.
This commit is contained in:
2012-10-04 00:26:35 -04:00
parent 3f624153e7
commit 9d86813d8c
14 changed files with 219 additions and 102 deletions

View File

@ -123,17 +123,17 @@ void console_newline() {
}
}
void console_putc(char c) {
int console_putc(char c) {
char *console_buffer_end = console_buffer + chars_per_line * lines;
char *write_char_at;
switch (c) {
case '\n':
console_newline();
return;
return 0;
case '\r':
curr_char = 0;
return;
return 0;
default:
break;
}
@ -148,4 +148,6 @@ void console_putc(char c) {
*write_char_at = c;
console_char_to_fb(c, curr_char++, curr_line);
return 0;
}