39#ifdef CONF_AUTOSHUTOFF
66#if defined(CONF_DSOUND) && defined(CONF_ON_OFF_SOUND)
77extern int main(
int argc,
char **argv);
79#if defined(CONF_DSOUND) && defined(CONF_ON_OFF_SOUND)
80static void onOffSound(
const note_t *snd) {
103#ifndef CONF_LCD_REFRESH
106#if defined(CONF_DSOUND) && defined(CONF_ON_OFF_SOUND)
107 onOffSound(on_sound);
110#if defined(CONF_DSOUND) && defined(CONF_ON_OFF_SOUND)
130#ifndef CONF_LCD_REFRESH
133#if defined(CONF_DSOUND) && defined(CONF_ON_OFF_SOUND)
134 onOffSound(off_sound);
142void kmain(
void) __attribute__((noreturn));
145 int reset_after_shutdown=0;
170#ifdef CONF_AUTOSHUTOFF
214#ifndef CONF_LCD_REFRESH
236 reset_after_shutdown=1;
240 reset_after_shutdown=1;
259 if (reset_after_shutdown)
void delay(unsigned ms)
uncalibrated delay loop
Interface: console input / output.
void cls()
clear user portion of LCD
void cputc_native_1(char mask)
write bit-pattern for segments at position 1 of LCD
void cputc_native_0(char mask)
write bit-pattern for segments at position 0 of LCD
void cputc_native_3(char mask)
write bit-pattern for segments at position 3 of LCD
void cputc_native_4(char mask)
write bit-pattern for segments at position 4 of LCD
void cputc_native_2(char mask)
write bit-pattern for segments at position 2 of LCD
void cputs(char *s)
Write string s to LCD (Only first 5 chars)
#define KEY_PRGM
the program key is pressed
#define KEY_ANY
any of the keys
volatile unsigned char dkey_multi
the currently active keys
#define KEY_ONOFF
the on/off key is pressed
#define DSOUND_DEFAULT_16th_ms
default duration of 1/16th note in ms
#define PITCH_END
mark the end of a list of note_t entries
static void dsound_play(const note_t *notes)
play a sequence of notes
static unsigned dsound_set_duration(unsigned duration)
set duration of a 16th note in ms; return the previous duration.
Internal LNP Interface: RCX redirected IRQ vectors.
void * reset_vector
reset vector
void * rom_reset_vector
ROM reset vector.
char __text_hi
the high memory segment
char __bss
the start of the uninitialized data segment
int main(int argc, char **argv)
the user main()
void kmain(void)
the beginning of everything
void show_on(void)
show ON string
void show_off(void)
show OFF string
unsigned char * firmware_string
firmware recognition string
char __bss_end
the end of the uninitialized data segment
void lcd_refresh(void)
refresh the entire LCD display
void lcd_init(void)
initialize the LCD display driver
void lcd_power_off(void)
power off the LCD controller
Internal Interface: memory management.
void mm_init()
initialize memory management
Internal Interface: program data structures and functions.
void program_shutdown()
shutdown program support
void program_init()
initialize program support
#define lcd_digit(d)
display a single digit right of the man symbol
void lcd_clear(void)
clear LCD display
void lcd_show(lcd_segment segment)
show LCD segment
Interface: string functions.
void * memcpy(void *dest, const void *src, size_t size)
copy memory block from src to dest.
void * memset(void *s, int c, size_t n)
fill memory block with a byte value.
the note structure describing a single note.
Internal Interface: direct motor control.
void dm_init(void)
initialize motors
void dm_shutdown(void)
shutdown motors
unsigned char motor_controller
RCX Motor Controller port.
Internal Interface: direct sensor access.
void ds_shutdown(void)
shutdown sensor a/d conversion
void ds_init(void)
initialize sensor a/d conversion
Internal Interface: direct sound control.
void dsound_init()
initialize sound driver
Internal Interface: LCD control and constants.
Internal LNP Interface: link networking protocol logical layer.
void lnp_logical_shutdown(void)
Shutdown the logical layer (IR port)
void lnp_logical_init(void)
Initialize the logical layer (IR port)
Internal LNP Interface: link networking protocol.
void lnp_init(void)
Initialise protocol handlers.
Internal Interface: system time functions.
Internal Interface: task management.
void tm_init(void)
init task management
void tm_start(void)
start task management
ROM Interface: RCX system control functions.
void power_init(void)
disables software standby mode so tm_idle_task() can use the sleep
void rom_reset(void) __attribute__((noreturn))
turns off interrupts, then issues reset.
void power_off(void)
enters software standby mode.
void systime_init(void)
initialize system timer
void systime_shutdown(void)
shutdown system timer
Internal Interface: Powerdown Timer Routines.
#define PRIO_NORMAL
The priority of most tasks.
#define DEFAULT_STACK_SIZE
that's enough.
Interface: reduced UNIX standard library.