00001 /* 00002 **************************************************************************** 00003 * 00004 * simulavr - A simulator for the Atmel AVR family of microcontrollers. 00005 * Copyright (C) 2001, 2002, 2003 Klaus Rudolph 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 **************************************************************************** 00022 * 00023 * $Id$ 00024 */ 00025 00026 #ifndef ATMEGA128 00027 #define ATMEGA128 00028 00029 #include "avrdevice.h" 00030 #include "hardware.h" 00031 #include "rwmem.h" 00032 #include "hwtimer/timerprescaler.h" 00033 #include "hwtimer/timerirq.h" 00034 #include "hwtimer/hwtimer.h" 00035 #include "externalirq.h" 00036 #include "hwuart.h" 00037 #include "hwspi.h" 00038 #include "hwad.h" 00039 #include "pin.h" 00040 00041 #include "ioregs.h" //only for rampz here 00042 00044 class AvrDevice_atmega128: public AvrDevice { 00045 00046 public: 00047 Pin aref; 00048 HWPort *porta; 00049 HWPort *portb; 00050 HWPort *portc; 00051 HWPort *portd; 00052 HWPort *porte; 00053 HWPort *portf; 00054 HWPort *portg; 00055 ExternalIRQHandler *extirq; 00056 IOSpecialReg *eicra_reg; 00057 IOSpecialReg *eicrb_reg; 00058 IOSpecialReg *eimsk_reg; 00059 IOSpecialReg *eifr_reg; 00060 00061 HWAdmux *admux; 00062 HWAd *ad; 00063 00064 IOSpecialReg *assr_reg; 00065 IOSpecialReg *sfior_reg; 00066 HWPrescalerAsync *prescaler0; 00067 HWPrescaler *prescaler123; 00068 ICaptureSource *inputCapture1; 00069 ICaptureSource *inputCapture3; 00070 HWTimer8_1C* timer0; 00071 HWTimer16_3C* timer1; 00072 HWTimer8_1C* timer2; 00073 HWTimer16_3C* timer3; 00074 TimerIRQRegister* timer012irq; 00075 TimerIRQRegister* timer3irq; 00076 HWSpi *spi; 00077 HWUsart *usart0; 00078 HWUsart *usart1; 00079 00080 AvrDevice_atmega128(); 00081 ~AvrDevice_atmega128(); 00082 }; 00083 00084 #endif