misc: formatting, typos
authorMichel Pollet <buserror@gmail.com>
Wed, 14 Sep 2011 07:10:53 +0000 (08:10 +0100)
committerMichel Pollet <buserror@gmail.com>
Wed, 14 Sep 2011 07:17:51 +0000 (08:17 +0100)
Also removed test case that doesn't actualy test anything

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_uart.c
simavr/sim/run_avr.c
simavr/sim/sim_irq.c
tests/atmega88_vcd.c [deleted file]
tests/test_atmega88_vcd.c [deleted file]

index 51ad736..9447ce3 100644 (file)
@@ -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)) {
index 9e5bb04..9356c95 100644 (file)
@@ -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("       ");
index 662a997..0e4c56e 100644 (file)
@@ -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 (file)
index 1894f84..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-       atmega88_example.c
-
- */
-
-#ifndef F_CPU
-#define F_CPU 8000000
-#endif
-#include <avr/io.h>
-#include <stdio.h>
-#include <avr/interrupt.h>
-#include <avr/eeprom.h>
-#include <avr/sleep.h>
-#include <util/delay.h>
-
-/*
- * 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 (file)
index 63c788b..0000000
+++ /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;
-}