Main Page | Modules | Data Structures | File List | Data Fields | Globals

ect.c File Reference


Detailed Description

Provides ECT (Enhanced Capture Timer) routines for BeeOS.

Based on information provided in S12ECT16B8CV1.pdf by Motorola, Inc. V01.04.

See also:
../include/ect.h

Definition in file ect.c.

#include "../include/beeos.h"
#include "../include/ect.h"
#include "../include/asm/ports.h"

Include dependency graph for ect.c:

Include dependency graph

Go to the source code of this file.

Functions

__inline__ void ect_init (void)


Function Documentation

__inline__ void ect_init void   ) 
 

Definition at line 31 of file ect.c.

References BIT7, ECT_PR0, ECT_PR1, ECT_PR2, ECT_TEN, TFLG1, TIE, TIOS, TSCR1, and TSCR2.

00032 {   
00035     TSCR2 = ECT_PR0 | ECT_PR1 | ECT_PR2;    /* Set timer prescaler to /128. */
00036     TIOS |= BIT7;       /* Set TC7 to output compare. */
00037     TSCR1 |= ECT_TEN;   /* Enable timer. */
00038     TFLG1 |= BIT7;      /* Clear possibly existing interrupt. */
00039     TIE |= BIT7;        /* Enable TC7 interrupt. */
00040      
00041     return;
00042 }


Generated on Sat Apr 10 17:08:11 2004 for BeeOS by doxygen 1.3.6-20040222