Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

legOS/include/conio.h File Reference

console input / output. More...


Functions

void delay (unsigned d)
uncalibrated delay loop. More...

void cputc_native_0 (char mask)
display native mode segment mask at display position 0. More...

void cputc_native_1 (char mask)
display native mode segment mask at display position 1. More...

void cputc_native_2 (char mask)
display native mode segment mask at display position 2. More...

void cputc_native_3 (char mask)
display native mode segment mask at display position 3. More...

void cputc_native_4 (char mask)
display native mode segment mask at display position 4. More...

void cputc_native_5 (char mask)
display native mode segment mask at display position 5. More...

void cputc_native (char mask, int pos)
display native mode segment mask. More...

void cputc_hex_0 (unsigned nibble)
void cputc_hex_1 (unsigned nibble)
void cputc_hex_2 (unsigned nibble)
void cputc_hex_3 (unsigned nibble)
void cputc_hex_4 (unsigned nibble)
void cputc_hex_5 (unsigned nibble)
void cputc_hex (char c, int pos)
a dispatcher for the fixed position versions.

void cputw (unsigned word)
display a hexword. More...

void cputc_0 (unsigned c)
void cputc_1 (unsigned c)
void cputc_2 (unsigned c)
void cputc_3 (unsigned c)
void cputc_4 (unsigned c)
void cputc_5 (unsigned c)
void cputc (char c, int pos)
display ascii character c at display position pos.

void cputs (char *s)
display an ASCIIZ string. More...

void cls ()
clear user portion of screen.


Variables

const char hex_display_codes []
const char ascii_display_codes []


Detailed Description

console input / output.

Author(s):
Markus L. Noga <markus@noga.de>

Warning:
If CONF_LCD_REFRESH is set in config.h, the kernel will refresh the display automatically every 100ms. Otherwise, display updates are realized exclusively by lcd_refresh().

Display positions
Digit display positions are denumerated from right to left, starting with 0 for the digit right to the running man. Digit 5 is only partially present on the RCXs display.

Native segment masks
In these bitmasks, bit 0 toggles the middle segment. Bit 1 toggles the top right segment, and the remaining segments are denumerated counterclockwise. The dot isn't encoded because it is desirable

Function Documentation

void delay (unsigned ms)

uncalibrated delay loop.

Parameters:
ms   approximate time in ms

void cputc_native_0 (char mask)

display native mode segment mask at display position 0.

Parameters:
mask   the mask to display

void cputc_native_1 (char mask)

display native mode segment mask at display position 1.

Parameters:
mask   the mask to display

void cputc_native_2 (char mask)

display native mode segment mask at display position 2.

Parameters:
mask   the mask to display

void cputc_native_3 (char mask)

display native mode segment mask at display position 3.

Parameters:
mask   the mask to display

void cputc_native_4 (char mask)

display native mode segment mask at display position 4.

Parameters:
mask   the mask to display

void cputc_native_5 (char mask)

display native mode segment mask at display position 5.

Parameters:
mask   the mask to display. only the middle segment is present on the display.

void cputc_native (char mask, int pos)

display native mode segment mask.

Parameters:
mask   the segment mask.
pos   the desired display position.

this is a dispatcher for the fixed position routines.

void cputc_hex_0 (unsigned nibble) [inline]

void cputc_hex_1 (unsigned nibble) [inline]

void cputc_hex_2 (unsigned nibble) [inline]

void cputc_hex_3 (unsigned nibble) [inline]

void cputc_hex_4 (unsigned nibble) [inline]

void cputc_hex_5 (unsigned nibble) [inline]

void cputc_hex (char c, int pos) [inline]

a dispatcher for the fixed position versions.

void cputw (unsigned word)

display a hexword.

Parameters:
word   the hexword

position 0 is unaffected by this call.

void cputc_0 (unsigned c) [inline]

void cputc_1 (unsigned c) [inline]

void cputc_2 (unsigned c) [inline]

void cputc_3 (unsigned c) [inline]

void cputc_4 (unsigned c) [inline]

void cputc_5 (unsigned c) [inline]

void cputc (char c, int pos) [inline]

display ascii character c at display position pos.

void cputs (char * s)

display an ASCIIZ string.

Parameters:
s   the string

only the first 5 characters will be displayed. if there are less than 5 characters, the remaining display positions will be cleared.

void cls ()

clear user portion of screen.


Variable Documentation

const char hex_display_codes[]

const char ascii_display_codes[]

legOS-0.2.4 is released under the Mozilla Public License. Original code copyright 1998-1999 by the authors.