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

legOS/kernel/conio.c File Reference

console input / output. More...


Functions

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

void cputc_native (char mask, int pos)
display native mode segment mask. 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 cputw (unsigned word)
display a hexword. More...

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

void cls ()
clear user portion of screen.


Variables

const char hex_display_codes []
hex display codes.

const char ascii_display_codes []
ASCII display codes. More...


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 to seperate its positioning from the number display code.

Function Documentation

void delay (unsigned ms)

uncalibrated delay loop.

Parameters:
ms   approximate time in ms

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_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 cputw (unsigned word)

display a hexword.

Parameters:
word   the hexword

position 0 is unaffected by this call.

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[]

hex display codes.

const char ascii_display_codes[]

ASCII display codes.

This is a 7-bit ASCII table only.

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