iPXE
Data Fields
console_driver Struct Reference

A console driver. More...

#include <console.h>

Data Fields

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

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

◆ disabled

int console_driver::disabled

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().

◆ putchar

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().

◆ getchar

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().

◆ iskey

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

int( * console_driver::configure) (struct console_configuration *config)

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().

◆ usage

int console_driver::usage

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: