From 43058ff5ce6505ccfe471e1ab6e6af30cff2acdb Mon Sep 17 00:00:00 2001 From: ga Date: Wed, 28 Jul 2021 09:15:38 +0100 Subject: [PATCH] Accept review comments on PR #427 - data type and tabs/spaces. --- simavr/cores/sim_mega1280.c | 14 +++++++------- simavr/sim/avr_extint.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/simavr/cores/sim_mega1280.c b/simavr/cores/sim_mega1280.c index 13685dc..448cfd9 100644 --- a/simavr/cores/sim_mega1280.c +++ b/simavr/cores/sim_mega1280.c @@ -96,8 +96,8 @@ const struct mcu_t { .vector = PCINT1_vect, }, .r_pcint = PCMSK1, - .mask = 1, // PE0 has PCINT8 - .shift = 0 + .mask = 1, // PE0 has PCINT8 + .shift = 0 }, AVR_IOPORT_DECLARE(f, 'F', F), AVR_IOPORT_DECLARE(g, 'G', G), @@ -110,8 +110,8 @@ const struct mcu_t { .vector = PCINT1_vect, }, .r_pcint = PCMSK1, - .mask = 0b11111110, // PJ0-6 have PCINT9-15 - .shift = -1 + .mask = 0b11111110, // PJ0-6 have PCINT9-15 + .shift = -1 }, AVR_IOPORT_DECLARE_PC(k, 'K', K, 2), // PK0-7 have PCINT16-23 AVR_IOPORT_DECLARE(l, 'L', L), @@ -380,7 +380,7 @@ const struct mcu_t { .vector = TIMER2_COMPA_vect, }, }, - // TIMER2_COMPB is only appeared in 1280 + // TIMER2_COMPB is only appeared in 1280 //[AVR_TIMER_COMPB] = { // .r_ocr = OCR2B, // .com = AVR_IO_REGBITS(TCCR2A, COM2B0, 0x3), @@ -663,8 +663,8 @@ static avr_t * make() } avr_kind_t mega1280 = { - .names = { "atmega1280" }, - .make = make + .names = { "atmega1280" }, + .make = make }; void m1280_init(struct avr_t * avr) diff --git a/simavr/sim/avr_extint.c b/simavr/sim/avr_extint.c index d5371eb..6f85660 100644 --- a/simavr/sim/avr_extint.c +++ b/simavr/sim/avr_extint.c @@ -39,12 +39,12 @@ static avr_cycle_count_t avr_extint_poll_level_trig( avr_extint_poll_context_t *poll = (avr_extint_poll_context_t *)param; avr_extint_t * p = poll->extint; - /* Check for change of interrupt mode. */ + /* Check for change of interrupt mode. */ - if (avr_regbit_get_array(avr, p->eint[poll->eint_no].isc, 2)) + if (avr_regbit_get_array(avr, p->eint[poll->eint_no].isc, 2)) goto terminate_poll; - char port = p->eint[poll->eint_no].port_ioctl & 0xFF; + uint8_t port = p->eint[poll->eint_no].port_ioctl & 0xFF; avr_ioport_state_t iostate; if (avr_ioctl(avr, AVR_IOCTL_IOPORT_GETSTATE( port ), &iostate) < 0) goto terminate_poll; @@ -182,7 +182,7 @@ static void avr_extint_reset(avr_io_t * port) for (int i = 0; i < EXTINT_COUNT; i++) { if (p->eint[i].port_ioctl) { - avr_irq_register_notify(p->io.irq + i, avr_extint_irq_notify, p); + avr_irq_register_notify(p->io.irq + i, avr_extint_irq_notify, p); if (p->eint[i].isc[1].reg) // level triggering available p->eint[i].strict_lvl_trig = 1; // turn on repetitive level triggering by default @@ -217,10 +217,10 @@ void avr_extint_init(avr_t * avr, avr_extint_t * p) avr_register_io(avr, &p->io); for (int i = 0; i < EXTINT_COUNT; i++) { - if (!p->eint[i].port_ioctl) - break; + if (!p->eint[i].port_ioctl) + break; avr_register_vector(avr, &p->eint[i].vector); - } + } // allocate this module's IRQ avr_io_setirqs(&p->io, AVR_IOCTL_EXTINT_GETIRQ(), EXTINT_COUNT, NULL); -- 2.39.5