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