Files
rtems/cpukit/itron/include/itronsys/time.h
Joel Sherrill c4a3f1e914 2003-09-04 Joel Sherrill <joel@OARcorp.com>
* include/itron.h, include/itronsys/eventflags.h,
	include/itronsys/fmempool.h, include/itronsys/intr.h,
	include/itronsys/mbox.h, include/itronsys/msgbuffer.h,
	include/itronsys/network.h, include/itronsys/port.h,
	include/itronsys/semaphore.h, include/itronsys/status.h,
	include/itronsys/sysmgmt.h, include/itronsys/task.h,
	include/itronsys/time.h, include/itronsys/types.h,
	include/itronsys/vmempool.h, include/rtems/itron/config.h,
	include/rtems/itron/eventflags.h, include/rtems/itron/fmempool.h,
	include/rtems/itron/intr.h, include/rtems/itron/itronapi.h,
	include/rtems/itron/mbox.h, include/rtems/itron/msgbuffer.h,
	include/rtems/itron/network.h, include/rtems/itron/object.h,
	include/rtems/itron/port.h, include/rtems/itron/semaphore.h,
	include/rtems/itron/sysmgmt.h, include/rtems/itron/task.h,
	include/rtems/itron/time.h, include/rtems/itron/vmempool.h,
	inline/rtems/itron/eventflags.inl, inline/rtems/itron/fmempool.inl,
	inline/rtems/itron/intr.inl, inline/rtems/itron/mbox.inl,
	inline/rtems/itron/msgbuffer.inl, inline/rtems/itron/network.inl,
	inline/rtems/itron/port.inl, inline/rtems/itron/semaphore.inl,
	inline/rtems/itron/sysmgmt.inl, inline/rtems/itron/task.inl,
	inline/rtems/itron/time.inl, inline/rtems/itron/vmempool.inl,
	macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl,
	macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl,
	macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl,
	macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl,
	macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl,
	macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl,
	src/can_wup.c, src/chg_pri.c, src/cre_mbf.c, src/cre_mbx.c,
	src/cre_sem.c, src/cre_tsk.c, src/del_mbf.c, src/del_mbx.c,
	src/del_sem.c, src/del_tsk.c, src/dis_dsp.c, src/ena_dsp.c,
	src/eventflags.c, src/exd_tsk.c, src/ext_tsk.c, src/fmempool.c,
	src/frsm_tsk.c, src/get_tid.c, src/itronintr.c, src/itronsem.c,
	src/itrontime.c, src/mbox.c, src/mboxtranslatereturncode.c,
	src/msgbuffer.c, src/msgbuffertranslatereturncode.c, src/network.c,
	src/port.c, src/prcv_mbf.c, src/prcv_mbx.c, src/preq_sem.c,
	src/psnd_mbf.c, src/rcv_mbf.c, src/rcv_mbx.c, src/ref_mbf.c,
	src/ref_mbx.c, src/ref_sem.c, src/ref_tsk.c, src/rel_wai.c,
	src/rot_rdq.c, src/rsm_tsk.c, src/sig_sem.c, src/slp_tsk.c,
	src/snd_mbf.c, src/snd_mbx.c, src/sta_tsk.c, src/sus_tsk.c,
	src/sysmgmt.c, src/task.c, src/ter_tsk.c, src/trcv_mbf.c,
	src/trcv_mbx.c, src/tslp_tsk.c, src/tsnd_mbf.c, src/twai_sem.c,
	src/vmempool.c, src/wai_sem.c, src/wup_tsk.c: URL for license
	changed.
2003-09-04 18:46:52 +00:00

186 lines
3.2 KiB
C

/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef __ITRON_TIME_h_
#define __ITRON_TIME_h_
#ifdef __cplusplus
extern "C" {
#endif
/*
* System Time Data Type
*
* Member configuration depends on the bit width of the processor and
* on the implementation. A total of 48 bits is recommended.
*
*/
typedef struct t_systime {
H utime; /* upper 16 bits */
UW ltime; /* lower 32 bits */
} SYSTIME, CYCTIME, ALMTIME;
/*
* XXX Look this up in the spec and figure out where it comes
* XXX from. dly_tim() references it but it was left out
* XXX of the initial cut at the header files.
*/
typedef int DLYTIME;
/*
* XXX (def_cyc) Structure
*/
typedef struct t_dcyc {
VP exinf; /* extended information */
ATR cycatr; /* cyclic handler attributes */
FP cychdr; /* cyclic handler address */
UINT cycact; /* cyclic handler activation */
CYCTIME cyctim; /* cyclic startup period */
} T_DCYC;
/*
* cycact
*/
#define TCY_OFF 0x00 /* do not invoke cyclic handler */
#define TCY_ON 0x01 /* invoke cyclic handler */
#define TCY_INT 0x02 /* initialize cycle count */
/*
* Reference Cyclic Handler (ref_cyc) Structure
*/
typedef struct t_rcyc {
VP exinf; /* extended information */
CYCTIME lfttim; /* time left before next handler startup */
UINT cycact; /* cyclic handler activation */
/* additional information may be included depending on the implementation */
} T_RCYC;
/*
* Define Alarm (def_alm) Structure
*/
typedef struct t_dalm {
VP exinf; /* extended information */
ATR almatr; /* alarm handler attributes */
FP almhdr; /* alarm handler address */
UINT tmmode; /* start time specification mode */
ALMTIME almtim; /* handler startup time */
} T_DALM;
/*
* tmmode
*/
#define TTM_ABS 0x00 /* specified as an absolute time */
#define TTM_REL 0x01 /* specified as a relative time */
/*
* Reference Alarm (ref_alm) Structure
*/
typedef struct t_ralm {
VP exinf; /* extended information */
ALMTIME lfttim; /* time left before next handler startup */
/* additional information may be included depending on the implementation */
} T_RALM;
/*
* Time Management Functions
*/
/*
* set_tim - Set System Clock
*/
ER set_tim(
SYSTIME *pk_tim
);
/*
* get_tim - Get System Clock
*/
ER get_tim(
SYSTIME *pk_tim
);
/*
* dly_tsk - Delay Task
*/
ER dly_tsk(
DLYTIME dlytim
);
/*
* def_cyc - Define Cyclic Handler
*/
ER def_cyc(
HNO cycno,
T_DCYC *pk_dcyc
);
/*
* act_cyc - Activate Cyclic Handler
*/
ER act_cyc(
HNO cycno,
UINT cycact
);
/*
* ref_cyc - Reference Cyclic Handler Status
*/
ER ref_cyc(
T_RCYC *pk_rcyc,
HNO cycno
);
/*
* def_alm - Define Alarm Handler
*/
ER def_alm(
HNO almno,
T_DALM *pk_dalm
);
/*
* ref_alm - Reference Alarm Handler Status
*/
ER ref_alm(
T_RALM *pk_ralm,
HNO almno
);
/*
* ret_tmr - Return from Timer Handler
*/
void ret_tmr( void );
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */