From: Michel Pollet Date: Mon, 5 Apr 2010 12:39:06 +0000 (+0100) Subject: extint: Add more extints IRQs X-Git-Tag: v1.0a2~13 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=85b82a19d9cd53f7eea9b8b58852f550e53b16fb;p=sx%2Fsimavr.git extint: Add more extints IRQs ... and use them on the Mega128 core Signed-off-by: Michel Pollet --- diff --git a/simavr/cores/sim_mega128.c b/simavr/cores/sim_mega128.c index 7c53d36..90765f0 100644 --- a/simavr/cores/sim_mega128.c +++ b/simavr/cores/sim_mega128.c @@ -69,9 +69,14 @@ struct mcu_t { AVR_SELFPROG_DECLARE(SPMCSR, SPMEN, SPM_READY_vect), AVR_WATCHDOG_DECLARE_128(WDTCR, _VECTOR(0)), .extint = { - AVR_EXTINT_DECLARE(0, 'D', PD2), - AVR_EXTINT_DECLARE(1, 'D', PD3), - AVR_EXTINT_DECLARE(2, 'B', PB3), + AVR_EXTINT_DECLARE(0, 'D', PD0), + AVR_EXTINT_DECLARE(1, 'D', PD1), + AVR_EXTINT_DECLARE(2, 'D', PD2), + AVR_EXTINT_DECLARE(3, 'D', PD3), + AVR_EXTINT_DECLARE(4, 'E', PE4), + AVR_EXTINT_DECLARE(5, 'E', PE5), + AVR_EXTINT_DECLARE(6, 'E', PE6), + AVR_EXTINT_DECLARE(7, 'E', PE7), }, .porta = { // no PCINTs in atmega128 .name = 'A', .r_port = PORTA, .r_ddr = DDRA, .r_pin = PINA, @@ -403,7 +408,7 @@ static avr_t * make() } avr_kind_t mega128 = { - .names = { "mega128", "mega128L" }, + .names = { "atmega128", "atmega128L" }, .make = make }; diff --git a/simavr/sim/avr_extint.h b/simavr/sim/avr_extint.h index 8b0f1ba..c44e1e7 100644 --- a/simavr/sim/avr_extint.h +++ b/simavr/sim/avr_extint.h @@ -30,6 +30,8 @@ enum { EXTINT_IRQ_OUT_INT0 = 0, EXTINT_IRQ_OUT_INT1, EXTINT_IRQ_OUT_INT2, EXTINT_IRQ_OUT_INT3, + EXTINT_IRQ_OUT_INT4, EXTINT_IRQ_OUT_INT5, EXTINT_IRQ_OUT_INT6, + EXTINT_IRQ_OUT_INT7, EXTINT_COUNT };