time.h File Reference

Internal Interface: system time functions. More...

#include "../time.h"

Include dependency graph for time.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TM_DEFAULT_SLICE   20
 default multitasking timeslice

Functions

void systime_init (void)
 initialize system timer
void systime_shutdown (void)
 shutdown system timer
void systime_set_switcher (void *switcher)
 set task switcher vector
void systime_set_timeslice (unsigned char slice)
 set multitasking timeslice in ms
time_t get_system_up_time (void)

Variables

void * systime_tm_return
 return address for the task switcher


Detailed Description

Internal Interface: system time functions.

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

Definition in file time.h.


Define Documentation

#define TM_DEFAULT_SLICE   20

default multitasking timeslice

Definition at line 44 of file time.h.

Referenced by systime_init().


Function Documentation

time_t get_system_up_time ( void   ) 

void systime_init ( void   ) 

initialize system timer

task switcher initialized to empty handler motors turned off

Definition at line 270 of file systime.c.

References clock_handler(), dm_shutdown(), nmi_vector, ocia_vector, ocib_vector, rom_dummy_handler(), subsystem_handler(), sys_time, systime_shutdown(), T_CR, T_CSR, T_IER, T_OCR, T_OCRA, T_OCRB, task_switch_handler(), TCR_CLOCK_32, TCSR_RESET_ON_A, TIER_ENABLE_OCA, TIER_ENABLE_OCB, tm_current_slice, TM_DEFAULT_SLICE, tm_switcher_vector, tm_timeslice, TOCR_OCRA, TOCR_OCRB, WDT_CNT_MSEC_64, WDT_CNT_PASSWORD, WDT_CSR, WDT_CSR_CLOCK_64, WDT_CSR_ENABLE, WDT_CSR_MODE_WATCHDOG, WDT_CSR_PASSWORD, and WDT_CSR_WATCHDOG_NMI.

Referenced by kmain().

void systime_set_switcher ( void *  switcher  ) 

set task switcher vector

Parameters:
switcher the switcher

Definition at line 326 of file systime.c.

void systime_set_timeslice ( unsigned char  slice  ) 

set multitasking timeslice in ms

Parameters:
slice the timeslice. must be at least 5ms.

Definition at line 333 of file systime.c.

References tm_current_slice, and tm_timeslice.

void systime_shutdown ( void   ) 

shutdown system timer

will also stop task switching and motors.

Definition at line 317 of file systime.c.

References T_IER, TIER_ENABLE_OCA, TIER_ENABLE_OCB, WDT_CSR, and WDT_CSR_ENABLE.

Referenced by kmain(), and systime_init().


Variable Documentation

void* systime_tm_return

return address for the task switcher


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2005 by the authors.

Generated on Tue Apr 10 19:51:40 2007 for brickOS Kernel Developer by doxygen 1.5.1