Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

include/rom/lcd.h File Reference

ROM Interface: RCX LCD control. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define lcd_int(i)   lcd_number(i,sign,e0)
 display an integer in decimal. More...

#define lcd_unsigned(u)   lcd_number(u,unsign,e0)
 display an unsigned value in decimal. More...

#define lcd_clock(t)   lcd_number(t,unsign,e_2)
 display a clock. More...

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

#define ASMVOLATILE   __volatile__

Enumerations

enum  lcd_segment {
  man_stand = 0x3006, man_run = 0x3007, s1_select = 0x3008, s1_active = 0x3009,
  s2_select = 0x300A, s2_active = 0x300B, s3_select = 0x300C, s3_active = 0x300D,
  a_select = 0x300E, a_left = 0x300F, a_right = 0x3010, b_select = 0x3011,
  b_left = 0x3012, b_right = 0x3013, c_select = 0x3014, c_left = 0x3015,
  c_right = 0x3016, unknown_1 = 0x3017, circle = 0x3018, dot = 0x3019,
  dot_inv = 0x301A, battery_x = 0x301B, ir_half = 0x301C, ir_full = 0x301D,
  everything = 0x3020
}
 LCD segment codes. More...

enum  lcd_number_style { digit = 0x3017, sign = 0x3001, unsign = 0x301F }
 LCD number display styles. More...

enum  lcd_comma_style {
  digit_comma = 0x0000, e0 = 0x3002, e_1 = 0x3003, e_2 = 0x3004,
  e_3 = 0x3005
}
 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. More...


Detailed Description

ROM Interface: RCX LCD control.

Author:
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().

Definition in file lcd.h.


Define Documentation

#define ASMVOLATILE   __volatile__
 

g++ warns about __asm__ __volatile__. we define the problem away. the CXX symbol is predefined in the Makefile

Todo:
(when move to g++ 3.x) determine if this is still the case and fix this if not...

Definition at line 150 of file lcd.h.

Referenced by lcd_clear(), lcd_hide(), and lcd_show().

#define lcd_clock      lcd_number(t,unsign,e_2)
 

display a clock.

passing an argument of 1015 will display 10.15

Definition at line 131 of file lcd.h.

#define lcd_digit      lcd_number(d,digit,digit_comma)
 

display a single digit right of the man symbol.

Definition at line 134 of file lcd.h.

#define lcd_int      lcd_number(i,sign,e0)
 

display an integer in decimal.

Definition at line 123 of file lcd.h.

#define lcd_unsigned      lcd_number(u,unsign,e0)
 

display an unsigned value in decimal.

Definition at line 126 of file lcd.h.


Enumeration Type Documentation

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.

Definition at line 111 of file lcd.h.

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.

Definition at line 99 of file lcd.h.

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.

Definition at line 53 of file lcd.h.

Referenced by lcd_hide(), and lcd_show().


Function Documentation

void lcd_clear void    [inline]
 

clear LCD display.

Definition at line 191 of file lcd.h.

References ASMVOLATILE.

void lcd_hide lcd_segment    segment [inline]
 

hide LCD segment.

Parameters:
segment  segment to hide

Definition at line 171 of file lcd.h.

References ASMVOLATILE, and lcd_segment.

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_show lcd_segment    segment [inline]
 

show LCD segment.

Parameters:
segment  segment to show

Definition at line 156 of file lcd.h.

References ASMVOLATILE, and lcd_segment.


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Tue Dec 10 00:09:02 2002 for brickOS C by doxygen 1.2.15