Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

legOS/kernel/program.c File Reference

program data structures and functions. More...


Defines

#define debugs (a)
#define debugw (a)

Functions

int program_valid (unsigned nr)
check if a given program is valid. More...

void program_run (unsigned nr)
run the given program.

void packet_producer (const unsigned char *data, unsigned char length, unsigned char src)
packet handler, called from interrupt. More...

int packet_consumer (int argc, char *argv[])
packet command parser task.

int key_handler (int argc, char *argv[])
handle key input (on/off, run, program).

void program_init ()
initialize program support. More...

void program_shutdown ()
shutdown program support. More...


Variables

volatile unsigned cprog
the current program.

const unsigned char min_length []
program_t programs [PROG_MAX]
the programs.

unsigned char buffer [256]
packet receive buffer.

volatile unsigned char packet_len
packet length.

volatile unsigned char packet_src
packet sender.

sem_t packet_sem
synchronization semaphore.


Detailed Description

program data structures and functions.

Author(s):
Markus L. Noga <markus@noga.de>

Define Documentation

#define debugs (a)

#define debugw (a)


Function Documentation

int program_valid (unsigned nr)

check if a given program is valid.

Returns:
0 if invalid

void program_run (unsigned nr) [static]

run the given program.

void packet_producer (const unsigned char * data, unsigned char length, unsigned char src) [static]

packet handler, called from interrupt.

makes copy and wakes parser task.

int packet_consumer (int argc, char *argv[]) [static]

packet command parser task.

int key_handler (int argc, char *argv[])

handle key input (on/off, run, program).

void program_init ()

initialize program support.

run in single tasking mode

void program_shutdown ()

shutdown program support.

run in single tasking mode


Variable Documentation

volatile unsigned cprog

the current program.

const unsigned char min_length[]

program_t programs[PROG_MAX] [static]

the programs.

unsigned char buffer[256] [static]

packet receive buffer.

volatile unsigned char packet_len

packet length.

volatile unsigned char packet_src

packet sender.

sem_t packet_sem [static]

synchronization semaphore.

legOS-0.2.4 is released under the Mozilla Public License. Original code copyright 1998-1999 by the authors.