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

/usr/src/redhat/BUILD/legOS/include/rom/lcd.h File Reference

ROM LCD control. More...


Defines

#define lcd_int (i)
display an integer in decimal.

#define lcd_unsigned (u)
display an unsigned value in decimal.

#define lcd_clock (t)
display a clock. More...

#define lcd_digit (d)
display a single digit right of the man symbol.

#define ASMVOLATILE

Enumerations

enum  lcd_segment { man_stand, man_run, s1_select, s1_active, s2_select, s2_active, s3_select, s3_active, a_select, a_left, a_right, b_select, b_left, b_right, c_select, c_left, c_right, unknown_1, circle, dot, dot_inv, battery_x, ir_half, ir_full, everything }
LCD segment codes. More...

enum  lcd_number_style { digit, sign, unsign }
LCD number display styles. More...

enum  lcd_comma_style { digit_comma, e0, e_1, e_2, e_3 }
LCD comma display styles. More...


Functions

void lcd_show (lcd_segment segment)
show LCD segment. More...

void lcd_hide (lcd_segment segment)
hide LCD segment. More...

void lcd_number (int i, lcd_number_style n, lcd_comma_style c)
show number on LCD display. More...

void lcd_clear (void)
clear LCD display.

void lcd_refresh (void)
show LCD display contents to the world. More...


Detailed Description

ROM LCD control.

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

Warning:
Display updates are realized exclusively by lcd_refresh()

Define Documentation

#define lcd_int (i)

display an integer in decimal.

#define lcd_unsigned (u)

display an unsigned value in decimal.

#define lcd_clock (t)

display a clock.

passing an argument of 1015 will display 10.15

#define lcd_digit (d)

display a single digit right of the man symbol.

#define ASMVOLATILE ()


Enumeration Type Documentation

enum lcd_segment

LCD segment codes.

these are not to be confused with the codes defined in direct-lcd.h

circle and dot codes cycle. cycle state is preserved on powerdown.

each dot code should be invoked six times before using the other. mixing them will result in strange behaviour.

Enumeration values:
man_stand  
man_run  
s1_select  
s1_active  
s2_select  
s2_active  
s3_select  
s3_active  
a_select  
a_left  
a_right  
b_select  
b_left  
b_right  
c_select  
c_left  
c_right  
unknown_1   seemingly without effect. cycle reset?
circle   0..3 quarters: add one. 4 quarters: reset.
dot   0..4 dots: add a dot. 5 dots: reset.
dot_inv   0 dots: show 5. 1..4 dots: subtract one.
battery_x  
ir_half  
ir_full   the IR display values are mutually exclusive.
everything   the IR display values are mutually exclusive.

enum lcd_number_style

LCD number display styles.

note: signed and unsigned are taken by the C programming language

Enumeration values:
digit   single digit on the right.
sign   signed, no leading zeros.
unsign   unsigned, 0 displayed as 0000.

enum lcd_comma_style

LCD comma display styles.

Enumeration values:
digit_comma   single digit on the right.
e0   whole.
e_1   10ths.
e_2   100ths.
e_3   1000ths, problematic with negatives.

Function Documentation

void lcd_show (lcd_segment segment) [inline]

show LCD segment.

Parameters:
segment   segment to show

void lcd_hide (lcd_segment segment) [inline]

hide LCD segment.

Parameters:
segment   segment to hide

void lcd_number (int i, lcd_number_style n, lcd_comma_style c)

show number on LCD display.

Parameters:
i   the number
n   a number style
c   a comma style

void lcd_clear (void) [inline]

clear LCD display.

void lcd_refresh (void) [inline]

show LCD display contents to the world.

display updates are realized exclusively by calling this function.


legOS-0.1.7 is released under Mozilla Public License. Original code © 1998-1999 by Markus L. Noga.