console_driver Struct Reference

A console driver. More...

#include <console.h>


Data Fields

int disabled
 Console is disabled.
void(* putchar )(int character)
 Write a character to the console.
void(* putline )(unsigned char *linebuffer)
 Write an entire line to the console.
int(* getchar )(void)
 Read a character from the console.
int(* iskey )(void)
 Check for available input.


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=1 initially. This allows other console devices to still be used to print out early debugging messages.

Definition at line 32 of file console.h.


Field Documentation

Console is disabled.

The console's putchar(), putline(), getchar() and iskey() methods will not be called while disabled==1. Typically the console's initialisation functions will set disabled=0 upon completion.

Definition at line 41 of file console.h.

Referenced by has_input(), and putchar().

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

Write a character to the console.

Parameters:
character Character to be written
Return values:
None -
Exceptions:
None -

Referenced by putchar().

void( * console_driver::putline)(unsigned char *linebuffer)

Write an entire line to the console.

This is intended to be used by line-oriented output media, like system logging facilities or line printers. Line output will not contain non-printable characters.

Parameters:
linebuffer Pointer to the -terminated line
Return values:
None -
Exceptions:
None -

int( * console_driver::getchar)(void)

Read a character from the console.

Parameters:
None -
Return values:
character Character read
Exceptions:
None -
If no character is available to be read, this method will block. The character read should not be echoed back to the console.

Referenced by getchar().

int( * console_driver::iskey)(void)

Check for available input.

Parameters:
None -
Return values:
True Input is available
False Input is not available
Exceptions:
None -
This should return True if a subsequent call to getchar() will not block.

Referenced by has_input().


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

Generated on Tue Apr 6 20:02:03 2010 for gPXE by  doxygen 1.5.7.1