41#ifdef CONF_LCD_REFRESH
86#ifndef DOXYGEN_SHOULD_SKIP_THIS
94 push r2 ; comma_style -> stack\n\
95 push r0 ; number -> stack\n\
97 mov.w r1,r6 ; number_style -> r6\n\
99 jsr @lcd_number ; call ROM\n\
101 adds #0x02,sp ; clear stack\n\
104 pop r6 ; restore r6\n\
111#define set(b) __asm__ __volatile__("bset %0,@0xbb:8" : : "i"(b));
113#define clr(b) __asm__ __volatile__("bclr %0,@0xbb:8" : : "i"(b));
173 for (bit = (1 << 7); bit; bit >>= 1) {
200 for (i = 0; i < len; i++) {
208#ifdef CONF_LCD_REFRESH
222#ifdef CONF_RCX_COMPILER
310#ifdef CONF_LCD_REFRESH
__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\
")
kernel configuration file
Interface: console input / output.
Interface: direct control of LCD display.
Internal Interface: H8/3297 processor registers.
unsigned char PORT6_DDR
port 6 data direction register
Internal LNP Interface: RCX redirected IRQ vectors.
unsigned char lcd_byte_counter
LCD byte to refresh.
HANDLER_WRAPPER("lcd_refresh_next_byte", "lcd_refresh_next_byte_core")
lcd refresh handler, called from system timer interrupt
unsigned char lcd_refresh_period
LCD refresh period in ms.
void lcd_refresh(void)
refresh the entire LCD display
#define slowdown()
generate the necessary delay for the i2c bus.
static __inline__ void i2c_stop(void)
generate an i2c stop condition.
static __inline__ void i2c_write(unsigned char val)
write one byte to the i2c bus.
void lcd_init(void)
initialize the LCD display driver
static unsigned char lcd_shadow[LCD_DATA_OFFSET+LCD_DATA_SIZE]
lcd_shadow buffer:
void lcd_refresh_next_byte_core(void)
alternate name for the refresh next byte routine
#define set(b)
set single bit convenience macro
static __inline__ void i2c_read_ack(void)
read the acknoledge from the i2c bus.
unsigned char lcd_refresh_counter
counter for lcd refresh in ms
void lcd_number(int i, lcd_number_style n, lcd_comma_style c)
show number on LCD display
void lcd_power_on(void)
power on the LCD controller
static __inline__ void i2c_start(void)
generate an i2c start condition.
static void lcd_write_data(unsigned char *data, unsigned char len)
write an array of bytes to the i2c bus.
#define clr(b)
clear single bit convenience macro
void lcd_power_off(void)
power off the LCD controller
ROM Interface: RCX registers cached by ROM functions.
unsigned char rom_port6_ddr
ROM shadow of port 6 DDR.
lcd_number_style
LCD number display styles.
lcd_comma_style
LCD comma display styles.
Interface: string functions.
void * memset(void *s, int c, size_t n)
fill memory block with a byte value.
Internal Interface: LCD control and constants.
unsigned char display_memory[]
LCD display data buffer.
void lcd_refresh_next_byte(void)
show LCD display contents to the world