From 6d2da708b0b554f5f70d0c74ce09d4dd279d49d2 Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Thu, 12 Jul 2012 00:14:15 +0200 Subject: [PATCH] misc: Fixed a couple of typos in comments --- Makefile.common | 4 +-- examples/board_hd77480/README | 2 +- .../board_timer_64led/atmega168_timer_64led.c | 4 +-- simavr/cores/sim_mega128.c | 2 +- simavr/cores/sim_mega164.c | 2 +- simavr/cores/sim_mega168.c | 2 +- simavr/cores/sim_mega16m1.c | 2 +- simavr/cores/sim_mega324.c | 2 +- simavr/cores/sim_mega328.c | 2 +- simavr/cores/sim_mega48.c | 2 +- simavr/cores/sim_mega644.c | 2 +- simavr/cores/sim_mega8.c | 2 +- simavr/cores/sim_mega88.c | 2 +- simavr/cores/sim_megax.h | 2 +- simavr/cores/sim_tiny24.c | 2 +- simavr/cores/sim_tiny25.c | 2 +- simavr/cores/sim_tiny44.c | 2 +- simavr/cores/sim_tiny45.c | 2 +- simavr/cores/sim_tiny84.c | 2 +- simavr/cores/sim_tiny85.c | 2 +- simavr/sim/avr_adc.h | 2 +- simavr/sim/avr_extint.c | 2 +- simavr/sim/avr_ioport.c | 2 +- simavr/sim/avr_lin.c | 2 +- simavr/sim/avr_spi.c | 2 +- simavr/sim/avr_timer.c | 4 +-- simavr/sim/avr_timer.h | 2 +- simavr/sim/avr_twi.c | 28 +++++++++---------- simavr/sim/avr_twi.h | 2 +- simavr/sim/avr_uart.c | 8 +++--- simavr/sim/avr_uart.h | 2 +- simavr/sim/avr_usb.c | 2 +- simavr/sim/sim_avr.c | 4 +-- simavr/sim/sim_avr.h | 8 +++--- simavr/sim/sim_core.c | 8 +++--- simavr/sim/sim_core.h | 2 +- simavr/sim/sim_cycle_timers.c | 4 +-- simavr/sim/sim_elf.c | 2 +- simavr/sim/sim_elf.h | 2 +- simavr/sim/sim_gdb.c | 2 +- simavr/sim/sim_hex.c | 2 +- simavr/sim/sim_io.h | 2 +- simavr/sim/sim_irq.h | 2 +- simavr/sim/sim_vcd_file.h | 2 +- 44 files changed, 71 insertions(+), 71 deletions(-) diff --git a/Makefile.common b/Makefile.common index a73a059..e019689 100644 --- a/Makefile.common +++ b/Makefile.common @@ -5,7 +5,7 @@ # # The code is compiled "optimized" to the max. # -# The wierd "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000" +# The weird "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000" # is used to tell the linker not to discard the .mmcu section, # otherwise the --gc-sections will delete it. # @@ -85,7 +85,7 @@ endif # The code is compiled "optimized" to the max. # -# The wierd "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000" +# The weird "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000" # is used to tell the linker not to discard the .mmcu section, # otherwise the --gc-sections will delete it. diff --git a/examples/board_hd77480/README b/examples/board_hd77480/README index 0ef3b59..7957e23 100644 --- a/examples/board_hd77480/README +++ b/examples/board_hd77480/README @@ -4,7 +4,7 @@ board_hd44780 With thanks to Luki This sample code is derivated from a patch sent by Luki, however it was mostly -in german, and was usinf the SDL library. Also the implementation of the LCD +in german, and was using the SDL library. Also the implementation of the LCD itself had several shortcomings. Therefore it was almost entirely rewritten from scratch the LCD was extended diff --git a/examples/board_timer_64led/atmega168_timer_64led.c b/examples/board_timer_64led/atmega168_timer_64led.c index 0eb3270..c413e90 100644 --- a/examples/board_timer_64led/atmega168_timer_64led.c +++ b/examples/board_timer_64led/atmega168_timer_64led.c @@ -479,8 +479,8 @@ int main(void) for (;;) { /* main event loop */ /* If our internal ideal of which keys are down is different from the one that has been - updated cia the interupts, we start counting. If the 'different' key(s) stays the same for - 50ms, we declare it an 'event' and update the internsl key state + updated via the interrupts, we start counting. If the 'different' key(s) stays the same for + 50ms, we declare it an 'event' and update the internal key state */ if (keyState != lastKeyValue) { for (uint8_t ki = 0; ki < KEY_MAX; ki++) diff --git a/simavr/cores/sim_mega128.c b/simavr/cores/sim_mega128.c index fd617ed..ce142a5 100644 --- a/simavr/cores/sim_mega128.c +++ b/simavr/cores/sim_mega128.c @@ -41,7 +41,7 @@ void m128_reset(struct avr_t * avr); #include "avr/iom128.h" /* - * This is a template for all of the 128 devices, hopefuly + * This is a template for all of the 128 devices, hopefully */ const struct mcu_t { avr_t core; diff --git a/simavr/cores/sim_mega164.c b/simavr/cores/sim_mega164.c index baa59d3..b2db8d2 100644 --- a/simavr/cores/sim_mega164.c +++ b/simavr/cores/sim_mega164.c @@ -27,7 +27,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom164.h" -// instanciate the new core +// instantiate the new core #include "sim_megax4.h" static avr_t * make() diff --git a/simavr/cores/sim_mega168.c b/simavr/cores/sim_mega168.c index 70f1b4e..1ed79d3 100644 --- a/simavr/cores/sim_mega168.c +++ b/simavr/cores/sim_mega168.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom168.h" -// instanciate the new core +// instantiate the new core #include "sim_megax8.h" static avr_t * make() diff --git a/simavr/cores/sim_mega16m1.c b/simavr/cores/sim_mega16m1.c index 29fefa7..0b82c1e 100644 --- a/simavr/cores/sim_mega16m1.c +++ b/simavr/cores/sim_mega16m1.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom16m1.h" -// instanciate the new core +// instantiate the new core #include "sim_megaxm1.h" static avr_t * make() diff --git a/simavr/cores/sim_mega324.c b/simavr/cores/sim_mega324.c index 7b32be5..7c29ae0 100644 --- a/simavr/cores/sim_mega324.c +++ b/simavr/cores/sim_mega324.c @@ -27,7 +27,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom324.h" -// instanciate the new core +// instantiate the new core #include "sim_megax4.h" static avr_t * make() diff --git a/simavr/cores/sim_mega328.c b/simavr/cores/sim_mega328.c index 83115f3..3466939 100644 --- a/simavr/cores/sim_mega328.c +++ b/simavr/cores/sim_mega328.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom328p.h" -// instanciate the new core +// instantiate the new core #include "sim_megax8.h" static avr_t * make() diff --git a/simavr/cores/sim_mega48.c b/simavr/cores/sim_mega48.c index 18fe00a..82bde2d 100644 --- a/simavr/cores/sim_mega48.c +++ b/simavr/cores/sim_mega48.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom48.h" -// instanciate the new core +// instantiate the new core #include "sim_megax8.h" static avr_t * make() diff --git a/simavr/cores/sim_mega644.c b/simavr/cores/sim_mega644.c index 0e54e6a..7a82976 100644 --- a/simavr/cores/sim_mega644.c +++ b/simavr/cores/sim_mega644.c @@ -27,7 +27,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom644.h" -// instanciate the new core +// instantiate the new core #include "sim_megax4.h" static avr_t * make() diff --git a/simavr/cores/sim_mega8.c b/simavr/cores/sim_mega8.c index cad021b..74acf98 100644 --- a/simavr/cores/sim_mega8.c +++ b/simavr/cores/sim_mega8.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom8.h" -// instanciate the new core +// instantiate the new core #include "sim_megax.h" static avr_t * make() diff --git a/simavr/cores/sim_mega88.c b/simavr/cores/sim_mega88.c index 84c58ea..ed11b3e 100644 --- a/simavr/cores/sim_mega88.c +++ b/simavr/cores/sim_mega88.c @@ -28,7 +28,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iom88.h" -// instanciate the new core +// instantiate the new core #include "sim_megax8.h" static avr_t * make() diff --git a/simavr/cores/sim_megax.h b/simavr/cores/sim_megax.h index f192780..65f5616 100644 --- a/simavr/cores/sim_megax.h +++ b/simavr/cores/sim_megax.h @@ -38,7 +38,7 @@ void mx_init(struct avr_t * avr); void mx_reset(struct avr_t * avr); /* - * This is a template for all of the 8/32/64 devices, hopefuly + * This is a template for all of the 8/32/64 devices, hopefully */ struct mcu_t { avr_t core; diff --git a/simavr/cores/sim_tiny24.c b/simavr/cores/sim_tiny24.c index 7babdf9..4229dc1 100644 --- a/simavr/cores/sim_tiny24.c +++ b/simavr/cores/sim_tiny24.c @@ -29,7 +29,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn24.h" -// instanciate the new core +// instantiate the new core #include "sim_tinyx4.h" static avr_t * make() diff --git a/simavr/cores/sim_tiny25.c b/simavr/cores/sim_tiny25.c index b0ff4bc..71a962f 100644 --- a/simavr/cores/sim_tiny25.c +++ b/simavr/cores/sim_tiny25.c @@ -29,7 +29,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn25.h" -// instanciate the new core +// instantiate the new core #include "sim_tinyx5.h" static avr_t * make() diff --git a/simavr/cores/sim_tiny44.c b/simavr/cores/sim_tiny44.c index 25f99a9..0fea8d5 100644 --- a/simavr/cores/sim_tiny44.c +++ b/simavr/cores/sim_tiny44.c @@ -29,7 +29,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn44.h" -// instanciate the new core +// instantiate the new core #include "sim_tinyx4.h" static avr_t * make() diff --git a/simavr/cores/sim_tiny45.c b/simavr/cores/sim_tiny45.c index 4e79a1e..e94c9cf 100644 --- a/simavr/cores/sim_tiny45.c +++ b/simavr/cores/sim_tiny45.c @@ -29,7 +29,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn45.h" -// instanciate the new core +// instantiate the new core #include "sim_tinyx5.h" static avr_t * make() diff --git a/simavr/cores/sim_tiny84.c b/simavr/cores/sim_tiny84.c index 70bae75..3aa914e 100644 --- a/simavr/cores/sim_tiny84.c +++ b/simavr/cores/sim_tiny84.c @@ -30,7 +30,7 @@ #define __ASSEMBLER__ #include "avr/iotn84.h" #define HFUSE_DEFAULT FUSE_HFUSE_DEFAULT -// instanciate the new core +// instantiate the new core #include "sim_tinyx4.h" static avr_t * make() diff --git a/simavr/cores/sim_tiny85.c b/simavr/cores/sim_tiny85.c index 4ffe66d..2f827a1 100644 --- a/simavr/cores/sim_tiny85.c +++ b/simavr/cores/sim_tiny85.c @@ -29,7 +29,7 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn85.h" -// instanciate the new core +// instantiate the new core #include "sim_tinyx5.h" static avr_t * make() diff --git a/simavr/sim/avr_adc.h b/simavr/sim/avr_adc.h index 6d0020b..eaf78ee 100644 --- a/simavr/sim/avr_adc.h +++ b/simavr/sim/avr_adc.h @@ -59,7 +59,7 @@ enum { ADC_MUX_NONE = 0, // Nothing. return 0 ADC_MUX_NOISE, // Nothing. return something random ADC_MUX_SINGLE, // Normal ADC pin reading - ADC_MUX_DIFF, // differencial channels (src-diff) + ADC_MUX_DIFF, // differential channels (src-diff) ADC_MUX_TEMP, // internal temp sensor ADC_MUX_REF, // reference voltage (in src * 100) ADC_MUX_VCC4, // VCC/4 diff --git a/simavr/sim/avr_extint.c b/simavr/sim/avr_extint.c index 1251739..416ee8c 100644 --- a/simavr/sim/avr_extint.c +++ b/simavr/sim/avr_extint.c @@ -36,7 +36,7 @@ static void avr_extint_irq_notify(struct avr_irq_t * irq, uint32_t value, void * int down = irq->value && !value; switch (mode) { case 0: - // unsuported + // unsupported break; case 1: if (up || down) diff --git a/simavr/sim/avr_ioport.c b/simavr/sim/avr_ioport.c index abbd10a..3966996 100644 --- a/simavr/sim/avr_ioport.c +++ b/simavr/sim/avr_ioport.c @@ -128,7 +128,7 @@ static int avr_ioport_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_para if (r->bit.mask == 0xff) r->irq[o++] = &p->io.irq[IOPORT_IRQ_PIN_ALL]; else { - // otherwise fil up the ones needed + // otherwise fill up the ones needed for (int bi = 0; bi < 8; bi++) if (r->bit.mask & (1 << bi)) r->irq[o++] = &p->io.irq[r->bit.bit + bi]; diff --git a/simavr/sim/avr_lin.c b/simavr/sim/avr_lin.c index 6e41219..a44b0ab 100644 --- a/simavr/sim/avr_lin.c +++ b/simavr/sim/avr_lin.c @@ -65,7 +65,7 @@ avr_lin_baud_write( lbrr, baud); p->uart.usec_per_byte = 1000000 / (baud / word_size); - printf("Roughtly %d usec per bytes\n", (int) p->uart.usec_per_byte); + printf("Roughly %d usec per bytes\n", (int) p->uart.usec_per_byte); } static void diff --git a/simavr/sim/avr_spi.c b/simavr/sim/avr_spi.c index 7a491b4..ecac48d 100644 --- a/simavr/sim/avr_spi.c +++ b/simavr/sim/avr_spi.c @@ -62,7 +62,7 @@ static void avr_spi_irq_input(struct avr_irq_t * irq, uint32_t value, void * par avr_spi_t * p = (avr_spi_t *)param; avr_t * avr = p->io.avr; - // check to see fi receiver is enabled + // check to see if receiver is enabled if (!avr_regbit_get(avr, p->spe)) return; diff --git a/simavr/sim/avr_timer.c b/simavr/sim/avr_timer.c index 7606c41..beee10d 100644 --- a/simavr/sim/avr_timer.c +++ b/simavr/sim/avr_timer.c @@ -161,7 +161,7 @@ static void avr_timer_tcnt_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t // this involves some magicking // cancel the current timers, recalculate the "base" we should be at, reset the - // timer base as it should, and re-shedule the timers using that base. + // timer base as it should, and re-schedule the timers using that base. avr_cycle_timer_cancel(avr, avr_timer_tov, p); avr_cycle_timer_cancel(avr, avr_timer_compa, p); @@ -283,7 +283,7 @@ static void avr_timer_write_ocr(struct avr_t * avr, avr_io_addr_t addr, uint8_t uint16_t oldv[AVR_TIMER_COMP_COUNT]; int target = -1; - /* vheck to see if the OCR values actualy changed */ + /* check to see if the OCR values actually changed */ for (int oi = 0; oi < AVR_TIMER_COMP_COUNT; oi++) oldv[oi] = _timer_get_ocr(p, oi); avr_core_watch_write(avr, addr, v); diff --git a/simavr/sim/avr_timer.h b/simavr/sim/avr_timer.h index 04b25e8..39362d4 100644 --- a/simavr/sim/avr_timer.h +++ b/simavr/sim/avr_timer.h @@ -43,7 +43,7 @@ enum { // Get the internal IRQ corresponding to the INT #define AVR_IOCTL_TIMER_GETIRQ(_name) AVR_IOCTL_DEF('t','m','r',(_name)) -// Waweform generation modes +// Waveform generation modes enum { avr_timer_wgm_none = 0, // invalid mode avr_timer_wgm_normal, diff --git a/simavr/sim/avr_twi.c b/simavr/sim/avr_twi.c index 41d2bde..6f17671 100644 --- a/simavr/sim/avr_twi.c +++ b/simavr/sim/avr_twi.c @@ -30,31 +30,31 @@ /**************************************************************************** TWI State codes ****************************************************************************/ -// General TWI Master staus codes +// General TWI Master status codes #define TWI_START 0x08 // START has been transmitted #define TWI_REP_START 0x10 // Repeated START has been transmitted #define TWI_ARB_LOST 0x38 // Arbitration lost -// TWI Master Transmitter staus codes -#define TWI_MTX_ADR_ACK 0x18 // SLA+W has been tramsmitted and ACK received -#define TWI_MTX_ADR_NACK 0x20 // SLA+W has been tramsmitted and NACK received -#define TWI_MTX_DATA_ACK 0x28 // Data byte has been tramsmitted and ACK received -#define TWI_MTX_DATA_NACK 0x30 // Data byte has been tramsmitted and NACK received +// TWI Master Transmitter status codes +#define TWI_MTX_ADR_ACK 0x18 // SLA+W has been transmitted and ACK received +#define TWI_MTX_ADR_NACK 0x20 // SLA+W has been transmitted and NACK received +#define TWI_MTX_DATA_ACK 0x28 // Data byte has been transmitted and ACK received +#define TWI_MTX_DATA_NACK 0x30 // Data byte has been transmitted and NACK received -// TWI Master Receiver staus codes -#define TWI_MRX_ADR_ACK 0x40 // SLA+R has been tramsmitted and ACK received -#define TWI_MRX_ADR_NACK 0x48 // SLA+R has been tramsmitted and NACK received -#define TWI_MRX_DATA_ACK 0x50 // Data byte has been received and ACK tramsmitted -#define TWI_MRX_DATA_NACK 0x58 // Data byte has been received and NACK tramsmitted +// TWI Master Receiver status codes +#define TWI_MRX_ADR_ACK 0x40 // SLA+R has been transmitted and ACK received +#define TWI_MRX_ADR_NACK 0x48 // SLA+R has been transmitted and NACK received +#define TWI_MRX_DATA_ACK 0x50 // Data byte has been received and ACK transmitted +#define TWI_MRX_DATA_NACK 0x58 // Data byte has been received and NACK transmitted -// TWI Slave Transmitter staus codes +// TWI Slave Transmitter status codes #define TWI_STX_ADR_ACK 0xA8 // Own SLA+R has been received; ACK has been returned #define TWI_STX_ADR_ACK_M_ARB_LOST 0xB0 // Arbitration lost in SLA+R/W as Master; own SLA+R has been received; ACK has been returned #define TWI_STX_DATA_ACK 0xB8 // Data byte in TWDR has been transmitted; ACK has been received #define TWI_STX_DATA_NACK 0xC0 // Data byte in TWDR has been transmitted; NOT ACK has been received #define TWI_STX_DATA_ACK_LAST_BYTE 0xC8 // Last data byte in TWDR has been transmitted (TWEA = �0�); ACK has been received -// TWI Slave Receiver staus codes +// TWI Slave Receiver status codes #define TWI_SRX_ADR_ACK 0x60 // Own SLA+W has been received ACK has been returned #define TWI_SRX_ADR_ACK_M_ARB_LOST 0x68 // Arbitration lost in SLA+R/W as Master; own SLA+W has been received; ACK has been returned #define TWI_SRX_GEN_ACK 0x70 // General call address has been received; ACK has been returned @@ -302,7 +302,7 @@ avr_twi_read_data( } /* - * prevent code from rewriting out status bits, since we actualy use them! + * prevent code from rewriting out status bits, since we actually use them! */ static void avr_twi_write_status( diff --git a/simavr/sim/avr_twi.h b/simavr/sim/avr_twi.h index 21c3687..5a84ba9 100644 --- a/simavr/sim/avr_twi.h +++ b/simavr/sim/avr_twi.h @@ -94,7 +94,7 @@ avr_twi_init( avr_twi_t * port); /* - * Create a message value for twi incuding the 'msg' bitfield, + * Create a message value for twi including the 'msg' bitfield, * 'addr' and data. This value is what is sent as the IRQ value */ static inline uint32_t diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 8adfe54..5510c02 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -141,7 +141,7 @@ static void avr_uart_baud_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t p->name, val, baud, avr_regbit_get(avr, p->u2x)?2:1, db, sb); // TODO: Use the divider value and calculate the straight number of cycles p->usec_per_byte = 1000000 / (baud / word_size); - printf("Roughtly %d usec per bytes\n", (int)p->usec_per_byte); + printf("Roughly %d usec per bytes\n", (int)p->usec_per_byte); } static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, void * param) @@ -168,7 +168,7 @@ static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, vo } } TRACE(printf("UDR%c(%02x) = %02x\n", p->name, addr, v);) - // tell other modules we are "outputing" a byte + // tell other modules we are "outputting" a byte if (avr_regbit_get(avr, p->txen)) avr_raise_irq(p->io.irq + UART_IRQ_OUTPUT, v); } @@ -206,7 +206,7 @@ static void avr_uart_irq_input(struct avr_irq_t * irq, uint32_t value, void * pa avr_uart_t * p = (avr_uart_t *)param; avr_t * avr = p->io.avr; - // check to see fi receiver is enabled + // check to see if receiver is enabled if (!avr_regbit_get(avr, p->rxen)) return; @@ -232,7 +232,7 @@ void avr_uart_reset(struct avr_io_t *io) avr_cycle_timer_cancel(avr, avr_uart_txc_raise, p); uart_fifo_reset(&p->input); - // DEBUG allow printf without fidding with enabling the uart + // DEBUG allow printf without fiddling with enabling the uart avr_regbit_set(avr, p->txen); p->usec_per_byte = 100; } diff --git a/simavr/sim/avr_uart.h b/simavr/sim/avr_uart.h index 933af11..f0ff4af 100644 --- a/simavr/sim/avr_uart.h +++ b/simavr/sim/avr_uart.h @@ -30,7 +30,7 @@ DECLARE_FIFO(uint8_t, uart_fifo, 64); /* * The method of "connecting" the the UART from external code is to use 4 IRQS. - * The easy one is UART->YOU, where you will be called with the byte everytime + * The easy one is UART->YOU, where you will be called with the byte every time * the AVR firmware sends one. Do whatever you like with it. * * The slightly more tricky one is the INPUT part. Since the AVR is quite a bit diff --git a/simavr/sim/avr_usb.c b/simavr/sim/avr_usb.c index 4f75374..2d6f264 100644 --- a/simavr/sim/avr_usb.c +++ b/simavr/sim/avr_usb.c @@ -673,7 +673,7 @@ avr_usb_ioctl( epstate->ueconx.stallrq = 0; // teensy actually depends on this (fails to ack rxouti on usb - // control read status stage) even if the datasheet clarely states + // control read status stage) even if the datasheet clearly states // that one should do so. epstate->ueintx.rxouti = 0; diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index 805c84f..8a1b994 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -46,7 +46,7 @@ int avr_init(avr_t * avr) // cpu is in limbo before init is finished. avr->state = cpu_Limbo; - avr->frequency = 1000000; // can be overriden via avr_mcu_section + avr->frequency = 1000000; // can be overridden via avr_mcu_section if (avr->special_init) avr->special_init(avr); if (avr->init) @@ -260,7 +260,7 @@ void avr_callback_run_raw(avr_t * avr) avr->interrupts.pending_wait++; avr->i_shadow = avr->sreg[S_I]; - // run the cycle timers, get the suggested sleeo time + // run the cycle timers, get the suggested sleep time // until the next timer is due avr_cycle_count_t sleep = avr_cycle_timer_process(avr); diff --git a/simavr/sim/sim_avr.h b/simavr/sim/sim_avr.h index c9414db..199af29 100644 --- a/simavr/sim/sim_avr.h +++ b/simavr/sim/sim_avr.h @@ -144,7 +144,7 @@ typedef struct avr_t { void (*init)(struct avr_t * avr); // called at init time (for special purposes like using a memory mapped file as flash see: simduino) void (*special_init)(struct avr_t * avr); - // called at termination time ( to clean special initalizations) + // called at termination time ( to clean special initializations) void (*special_deinit)(struct avr_t * avr); // called at reset time void (*reset)(struct avr_t * avr); @@ -172,7 +172,7 @@ typedef struct avr_t { // Mirror of the SREG register, to facilitate the access to bits // in the opcode decoder. - // This array is re-synthetized back/forth when SREG changes + // This array is re-synthesized back/forth when SREG changes uint8_t sreg[8]; uint8_t i_shadow; // used to detect edges on I flag @@ -323,7 +323,7 @@ avr_loadcode( avr_flashaddr_t address); /* - * these are accessors for avr->data but allows watchpoints to be set for gdb + * These are accessors for avr->data but allows watchpoints to be set for gdb * IO modules use that to set values to registers, and the AVR core decoder uses * that to register "public" read by instructions. */ @@ -346,7 +346,7 @@ avr_sadly_crashed( /* - * These are callbacks for the two 'main' bahaviour in simavr + * These are callbacks for the two 'main' behaviour in simavr */ void avr_callback_sleep_gdb(avr_t * avr, avr_cycle_count_t howLong); void avr_callback_run_gdb(avr_t * avr); diff --git a/simavr/sim/sim_core.c b/simavr/sim/sim_core.c index 6d95fb5..5ceb7f3 100644 --- a/simavr/sim/sim_core.c +++ b/simavr/sim/sim_core.c @@ -52,8 +52,8 @@ const char * _sreg_bit_name = "cznvshti"; #define REG_ISTOUCHED(a, r) ((a)->trace_data->touched[(r) >> 5] & (1 << ((r) & 0x1f))) /* - * This allows a "special case" to skip indtruction tracing when in these - * symbols. since printf() is useful to have, but generates a lot of cycles + * This allows a "special case" to skip instruction tracing when in these + * symbols since printf() is useful to have, but generates a lot of cycles. */ int dont_trace(const char * name) { @@ -134,7 +134,7 @@ uint8_t avr_core_watch_read(avr_t *avr, uint16_t addr) /* * Set a register (r < 256) - * if it's an IO regisrer (> 31) also (try to) call any callback that was + * if it's an IO register (> 31) also (try to) call any callback that was * registered to track changes to that register. */ static inline void _avr_set_r(avr_t * avr, uint8_t r, uint8_t v) @@ -451,7 +451,7 @@ static inline int _avr_is_instruction_32_bits(avr_t * avr, avr_flashaddr_t pc) * + It also doesn't check whether the core it's * emulating is supposed to have the fancy instructions, like multiply and such. * - * The nunber of cycles taken by instruction has been added, but might not be + * The number of cycles taken by instruction has been added, but might not be * entirely accurate. */ avr_flashaddr_t avr_run_one(avr_t * avr) diff --git a/simavr/sim/sim_core.h b/simavr/sim/sim_core.h index 7aa3585..9f83654 100644 --- a/simavr/sim/sim_core.h +++ b/simavr/sim/sim_core.h @@ -47,7 +47,7 @@ const char * avr_regname(uint8_t reg); /* * DEBUG bits follow - * These will diseapear when gdb arrives + * These will disappear when gdb arrives */ void avr_dump_state(avr_t * avr); diff --git a/simavr/sim/sim_cycle_timers.c b/simavr/sim/sim_cycle_timers.c index 71ab161..f3cbdd3 100644 --- a/simavr/sim/sim_cycle_timers.c +++ b/simavr/sim/sim_cycle_timers.c @@ -59,7 +59,7 @@ avr_cycle_timer_insert( when += avr->cycle; - // find it's place int the list + // find its place in the list int inserti = 0; while (inserti < pool->count && pool->timer[inserti].when > when) inserti++; @@ -148,7 +148,7 @@ avr_cycle_timer_status( } /* - * run thru all the timers, call the ones that needs it, + * run through all the timers, call the ones that needs it, * clear the ones that wants it, and calculate the next * potential cycle we could sleep for... */ diff --git a/simavr/sim/sim_elf.c b/simavr/sim/sim_elf.c index 7d41ddd..89ce5af 100644 --- a/simavr/sim/sim_elf.c +++ b/simavr/sim/sim_elf.c @@ -196,7 +196,7 @@ int elf_read_firmware(const char * file, elf_firmware_t * firmware) memset(firmware->codeline,0, bitesize); #endif - /* this is actualy mandatory !! otherwise elf_begin() fails */ + /* this is actually mandatory !! otherwise elf_begin() fails */ if (elf_version(EV_CURRENT) == EV_NONE) { /* library out of date - recover from error */ } diff --git a/simavr/sim/sim_elf.h b/simavr/sim/sim_elf.h index cd3cb9c..2c10bab 100644 --- a/simavr/sim/sim_elf.h +++ b/simavr/sim/sim_elf.h @@ -33,7 +33,7 @@ extern "C" { #endif /* these are the addresses the gnu linker uses to - * "fake" a non-harward addressign space for the AVR + * "fake" a non-Harvard addressing space for the AVR */ #define AVR_SEGMENT_OFFSET_FLASH 0 #define AVR_SEGMENT_OFFSET_EEPROM 0x00810000 diff --git a/simavr/sim/sim_gdb.c b/simavr/sim/sim_gdb.c index 2e651ed..bde9131 100644 --- a/simavr/sim/sim_gdb.c +++ b/simavr/sim/sim_gdb.c @@ -267,7 +267,7 @@ static void gdb_handle_command(avr_gdb_t * g, char * cmd) case 'z': { uint32_t kind, addr, len; sscanf(cmd, "%d,%x,%x", &kind, &addr, &len); -// printf("breakbpoint %d, %08x, %08x\n", kind, addr, len); +// printf("breakpoint %d, %08x, %08x\n", kind, addr, len); switch (kind) { case 0: // software breakpoint case 1: // hardware breakpoint diff --git a/simavr/sim/sim_hex.c b/simavr/sim/sim_hex.c index 7ded34a..0c4f24f 100644 --- a/simavr/sim/sim_hex.c +++ b/simavr/sim/sim_hex.c @@ -121,7 +121,7 @@ uint8_t * read_ihex_file(const char * fname, uint32_t * dsize, uint32_t * start) } uint16_t addr = (bline[1] << 8) | bline[2]; if (base == ~0) { - base = addr; // stadt address + base = addr; // start address } if (addr != base + size) { fprintf(stderr, "%s: %s, offset out of bounds %04x expected %04x\n", __FUNCTION__, fname, addr, base+size); diff --git a/simavr/sim/sim_io.h b/simavr/sim/sim_io.h index ecb1bd4..f0d44e6 100644 --- a/simavr/sim/sim_io.h +++ b/simavr/sim/sim_io.h @@ -104,7 +104,7 @@ struct avr_irq_t * avr_io_getirq(avr_t * avr, uint32_t ctl, int index); // get the IRQ for an absolute IO address // this allows any code to hook an IRQ in any io address, for example // tracing changes of values into a register -// Note that the values do not "magicaly" change, they change only +// Note that the values do not "magically" change, they change only // when the AVR code attempt to read and write at that address // // the "index" is a bit number, or ALL bits if index == 8 diff --git a/simavr/sim/sim_irq.h b/simavr/sim/sim_irq.h index ed2d5e5..d3ac30b 100644 --- a/simavr/sim/sim_irq.h +++ b/simavr/sim/sim_irq.h @@ -63,7 +63,7 @@ enum { */ typedef struct avr_irq_pool_t { int count; //!< number of irqs living in the pool - struct avr_irq_t ** irq; //!< irqs belongging in this pool + struct avr_irq_t ** irq; //!< irqs belonging in this pool } avr_irq_pool_t; /*! diff --git a/simavr/sim/sim_vcd_file.h b/simavr/sim/sim_vcd_file.h index 5392058..1bc38c8 100644 --- a/simavr/sim/sim_vcd_file.h +++ b/simavr/sim/sim_vcd_file.h @@ -36,7 +36,7 @@ extern "C" { * Value Change dump module for simavr. * * This structure registers IRQ change hooks to various "source" IRQs - * and dumps their values (if changed) at certains intervals into the VCD file + * and dumps their values (if changed) at certain intervals into the VCD file */ #define AVR_VCD_MAX_SIGNALS 32 -- 2.39.5