On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
RTTarget-32 Reference Manual
Introduction
RTTarget-32 Configuration
Screen I/O
Function RTSetDisplayHandler
Function RTDisplayChar
Function RTDisplayString
Function RTDisplayInt
Function RTDisplayHex
Function RTDisplayHexW
Function RTGetGMode
Function RTGetVideoRAMAddr
Function RTDisplayCharAt
Function RTDisplayScroll
Function RTDisplayClear
Function RTDisplaySet
Function RTDisplayGotoXY
Interrupt Handling
Port I/O
System Functions
Program Loading
Memory Mapping and Management
Real-Time Clock and CMOS RAM
Keyboard
Mouse and Touch Screen Driver
Parallel Port Printer
Serial Port I/O
PCI BIOS
Plug-and-Play BIOS
PC Cards (PCMCIA)
MetaWINDOW Initialization
Run-Time System Support
System Management BIOS (SMBIOS)
Advanced Programmable Interrupt Controller (APIC)
Multiprocessor Management
Spinlocks
Advanced Configuration and Power Interface (ACPI) Tables
Extended RAM Management
RTVmf-32
RTRth-32
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Function RTSetDisplayHandler
RTSetDisplayHandler installs one of the predefined display handlers to handle characters to be displayed by TTY type functions (e.g., WriteFile for stdout/stderr, printf, writeln, RTDisplayString, etc.). Console I/O functions such as WriteConsoleOutput are not affected by the display char handler.
RTDisplayType RTSetDisplayHandler(RTDisplayType Type);
ParametersTypeThis parameter can have one of the following values:
Value |
Meaning |
RT_DISP_DETECT |
If a video RAM is present, the RT_DISP_SCREEN handler is installed. Otherwise, if the display is operated in a 32 bit graphics mode, RT_DISP_GRAPHICS is used. Otherwise, if the program is running under the Debug Monitor's control, the RT_DISP_HOST handler is installed. As a last resort, the RT_DISP_NONE handler is used. |
RT_DISP_NONE |
Any data to be displayed is discarded. |
RT_DISP_SCREEN |
Characters are displayed by writing them to the video RAM operated in VGA Text mode. The output position for the next character is advanced automatically. Characters CR, LF, TAB, and BS only move the output position and do not display any text. Character FF clears the screen and returns the output position to the upper left-hand corner. The physical cursor is not used. |
RT_DISP_HOST |
The data is passed on to the Debug Monitor which will in turn send it to the host. If the debugger or RTRun is running in non-detached mode, the data is displayed on the host. |
RT_DISP_GRAPHICS |
This handler works much like the RT_DISP_SCREEN handler. Characters are displayed using an 8x16 font, code page OEM 437. |
return valueCorresponds to the actual handler used. It will never be RT_DISP_DETECT.
The function will not install the requested display handler if the resources required by that handler are not available. Instead, RT_DISP_DETECT is assumed (for example, RT_DISP_HOST is requested and the program does not run under the Debug Monitor, or RT_DISP_SCREEN is used, but VideoRAM = None was specified in the configuration file).
When this function is never called by a program, RT_DISP_DETECT is assumed.
If none of the predefined char out handlers are suitable, an application can install a custom handler in global variable:
extern void (RTTAPI * RTCharOutHandler)(char c);
For example, such a handler could be used to redirect all screen output to a serial port.
Function RTDisplayChar
|