simulavr  1.1.0
at90canbase.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  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  ****************************************************************************
22  */
23 #ifndef AT90CAN
24 #define AT90CAN
25 
26 #include "avrdevice.h"
27 #include "hardware.h"
28 #include "rwmem.h"
29 #include "externalirq.h"
30 #include "hwuart.h"
31 #include "hwad.h"
32 #include "hwacomp.h"
33 #include "hwport.h"
34 #include "hwspi.h"
35 #include "hwtimer/timerprescaler.h"
36 #include "hwtimer/hwtimer.h"
37 #include "ioregs.h" //only for rampz here
38 
39 #include <memory>
40 
41 //using std::auto_ptr;
42 
49 
50  protected:
73  HWAd* ad;
85 
89 
95 
96  public:
97 
102  AvrDevice_at90canbase(unsigned ram_bytes, unsigned flash_bytes,
103  unsigned ee_bytes );
104 
106 
107 };
108 
111  public:
113  AvrDevice_at90can32() : AvrDevice_at90canbase(2 * 1024, 32 * 1024, 1024) {}
114 };
115 
118  public:
120  AvrDevice_at90can64() : AvrDevice_at90canbase(4 * 1024, 64 * 1024, 2 * 1024) {}
121 };
122 
125  public:
127  AvrDevice_at90can128() : AvrDevice_at90canbase(4 * 1024, 128 * 1024, 4 * 1024) {}
128 };
129 
130 #endif
HWPrescalerAsync prescaler2
prescaler unit for timer 2
Definition: at90canbase.h:61
HWUsart * usart1
usart 1 unit
Definition: at90canbase.h:77
GPIORegister * gpior0_reg
Definition: at90canbase.h:90
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
AVR device class for AT90CAN64, see AvrDevice_at90canbase.
Definition: at90canbase.h:117
PrescalerMultiplexer premux1
prescaler multiplexer for timer 0
Definition: at90canbase.h:63
Definition: hwad.h:90
Extends HWPrescaler with a external clock oszillator pin.
PrescalerMultiplexer premux2
prescaler multiplexer for timer 0
Definition: at90canbase.h:64
AVR device class for AT90CAN32, see AvrDevice_at90canbase.
Definition: at90canbase.h:110
AVR device class for AT90CAN128, see AvrDevice_at90canbase.
Definition: at90canbase.h:124
HWSpi * spi
spi unit
Definition: at90canbase.h:74
Implement CLKPR register.
Definition: rwmem.h:135
HWPort portf
port F
Definition: at90canbase.h:56
IOSpecialReg gtccr_reg
GTCCR IO register.
Definition: at90canbase.h:58
Timer unit with 8Bit counter and one output compare unit.
Definition: hwtimer.h:377
Defines a Port, e.g. a hardware device for GPIO.
Definition: hwport.h:43
A register in IO register space unrelated to any peripheral. "GPIORx" in datasheets.
Definition: rwmem.h:113
CLKPRRegister * clkpr_reg
CLKPR IO register.
Definition: at90canbase.h:93
PrescalerMultiplexerExt premux0
prescaler multiplexer for timer 0
Definition: at90canbase.h:62
Handler for external IRQ&#39;s to communicate with IRQ system and mask/flag registers.
Definition: externalirq.h:41
PrescalerMultiplexerExt premux3
prescaler multiplexer for timer 0
Definition: at90canbase.h:65
HWUsart * usart0
usart 0 unit
Definition: at90canbase.h:76
HWAd * ad
adc unit
Definition: at90canbase.h:73
ExternalIRQHandler * extirq01
external interrupt support for INT0, INT1, INT2, INT3, INT4, INT5, INT6, INT7
Definition: at90canbase.h:66
Implements the I/O hardware necessary to do USART transfers.
Definition: hwuart.h:149
IOSpecialReg * eimsk_reg
EIMSK IO register.
Definition: at90canbase.h:69
OSCCALRegister * osccal_reg
OSCCAL IO register.
Definition: at90canbase.h:94
GPIORegister * gpior1_reg
Definition: at90canbase.h:91
HWPort portb
port B
Definition: at90canbase.h:52
ICaptureSource * inputCapture3
input capture source for timer3
Definition: at90canbase.h:86
TimerIRQRegister * timerIrq3
timer interrupt unit for timer 3
Definition: at90canbase.h:87
HWPrescaler prescaler013
prescaler unit for timer 0 and 1
Definition: at90canbase.h:60
HWPort porte
port E
Definition: at90canbase.h:55
HWTimer8_1C * timer2
timer 2 unit
Definition: at90canbase.h:84
HWPort portg
port G
Definition: at90canbase.h:57
Reference source for ADC (base class)
Definition: hwad.h:35
AvrDevice_at90can64()
Creates the device for AT90CAN64, see AvrDevice_atcan90base.
Definition: at90canbase.h:120
IOSpecialReg * eicrb_reg
EICRA IO register.
Definition: at90canbase.h:68
HWPort portc
port C
Definition: at90canbase.h:53
Timer unit with 16Bit counter and 3 output compare units.
Definition: hwtimer.h:656
TimerIRQRegister * timerIrq0
timer interrupt unit for timer 0
Definition: at90canbase.h:78
Provices flag and mask register for timer interrupts and connects irq lines to irqsystem.
Definition: timerirq.h:61
Definition: hwspi.h:38
TimerIRQRegister * timerIrq2
timer interrupt unit for timer 2
Definition: at90canbase.h:83
Prescaler unit for support timers with clock.
HWPort portd
port D
Definition: at90canbase.h:54
IOSpecialReg * eicra_reg
EICRA IO register.
Definition: at90canbase.h:67
PrescalerMultiplexer without external count pin.
Definition: prescalermux.h:35
HWAcomp * acomp
analog compare unit
Definition: at90canbase.h:75
HWTimer8_1C * timer0
timer 0 unit
Definition: at90canbase.h:79
HWAdmux * admux
adc multiplexer unit
Definition: at90canbase.h:71
Class, which provides input capture source for 16bit timers.
Definition: icapturesrc.h:34
HWARef * aref
adc reference unit
Definition: at90canbase.h:72
IOSpecialReg * eifr_reg
EIFR IO register.
Definition: at90canbase.h:70
Definition: hwad.h:204
AvrDevice_at90can128()
Creates the device for AT90CAN128, see AvrDevice_atcan90base.
Definition: at90canbase.h:127
TimerIRQRegister * timerIrq1
timer interrupt unit for timer 1
Definition: at90canbase.h:81
AvrDevice_at90canbase(unsigned ram_bytes, unsigned flash_bytes, unsigned ee_bytes)
Definition: at90canbase.cpp:73
HWPort porta
port B
Definition: at90canbase.h:51
ICaptureSource * inputCapture1
input capture source for timer1
Definition: at90canbase.h:80
HWTimer16_3C * timer1
timer 1 unit
Definition: at90canbase.h:82
PrescalerMultiplexer with external count pin.
Definition: prescalermux.h:55
GPIORegister * gpior2_reg
Definition: at90canbase.h:92
HWTimer16_3C * timer3
timer 3 unit
Definition: at90canbase.h:88
Analog comparator peripheral.
Definition: hwacomp.h:42
Implement OSCCAL register.
Definition: rwmem.h:174
AvrDevice_at90can32()
Creates the device for AT90CAN32, see AvrDevice_atcan90base.
Definition: at90canbase.h:113
IOSpecialReg assr_reg
ASSR IO register.
Definition: at90canbase.h:59