simulavr  1.1.0
atmega2560base.h
Go to the documentation of this file.
1  /*
2  ****************************************************************************
3  *
4  * simulavr - A simulator for the Atmel AVR family of microcontrollers.
5  * Copyright (C) 2001, 2002, 2003 Klaus Rudolph
6  * Copyright (C) 2015 Christian Taedcke
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  ****************************************************************************
23  */
24 #ifndef ATMEGA2560BASE_INCLUDED
25 #define ATMEGA2560BASE_INCLUDED
26 
27 #include "avrdevice.h"
28 #include "hardware.h"
29 #include "rwmem.h"
30 #include "externalirq.h"
31 #include "hwuart.h"
32 #include "hwad.h"
33 #include "hwacomp.h"
34 #include "hwport.h"
35 #include "hwspi.h"
36 #include "hwtimer/timerprescaler.h"
37 #include "hwtimer/hwtimer.h"
38 
39 #include "ioregs.h" // only for rampz
40 
44 
45 protected:
57 
81  HWAd* ad;
109 
110 public:
111  AvrDevice_atmega2560base(unsigned ram_bytes, unsigned flash_bytes,
112  unsigned ee_bytes, unsigned nrww_start);
114 };
115 
117 public:
118  AvrDevice_atmega2560() : AvrDevice_atmega2560base(8 * 1024, 256 * 1024, 4 * 1024, 0x1f000) {}
119 };
120 
122 public:
123  AvrDevice_atmega1280() : AvrDevice_atmega2560base(8 * 1024, 128 * 1024, 4 * 1024, 0xf000) {}
124 };
125 
127 public:
128  AvrDevice_atmega640() : AvrDevice_atmega2560base(8 * 1024, 64 * 1024, 4 * 1024, 0x7000) {}
129 };
130 
131 #endif
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
PrescalerMultiplexer premux2
prescaler multiplexer for timer 2
IOSpecialReg assr_reg
ASSR IO register.
Definition: hwad.h:90
Extends HWPrescaler with a external clock oszillator pin.
TimerIRQRegister * timerIrq3
timer interrupt unit for timer 3
TimerIRQRegister * timerIrq4
timer interrupt unit for timer 4
ExternalIRQHandler * extirqpc
external interrupt support for PCINT[0-2]
IOSpecialReg * eifr_reg
EIFR IO register.
HWPrescalerAsync prescaler2
prescaler unit for timer 2
Implement CLKPR register.
Definition: rwmem.h:135
Defines a Port, e.g. a hardware device for GPIO.
Definition: hwport.h:43
IOSpecialReg * eimsk_reg
EIMSK IO register.
A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets.
Definition: rwmem.h:113
PrescalerMultiplexerExt premux1
prescaler multiplexer for timer 1
Handler for external IRQ's to communicate with IRQ system and mask/flag registers.
Definition: externalirq.h:41
IOSpecialReg * pcicr_reg
PCICR IO register.
HWUsart * usart2
usart 2 unit
HWTimer16_3C * timer1
timer 1 unit
Implements the I/O hardware necessary to do USART transfers.
Definition: hwuart.h:149
HWAcomp * acomp
analog compare unit
PrescalerMultiplexerExt premux0
prescaler multiplexer for timer 0
TimerIRQRegister * timerIrq2
timer interrupt unit for timer 2
ExternalIRQHandler * extirq
external interrupt support for INT0 to INT7
PrescalerMultiplexerExt premux4
prescaler multiplexer for timer 4
GPIORegister * gpior0_reg
general purpose IO register
GPIORegister * gpior2_reg
general purpose IO register
HWTimer16_3C * timer5
timer 5 unit
IOSpecialReg * pcmsk2_reg
PCIMSK2 IO register.
Reference source for ADC (base class)
Definition: hwad.h:35
HWTimer16_3C * timer4
timer 4 unit
HWAdmux * admux
adc multiplexer unit
OSCCALRegister * osccal_reg
OSCCAL IO register.
PrescalerMultiplexerExt premux5
prescaler multiplexer for timer 5
ICaptureSource * inputCapture3
input capture source for timer 3
AvrDevice_atmega2560base(unsigned ram_bytes, unsigned flash_bytes, unsigned ee_bytes, unsigned nrww_start)
HWTimer16_3C * timer3
timer 3 unit
IOSpecialReg gtccr_reg
GTCCR IO register.
PrescalerMultiplexerExt premux3
prescaler multiplexer for timer 3
IOSpecialReg * pcmsk1_reg
PCIMSK1 IO register.
Timer unit with 16Bit counter and 3 output compare units.
Definition: hwtimer.h:656
Provices flag and mask register for timer interrupts and connects irq lines to irqsystem.
Definition: timerirq.h:61
TimerIRQRegister * timerIrq0
timer interrupt unit for timer 0
IOSpecialReg * eicra_reg
EICRA IO register.
IOSpecialReg * pcmsk0_reg
PCIMSK0 IO register.
Definition: hwspi.h:38
ICaptureSource * inputCapture1
input capture source for timer 1
TimerIRQRegister * timerIrq1
timer interrupt unit for timer 1
Prescaler unit for support timers with clock.
HWUsart * usart0
usart 0 unit
PrescalerMultiplexer without external count pin.
Definition: prescalermux.h:35
ICaptureSource * inputCapture5
input capture source for timer 5
HWTimer8_2C * timer2
timer 2 unit
Class, which provides input capture source for 16bit timers.
Definition: icapturesrc.h:34
Timer unit with 8Bit counter and 2 output compare unit.
Definition: hwtimer.h:416
TimerIRQRegister * timerIrq5
timer interrupt unit for timer 5
Definition: hwad.h:204
GPIORegister * gpior1_reg
general purpose IO register
IOSpecialReg * eicrb_reg
EICRB IO register.
HWUsart * usart3
usart 3 unit
ICaptureSource * inputCapture4
input capture source for timer 4
HWARef * aref
adc reference unit
HWUsart * usart1
usart 1 unit
PrescalerMultiplexer with external count pin.
Definition: prescalermux.h:55
HWPrescaler prescaler1
prescaler unit for timer 0, 1, 3, 4 and 5
HWTimer8_2C * timer0
timer 0 unit
Analog comparator peripheral.
Definition: hwacomp.h:42
HWSpi * spi
spi unit
IOSpecialReg * pcifr_reg
PCIFR IO register.
Implement OSCCAL register.
Definition: rwmem.h:174
CLKPRRegister * clkpr_reg
CLKPR IO register.