22 #ifndef __SIM_MEGAX4_H__
23 #define __SIM_MEGAX4_H__
64 #error SIM_MMCU is not declared
94 .name =
'A', .r_port = PORTA, .r_ddr = DDRA, .r_pin = PINA,
98 .vector = PCINT0_vect,
103 .name =
'B', .r_port = PORTB, .r_ddr = DDRB, .r_pin = PINB,
107 .vector = PCINT1_vect,
112 .name =
'C', .r_port = PORTC, .r_ddr = DDRC, .r_pin = PINC,
116 .vector = PCINT2_vect,
121 .name =
'D', .r_port = PORTD, .r_ddr = DDRD, .r_pin = PIND,
125 .vector = PCINT3_vect,
149 .vector = USART0_RX_vect,
154 .vector = USART0_TX_vect,
159 .vector = USART0_UDRE_vect,
181 .vector = USART1_RX_vect,
186 .vector = USART1_TX_vect,
191 .vector = USART1_UDRE_vect,
257 .cs_div = { 0, 0, 3 , 6 , 8 , 10 },
264 .vector = TIMER0_OVF_vect,
274 .vector = TIMER0_COMPA_vect,
284 .vector = TIMER0_COMPB_vect,
308 .cs_div = { 0, 0, 3 , 6 , 8 , 10 },
321 .vector = TIMER1_OVF_vect,
326 .vector = TIMER1_CAPT_vect,
337 .vector = TIMER1_COMPA_vect,
348 .vector = TIMER1_COMPB_vect,
364 .cs_div = { 0, 0, 3 , 5 , 6 , 7 , 8 , 10 },
374 .vector = TIMER2_OVF_vect,
384 .vector = TIMER2_COMPA_vect,
394 .vector = TIMER2_COMPB_vect,
419 .cs_div = { 0, 0, 3 , 6 , 8 , 10 },
432 .vector = TIMER3_OVF_vect,
437 .vector = TIMER3_CAPT_vect,
448 .vector = TIMER3_COMPA_vect,
459 .vector = TIMER3_COMPB_vect,
#define AVR_TIMER_WGM_FCPWM9()
Definition: avr_timer.h:95
#define AVR_TIMER_WGM_NORMAL8()
Definition: avr_timer.h:87
Definition: avr_watchdog.h:35
avr_eeprom_t eeprom
Definition: sim_90usb162.c:42
Handles self-programming subsystem if the core supports it.
Definition: avr_flash.h:38
#define SIM_MMCU
Definition: sim_mega324.c:24
#define SIM_CORENAME
Definition: sim_mega324.c:25
#define PD3
Definition: sim_mega128rfr2.c:57
avr_ioport_t portb
Definition: sim_90usb162.c:46
void mx4_init(struct avr_t *avr)
Definition: sim_megax4.c:26
#define AVR_ADC_REF(_t)
Definition: avr_adc.h:166
avr_t * avr
Definition: run_avr.c:54
#define AVR_ADC_SINGLE(_chan)
Definition: avr_adc.h:154
#define AVR_TIMER_WGM_FASTPWM8()
Definition: avr_timer.h:91
#define AVR_TIMER_WGM_FASTPWM10()
Definition: avr_timer.h:93
avr_uart_t uart0
Definition: sim_mega128.c:52
#define AVR_TIMER_WGM_ICCTC()
Definition: avr_timer.h:90
avr_timer_t timer2
Definition: sim_mega128.c:54
#define AVR_SELFPROG_DECLARE(_spmr, _spen, _vector)
Definition: avr_flash.h:82
#define AVR_TIMER_WGM_FASTPWM9()
Definition: avr_timer.h:92
#define PD2
Definition: sim_mega128rfr2.c:56
This module is just a "relay" for the pin change IRQ in the IO port module.
Definition: avr_extint.h:56
avr_adc_t adc
Definition: sim_mega128.c:53
#define AVR_SPI_DECLARE(_prr, _prspi)
Definition: avr_spi.h:66
#define AVR_TIMER_WGM_CTC()
Definition: avr_timer.h:89
avr_watchdog_t watchdog
Definition: sim_90usb162.c:44
Definition: sim_90usb162.c:40
#define AVR_EXTINT_DECLARE(_index, _portname, _portpin)
Declares a typical INT into a avr_extint_t in a core.
Definition: avr_extint.h:77
Definition: avr_eeprom.h:35
avr_t core
Definition: sim_90usb162.c:41
#define AVR_TIMER_WGM_FCPWM10()
Definition: avr_timer.h:96
#define DEFAULT_CORE(_vector_size)
Definition: sim_core_declare.h:52
Definition: avr_timer.h:37
Definition: avr_timer.h:111
avr_timer_t timer0
Definition: sim_90usb162.c:48
avr_ioport_t portd
Definition: sim_90usb162.c:46
Definition: avr_uart.h:91
#define AVR_IO_REGBITS(_io, _bit, _mask)
Definition: sim_regbit.h:153
avr_ioport_t porta
Definition: sim_mega128.c:51
#define AVR_EEPROM_DECLARE(_vector)
The eeprom block seems to be very similar across AVRs, so here is a macro to declare a "typical" one ...
Definition: avr_eeprom.h:70
avr_timer_t timer1
Definition: sim_90usb162.c:48
Definition: avr_adc.h:108
#define AVR_TIMER_WGM_ICPWM()
Definition: avr_timer.h:98
#define AVR_TIMER_WGM_OCPWM()
Definition: avr_timer.h:97
avr_uart_t uart1
Definition: sim_90usb162.c:47
avr_ioport_t portc
Definition: sim_90usb162.c:46
void mx4_reset(struct avr_t *avr)
Definition: sim_megax4.c:51
avr_twi_t twi
Definition: sim_mega128.c:56
avr_flash_t selfprog
Definition: sim_90usb162.c:43
#define AVR_TIMER_WGM_NORMAL16()
Definition: avr_timer.h:88
Definition: avr_timer.h:38
#define AVR_WATCHDOG_DECLARE(_WDSR, _vec)
This helps declare a watchdog block into a core.
Definition: avr_watchdog.h:66
Main AVR instance.
Definition: sim_avr.h:142
avr_timer_t timer3
Definition: sim_mega128.c:54
avr_spi_t spi
Definition: sim_90usb162.c:49
avr_extint_t extint
Definition: sim_90usb162.c:45
#define AVR_ADC_DIFF(_a, _b, _g)
Definition: avr_adc.h:159
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150
Definition for an IO port.
Definition: avr_ioport.h:97
#define AVR_TIMER_WGM_FCPWM8()
Definition: avr_timer.h:94