iPXE
Data Fields
console_driver Struct Reference

A console driver. More...

#include <console.h>

Data Fields

int disabled
 Console disabled flags.
void(* putchar )(int character)
 Write a character to the console.
int(* getchar )(void)
 Read a character from the console.
int(* iskey )(void)
 Check for available input.
int(* configure )(struct console_configuration *config)
 Configure console.
int usage
 Console usage bitmask.

Detailed Description

A console driver.

Defines the functions that implement a particular console type. Must be made part of the console drivers table by using __console_driver.

Note:
Consoles that cannot be used before their initialisation function has completed should set disabled initially. This allows other console devices to still be used to print out early debugging messages.

Definition at line 55 of file console.h.


Field Documentation

Console disabled flags.

This is the bitwise OR of zero or more console disabled flags.

Definition at line 62 of file console.h.

Referenced by efifb_configure(), has_input(), putchar(), and vesafb_configure().

void( * console_driver::putchar)(int character)

Write a character to the console.

Parameters:
characterCharacter to be written

Definition at line 68 of file console.h.

Referenced by putchar().

int( * console_driver::getchar)(void)

Read a character from the console.

Return values:
characterCharacter read

If no character is available to be read, this method will block. The character read should not be echoed back to the console.

Definition at line 78 of file console.h.

Referenced by getchar().

int( * console_driver::iskey)(void)

Check for available input.

Return values:
is_availableInput is available

This should return true if a subsequent call to getchar() will not block.

Definition at line 87 of file console.h.

Referenced by has_input().

Configure console.

Parameters:
configConsole configuration, or NULL to reset
Return values:
rcReturn status code

Definition at line 94 of file console.h.

Referenced by console_configure().

Console usage bitmask.

This is the bitwise OR of zero or more CONSOLE_USAGE_XXX values.

Definition at line 101 of file console.h.

Referenced by putchar().


The documentation for this struct was generated from the following file: