misc: Cleanup & typos
authorMichel Pollet <buserror@gmail.com>
Wed, 11 Apr 2012 20:57:37 +0000 (21:57 +0100)
committerMichel Pollet <buserror@gmail.com>
Wed, 11 Apr 2012 20:57:37 +0000 (21:57 +0100)
No functional changes

Signed-off-by: Michel Pollet <buserror@gmail.com>
examples/parts/ac_input.c
simavr/sim/avr_flash.c

index 1808710..75d0718 100644 (file)
 #include "ac_input.h"
 
 static avr_cycle_count_t
-switch_auto(struct avr_t * avr,
-        avr_cycle_count_t when, void * param)
+switch_auto(
+               struct avr_t * avr,
+        avr_cycle_count_t when,
+        void * param)
 {
        ac_input_t * b = (ac_input_t *) param;
        b->value = !b->value;
@@ -35,9 +37,10 @@ switch_auto(struct avr_t * avr,
        return when + avr_usec_to_cycles(avr, 100000 / 50);
 }
 
+static const char * name = ">ac_input";
+
 void ac_input_init(avr_t *avr, ac_input_t *b)
 {
-       const char * name = ">ac_input";
        b->irq = avr_alloc_irq(&avr->irq_pool, 0, IRQ_AC_COUNT, &name);
        b->avr = avr;
        b->value = 0;
index a23099d..2a17839 100644 (file)
@@ -70,7 +70,7 @@ static int avr_flash_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_param
                z &= ~1;
                printf("Writing page %04x (%d)\n", (z / p->spm_pagesize), p->spm_pagesize);
        } else if (avr_regbit_get(avr, p->blbset)) {
-               printf("Settting lock bits (ignored)\n");
+               printf("Setting lock bits (ignored)\n");
        } else {
                z &= ~1;
                avr->flash[z++] = r01;
@@ -93,6 +93,5 @@ void avr_flash_init(avr_t * avr, avr_flash_t * p)
        avr_register_vector(avr, &p->flash);
 
        avr_register_io_write(avr, p->r_spm, avr_flash_write, p);
-//     avr_register_io_read(avr, p->r_spm, avr_flash_read, p);
 }