Tee Console

The tee console is implemented in os/drivers/console/tee_console.c.

This console forwards calls to both, a basic console and a serial console. This can help during development, as one can see live output on the screen while logging the serail output to a file via qemu for later inspection.

See also:

Initialization

This driver is initialized by calling

void tee_console_init(void)

Initialize the console frontend.

^ Back to top.

Allocating a Tee Console

A new instance of the tee console is allocated by calling

console_t *tee_console_alloc(void)

allocate and return a new instance of a tee console

allocating a tee console in turn allocates a new console datastructure (console_t). the provided console operations are stored in the console data structure.

Returns:

a pointer to the newly allocated console.

^ Back to top.

Console Operations

This console implements the console operation (console_operations_t)

Open

Implements the operation console_operations_t.open:

static int __tee_con_open(console_t *con)

Open the tee console con.

^ Back to top.

Write

Implements the operation console_operations_t.write:

static void __tee_con_write(console_t *con, const char *string, unsigned int count)

Write count characters of a string to the console con.

Output printable characters but also handle (some) control characters, e.g., newline, backspace, form feed.

^ Back to top.