23 #ifndef __SIM_MEGAX8_H__
24 #define __SIM_MEGAX8_H__
60 #ifndef SIM_VECTOR_SIZE
61 #error SIM_VECTOR_SIZE is not declared
64 #error SIM_MMCU is not declared
68 #ifdef _AVR_IOM328P_H_
70 #define EFUSE_DEFAULT 0
93 .name =
'B', .r_port = PORTB, .r_ddr = DDRB, .r_pin = PINB,
97 .vector = PCINT0_vect,
102 .name =
'C', .r_port = PORTC, .r_ddr = DDRC, .r_pin = PINC,
106 .vector = PCINT1_vect,
111 .name =
'D', .r_port = PORTD, .r_ddr = DDRD, .r_pin = PIND,
115 .vector = PCINT2_vect,
139 .vector = USART_RX_vect,
144 .vector = USART_TX_vect,
149 .vector = USART_UDRE_vect,
207 .cs_div = { 0, 0, 3 , 6 , 8 , 10 },
214 .vector = TIMER0_OVF_vect,
224 .vector = TIMER0_COMPA_vect,
234 .vector = TIMER0_COMPB_vect,
257 .cs_div = { 0, 0, 3 , 6 , 8 , 10 },
270 .vector = TIMER1_OVF_vect,
275 .vector = TIMER1_CAPT_vect,
286 .vector = TIMER1_COMPA_vect,
297 .vector = TIMER1_COMPB_vect,
314 .cs_div = { 0, 0, 3 , 5 , 6 , 7 , 8 , 10 },
324 .vector = TIMER2_OVF_vect,
334 .vector = TIMER2_COMPA_vect,
344 .vector = TIMER2_COMPB_vect,
#define AVR_TIMER_WGM_NORMAL8()
Definition: avr_timer.h:87
Definition: avr_watchdog.h:35
avr_eeprom_t eeprom
Definition: sim_90usb162.c:42
void mx8_init(struct avr_t *avr)
Definition: sim_megax8.c:26
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
avr_ioport_t portb
Definition: sim_90usb162.c:46
#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 uart
Definition: sim_megax.h:50
#define AVR_SELFPROG_DECLARE_NORWW(_spmr, _spen, _vector)
Definition: avr_flash.h:76
#define AVR_ADC_TEMP()
Definition: avr_adc.h:171
#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
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
void mx8_reset(struct avr_t *avr)
Definition: sim_megax8.c:46
avr_t core
Definition: sim_90usb162.c:41
#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
#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
Definition: avr_adc.h:101
avr_ioport_t portc
Definition: sim_90usb162.c:46
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
Definition: avr_adc.h:100
#define SIM_VECTOR_SIZE
Definition: sim_mega16.c:26
#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_spi_t spi
Definition: sim_90usb162.c:49
avr_extint_t extint
Definition: sim_90usb162.c:45
#define AVR_IO_REGBIT(_io, _bit)
Definition: sim_regbit.h:150
Definition for an IO port.
Definition: avr_ioport.h:97