00001 /* BeeOS v0.1. Created: 2003/04/04 Modified: 2004/04/04 00002 * Copyright (C) 2004 Paul Harvey - ROMA, Australia. 00003 * csirac@users.sourceforge.net 00004 */ 00005 00006 /* This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00027 #include "../include/beeos.h" 00028 #include "../include/ect.h" 00029 #include "../include/asm/ports.h" 00030 00031 __inline__ void ect_init(void) 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 }