123#define lcd_int(i) lcd_number(i,sign,e0)
126#define lcd_unsigned(u) lcd_number(u,unsign,e0)
131#define lcd_clock(t) lcd_number(t,unsign,e_2)
134#define lcd_digit(d) lcd_number(d,digit,digit_comma)
150#define ASMVOLATILE __volatile__
__asm__("\n\
.text\n\
.globl _atomic_inc\n\
_atomic_inc:\n\
stc ccr, r1h ; save flags\n\
orc #0x80, ccr ; disable all but NMI\n\
mov.b @r0, r1l\n\
inc r1l\n\
mov.b r1l, @r0\n\
ldc r1h, ccr ; restore flags\n\
rts\n\
")
void lcd_hide(lcd_segment segment)
hide LCD segment
lcd_number_style
LCD number display styles.
@ sign
signed, no leading zeros
@ unsign
unsigned, 0 displayed as 0000
@ digit
single digit on the right
lcd_segment
LCD segment codes.
@ circle
0..3 quarters: add one. 4 quarters: reset
@ dot
0..4 dots: add a dot. 5 dots: reset
@ unknown_1
seemingly without effect. cycle reset?
@ ir_full
the IR display values are mutually exclusive.
@ everything
the IR display values are mutually exclusive.
@ dot_inv
0 dots: show 5. 1..4 dots: subtract one
void lcd_number(int i, lcd_number_style n, lcd_comma_style c)
show number on LCD display
lcd_comma_style
LCD comma display styles.
@ digit_comma
single digit on the right
@ e_3
1000ths, problematic with negatives
void lcd_clear(void)
clear LCD display
void lcd_show(lcd_segment segment)
show LCD segment