From: Sami Liedes Date: Mon, 28 Feb 2011 21:37:59 +0000 (+0200) Subject: Fix interupt -> interrupt typo, including in some function names. X-Git-Tag: v1.0a7~1 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=c95077cc5166fb332a9772e29748085db9470d19;p=sx%2Fsimavr.git Fix interupt -> interrupt typo, including in some function names. Signed-off-by: Sami Liedes --- diff --git a/examples/board_timer_64led/timer_64led.c b/examples/board_timer_64led/timer_64led.c index fe838f9..0495a19 100644 --- a/examples/board_timer_64led/timer_64led.c +++ b/examples/board_timer_64led/timer_64led.c @@ -279,10 +279,10 @@ int main(int argc, char *argv[]) avr_vcd_init(avr, "gtkwave_output.vcd", &vcd_file, 10000 /* usec */); avr_vcd_add_signal(&vcd_file, - avr_get_interupt_irq(avr, 7), 1 /* bit */ , + avr_get_interrupt_irq(avr, 7), 1 /* bit */ , "TIMER2_COMPA" ); avr_vcd_add_signal(&vcd_file, - avr_get_interupt_irq(avr, 17), 1 /* bit */ , + avr_get_interrupt_irq(avr, 17), 1 /* bit */ , "SPI_INT" ); avr_vcd_add_signal(&vcd_file, i_mosi, 8 /* bits */ , diff --git a/simavr/sim/avr_extint.h b/simavr/sim/avr_extint.h index 480e505..fce4fa4 100644 --- a/simavr/sim/avr_extint.h +++ b/simavr/sim/avr_extint.h @@ -1,7 +1,7 @@ /* avr_extint.h - External Interupt Handling (for INT0-3) + External Interrupt Handling (for INT0-3) Copyright 2008, 2009 Michel Pollet diff --git a/simavr/sim/avr_timer.c b/simavr/sim/avr_timer.c index 2cf9344..8bdb7cf 100644 --- a/simavr/sim/avr_timer.c +++ b/simavr/sim/avr_timer.c @@ -332,11 +332,11 @@ static void avr_timer_write_pending(struct avr_t * avr, avr_io_addr_t addr, uint avr_core_watch_write(avr, addr, v); // clear any interrupts & flags - avr_clear_interupt_if(avr, &p->overflow, ov); - avr_clear_interupt_if(avr, &p->icr, ic); + avr_clear_interrupt_if(avr, &p->overflow, ov); + avr_clear_interrupt_if(avr, &p->icr, ic); for (int compi = 0; compi < AVR_TIMER_COMP_COUNT; compi++) - avr_clear_interupt_if(avr, &p->comp[compi].interrupt, cp[compi]); + avr_clear_interrupt_if(avr, &p->comp[compi].interrupt, cp[compi]); } static void avr_timer_irq_icp(struct avr_irq_t * irq, uint32_t value, void * param) diff --git a/simavr/sim/avr_twi.c b/simavr/sim/avr_twi.c index c605011..a8c15d8 100644 --- a/simavr/sim/avr_twi.c +++ b/simavr/sim/avr_twi.c @@ -145,7 +145,7 @@ avr_twi_write( if (!twen) return; - int cleared = avr_clear_interupt_if(avr, &p->twi, twint); + int cleared = avr_clear_interrupt_if(avr, &p->twi, twint); // clear the interrupt if this bit is now written to 1 if (cleared) { diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 4e6f0e5..f6000e6 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -34,7 +34,7 @@ static avr_cycle_count_t avr_uart_txc_raise(struct avr_t * avr, avr_cycle_count_ { avr_uart_t * p = (avr_uart_t *)param; if (avr_regbit_get(avr, p->txen)) { - // if the interrupts are not used, still raised the UDRE and TXC flag + // if the interrupts are not used, still raise the UDRE and TXC flag avr_raise_interrupt(avr, &p->udrc); avr_raise_interrupt(avr, &p->txc); } @@ -143,14 +143,14 @@ static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, vo } if (addr == p->udrc.enable.reg) { /* - * If enabling the UDRC interupt, raise it immediately if FIFO is empty + * If enabling the UDRC interrupt, raise it immediately if FIFO is empty */ uint8_t udrce = avr_regbit_get(avr, p->udrc.enable); avr_core_watch_write(avr, addr, v); uint8_t nudrce = avr_regbit_get(avr, p->udrc.enable); if (!udrce && nudrce) { - // if the FIDO is not empty (clear timer is flying) we dont - // need to raise the interupt, it will happend when the timer + // if the FIDO is not empty (clear timer is flying) we don't + // need to raise the interrupt, it will happen when the timer // is fired. if (avr_cycle_timer_status(avr, avr_uart_txc_raise, p) == 0) avr_raise_interrupt(avr, &p->udrc); @@ -162,11 +162,11 @@ static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, vo uint8_t txc = avr_regbit_get(avr, p->txc.raised); // no need to write this value in here, only the - // interupt flags needs clearing! + // interrupt flags need clearing! // avr_core_watch_write(avr, addr, v); - //avr_clear_interupt_if(avr, &p->udrc, udre); - avr_clear_interupt_if(avr, &p->txc, txc); + //avr_clear_interrupt_if(avr, &p->udrc, udre); + avr_clear_interrupt_if(avr, &p->txc, txc); } } diff --git a/simavr/sim/sim_interrupts.c b/simavr/sim/sim_interrupts.c index a52ea48..d1d2dca 100644 --- a/simavr/sim/sim_interrupts.c +++ b/simavr/sim/sim_interrupts.c @@ -98,7 +98,7 @@ void avr_clear_interrupt(avr_t * avr, int v) avr_regbit_clear(avr, vector->raised); } -int avr_clear_interupt_if(avr_t * avr, avr_int_vector_t * vector, uint8_t old) +int avr_clear_interrupt_if(avr_t * avr, avr_int_vector_t * vector, uint8_t old) { if (avr_regbit_get(avr, vector->raised)) { avr_clear_interrupt(avr, vector->vector); @@ -109,7 +109,7 @@ int avr_clear_interupt_if(avr_t * avr, avr_int_vector_t * vector, uint8_t old) return 0; } -avr_irq_t * avr_get_interupt_irq(avr_t * avr, uint8_t v) +avr_irq_t * avr_get_interrupt_irq(avr_t * avr, uint8_t v) { avr_int_vector_t * vector = avr->vector[v]; return vector ? &vector->irq : NULL; @@ -135,7 +135,7 @@ void avr_service_interrupts(avr_t * avr) int bit = ffs(map)-1; int v = (bi * 32) + bit; // vector avr_int_vector_t * vector = avr->vector[v]; - // if that single interupt is masked, ignore it and continue + // if that single interrupt is masked, ignore it and continue if (vector && !avr_regbit_get(avr, vector->enable)) { map &= ~(1 << bit); continue; diff --git a/simavr/sim/sim_interrupts.h b/simavr/sim/sim_interrupts.h index 659a497..92d9c8c 100644 --- a/simavr/sim/sim_interrupts.h +++ b/simavr/sim/sim_interrupts.h @@ -19,8 +19,8 @@ along with simavr. If not, see . */ -#ifndef __SIM_INTERUPTS_H__ -#define __SIM_INTERUPTS_H__ +#ifndef __SIM_INTERRUPTS_H__ +#define __SIM_INTERRUPTS_H__ #include "sim_avr.h" #include "sim_irq.h" @@ -58,14 +58,14 @@ void avr_clear_interrupt(avr_t * avr, int v); void avr_service_interrupts(avr_t * avr); // clear the interrupt (inc pending) if "raised" flag is 1 -int avr_clear_interupt_if(avr_t * avr, avr_int_vector_t * vector, uint8_t old); +int avr_clear_interrupt_if(avr_t * avr, avr_int_vector_t * vector, uint8_t old); // return the IRQ that is raised when the vector is enabled and called/cleared -// this allows tracing of pending interupts -avr_irq_t * avr_get_interupt_irq(avr_t * avr, uint8_t v); +// this allows tracing of pending interrupts +avr_irq_t * avr_get_interrupt_irq(avr_t * avr, uint8_t v); #ifdef __cplusplus }; #endif -#endif /* __SIM_INTERUPTS_H__ */ +#endif /* __SIM_INTERRUPTS_H__ */