From fc26b41280b3b2fc5875a7e33cf345306ef62fa9 Mon Sep 17 00:00:00 2001 From: Jochen Kiemes Date: Thu, 3 Jun 2021 18:18:50 +0200 Subject: [PATCH] change spaces to tab --- simavr/cores/sim_mega2560.h | 16 ++++++++-------- simavr/cores/sim_megax8.h | 4 ++-- simavr/sim/avr_timer.c | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/simavr/cores/sim_mega2560.h b/simavr/cores/sim_mega2560.h index 56a3450..f8a41a1 100644 --- a/simavr/cores/sim_mega2560.h +++ b/simavr/cores/sim_mega2560.h @@ -385,14 +385,14 @@ const struct mcu_t { }, // TIMER2_COMPB is only appeared in 2560 [AVR_TIMER_COMPB] = { - .r_ocr = OCR2B, - .com = AVR_IO_REGBITS(TCCR2A, COM2B0, 0x3), - .com_pin = AVR_IO_REGBIT(PORTH, PH6), - .interrupt = { - .enable = AVR_IO_REGBIT(TIMSK2, OCIE2B), - .raised = AVR_IO_REGBIT(TIFR2, OCF2B), - .vector = TIMER2_COMPB_vect, - }, + .r_ocr = OCR2B, + .com = AVR_IO_REGBITS(TCCR2A, COM2B0, 0x3), + .com_pin = AVR_IO_REGBIT(PORTH, PH6), + .interrupt = { + .enable = AVR_IO_REGBIT(TIMSK2, OCIE2B), + .raised = AVR_IO_REGBIT(TIFR2, OCF2B), + .vector = TIMER2_COMPB_vect, + }, }, }, }, diff --git a/simavr/cores/sim_megax8.h b/simavr/cores/sim_megax8.h index ecb5971..3e2d6bf 100644 --- a/simavr/cores/sim_megax8.h +++ b/simavr/cores/sim_megax8.h @@ -279,7 +279,7 @@ const struct mcu_t SIM_CORENAME = { .r_ocrh = OCR1AH, // 16 bits timers have two bytes of it .com = AVR_IO_REGBITS(TCCR1A, COM1A0, 0x3), .com_pin = AVR_IO_REGBIT(PORTB, 1), - .foc = AVR_IO_REGBIT(TCCR1C, FOC1A), + .foc = AVR_IO_REGBIT(TCCR1C, FOC1A), .interrupt = { .enable = AVR_IO_REGBIT(TIMSK1, OCIE1A), .raised = AVR_IO_REGBIT(TIFR1, OCF1A), @@ -291,7 +291,7 @@ const struct mcu_t SIM_CORENAME = { .r_ocrh = OCR1BH, .com = AVR_IO_REGBITS(TCCR1A, COM1B0, 0x3), .com_pin = AVR_IO_REGBIT(PORTB, 2), - .foc = AVR_IO_REGBIT(TCCR1C, FOC1B), + .foc = AVR_IO_REGBIT(TCCR1C, FOC1B), .interrupt = { .enable = AVR_IO_REGBIT(TIMSK1, OCIE1B), .raised = AVR_IO_REGBIT(TIFR1, OCF1B), diff --git a/simavr/sim/avr_timer.c b/simavr/sim/avr_timer.c index ff2c352..da98a43 100644 --- a/simavr/sim/avr_timer.c +++ b/simavr/sim/avr_timer.c @@ -86,10 +86,10 @@ avr_timer_comp( uint8_t mode = avr_regbit_get(avr, p->comp[comp].com); avr_irq_t * irq = &p->io.irq[TIMER_IRQ_OUT_COMP + comp]; - uint32_t flags = 0; - if (p->comp[comp].com_pin.reg) // we got a physical pin - flags |= AVR_IOPORT_OUTPUT; - AVR_LOG(avr, LOG_TRACE, "Timer comp: irq %p, mode %d @%d\n", irq, mode, when); + uint32_t flags = 0; + if (p->comp[comp].com_pin.reg) // we got a physical pin + flags |= AVR_IOPORT_OUTPUT; + AVR_LOG(avr, LOG_TRACE, "Timer comp: irq %p, mode %d @%d\n", irq, mode, when); switch (mode) { case avr_timer_com_normal: // Normal mode OCnA disconnected break; @@ -127,10 +127,10 @@ avr_timer_comp_on_tov( uint8_t mode = avr_regbit_get(avr, p->comp[comp].com); avr_irq_t * irq = &p->io.irq[TIMER_IRQ_OUT_COMP + comp]; - // only PWM modes have special behaviour on overflow - if((p->wgm_op_mode_kind != avr_timer_wgm_pwm) && - (p->wgm_op_mode_kind != avr_timer_wgm_fast_pwm)) - return; + // only PWM modes have special behaviour on overflow + if((p->wgm_op_mode_kind != avr_timer_wgm_pwm) && + (p->wgm_op_mode_kind != avr_timer_wgm_fast_pwm)) + return; switch (mode) { case avr_timer_com_normal: // Normal mode @@ -970,8 +970,8 @@ avr_timer_init( if (p->comp[compi].r_ocr) // not all timers have all comparators avr_register_io_write(avr, p->comp[compi].r_ocr, avr_timer_write_ocr, &p->comp[compi]); - if (p->comp[compi].foc.reg) - avr_register_io_write(avr, p->comp[compi].foc.reg, avr_timer_write_foc, p); + if (p->comp[compi].foc.reg) + avr_register_io_write(avr, p->comp[compi].foc.reg, avr_timer_write_foc, p); } avr_register_io_write(avr, p->r_tcnt, avr_timer_tcnt_write, p); avr_register_io_read(avr, p->r_tcnt, avr_timer_tcnt_read, p); -- 2.39.5