From 69b8d265acdd5d01114b2444bc2aa177e00a9c91 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 11 Apr 2012 21:57:37 +0100 Subject: [PATCH] misc: Cleanup & typos No functional changes Signed-off-by: Michel Pollet --- examples/parts/ac_input.c | 9 ++++++--- simavr/sim/avr_flash.c | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/parts/ac_input.c b/examples/parts/ac_input.c index 1808710..75d0718 100644 --- a/examples/parts/ac_input.c +++ b/examples/parts/ac_input.c @@ -26,8 +26,10 @@ #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; diff --git a/simavr/sim/avr_flash.c b/simavr/sim/avr_flash.c index a23099d..2a17839 100644 --- a/simavr/sim/avr_flash.c +++ b/simavr/sim/avr_flash.c @@ -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); } -- 2.39.5