From: Michel Pollet Date: Wed, 14 Sep 2011 07:10:53 +0000 (+0100) Subject: misc: formatting, typos X-Git-Tag: v1.0a9~8 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=ec48c6ce4e5bf89c5dae5f00d5e635dbea0c4ed1;p=sx%2Fsimavr.git misc: formatting, typos Also removed test case that doesn't actualy test anything Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 51ad736..9447ce3 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -67,7 +67,7 @@ static uint8_t avr_uart_rxc_read(struct avr_t * avr, avr_io_addr_t addr, void * // // if RX is enabled, and there is nothing to read, and // the AVR core is reading this register, it's probably - // to pool the RXC TXC flag and spinloop + // to poll the RXC TXC flag and spinloop // so here we introduce a usleep to make it a bit lighter // on CPU and let data arrive // @@ -90,7 +90,7 @@ static uint8_t avr_uart_read(struct avr_t * avr, avr_io_addr_t addr, void * para { avr_uart_t * p = (avr_uart_t *)param; - // clear the rxc bit in case the code is using pooling + // clear the rxc bit in case the code is using polling avr_regbit_clear(avr, p->rxc.raised); if (!avr_regbit_get(avr, p->rxen)) { diff --git a/simavr/sim/run_avr.c b/simavr/sim/run_avr.c index 9e5bb04..9356c95 100644 --- a/simavr/sim/run_avr.c +++ b/simavr/sim/run_avr.c @@ -38,7 +38,7 @@ void display_usage(char * app) printf(" -t: run full scale decoder trace\n" " -g: listen for gdb connection on port 1234\n" " -ff: Loads next .hex file as flash\n" - " -ee: Loads next .hec file as eeprom\n" + " -ee: Loads next .hex file as eeprom\n" " Supported AVR cores:\n"); for (int i = 0; avr_kind[i]; i++) { printf(" "); diff --git a/simavr/sim/sim_irq.c b/simavr/sim/sim_irq.c index 662a997..0e4c56e 100644 --- a/simavr/sim/sim_irq.c +++ b/simavr/sim/sim_irq.c @@ -164,8 +164,7 @@ avr_irq_unregister_notify( hook = irq->hook; prev = NULL; while (hook) { - if (hook->notify == notify && hook->param == param) - { + if (hook->notify == notify && hook->param == param) { if ( prev ) prev->next = hook->next; else @@ -241,8 +240,7 @@ avr_unconnect_irq( hook = src->hook; prev = NULL; while (hook) { - if (hook->chain == dst) - { + if (hook->chain == dst) { if ( prev ) prev->next = hook->next; else diff --git a/tests/atmega88_vcd.c b/tests/atmega88_vcd.c deleted file mode 100644 index 1894f84..0000000 --- a/tests/atmega88_vcd.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - atmega88_example.c - - */ - -#ifndef F_CPU -#define F_CPU 8000000 -#endif -#include -#include -#include -#include -#include -#include - -/* - * This demonstrate how to use the avr_mcu_section.h file - * The macro adds a section to the ELF file with useful - * information for the simulator - */ -#include "avr_mcu_section.h" -AVR_MCU(F_CPU, "atmega88"); - - -int main() -{ - DDRB = 1; - PORTB = 0; - - - // test VCD output for 100us - for(int i=0; i<10; i++) - { - PORTB = 1 ^ PORTB; - _delay_us(100); - } - - - // this quits the simulator, since interupts are off - // this is a "feature" that allows running tests cases and exit - sleep_cpu(); -} diff --git a/tests/test_atmega88_vcd.c b/tests/test_atmega88_vcd.c deleted file mode 100644 index 63c788b..0000000 --- a/tests/test_atmega88_vcd.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "sim_avr.h" -#include "avr_ioport.h" -#include "sim_vcd_file.h" - -#include "tests.h" - -int main(int argc, char **argv) { - tests_init(argc, argv); - - - avr_t *avr = tests_init_avr("atmega88_vcd.axf"); - - avr_vcd_t vcd_file; - avr_vcd_init(avr, "atmega88_vcd.vcd", &vcd_file, 10000); - avr_vcd_add_signal(&vcd_file, avr_io_getirq(avr, AVR_IOCTL_IOPORT_GETIRQ('B'), IOPORT_IRQ_PIN0), 1, "PB0" ); - avr_vcd_start(&vcd_file); - - tests_run_test(avr, 10000); - - avr_vcd_stop(&vcd_file); - tests_success(); - return 0; -}