From 7e88785f549405846d957a8d74dc92d92bc57ba6 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 6 Jan 2010 22:37:50 +0000 Subject: [PATCH] misc: Small cleanup Removed mutiple defined constants etc Signed-off-by: Michel Pollet --- simavr/sim/avr_flash.c | 2 +- simavr/sim/avr_uart.c | 6 +----- simavr/sim/avr_uart.h | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/simavr/sim/avr_flash.c b/simavr/sim/avr_flash.c index 05f3e87..fd0609a 100644 --- a/simavr/sim/avr_flash.c +++ b/simavr/sim/avr_flash.c @@ -92,7 +92,7 @@ static avr_io_t _io = { void avr_flash_init(avr_t * avr, avr_flash_t * p) { p->io = _io; - printf("%s init SPM %04x\n", __FUNCTION__, p->r_spm); +// printf("%s init SPM %04x\n", __FUNCTION__, p->r_spm); avr_register_io(avr, &p->io); avr_register_vector(avr, &p->flash); diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 7fdb353..ee306da 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -34,7 +34,7 @@ static avr_cycle_count_t avr_uart_txc_raise(struct avr_t * avr, avr_cycle_count_ { avr_uart_t * p = (avr_uart_t *)param; if (avr_regbit_get(avr, p->txen)) { - // if the interrupts are not used, still raised the UDRE and TXC flaga + // if the interrupts are not used, still raised the UDRE and TXC flag avr_raise_interrupt(avr, &p->udrc); avr_raise_interrupt(avr, &p->txc); } @@ -190,9 +190,6 @@ void avr_uart_reset(struct avr_io_t *io) } -#define AVR_IOCTL_UART_SET_FLAGS(_name) AVR_IOCTL_DEF('u','a','s',(_name)) -#define AVR_IOCTL_UART_GET_FLAGS(_name) AVR_IOCTL_DEF('u','a','g',(_name)) - static int avr_uart_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_param) { avr_uart_t * p = (avr_uart_t *)port; @@ -213,7 +210,6 @@ static int avr_uart_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_param) return res; } - static avr_io_t _io = { .kind = "uart", .reset = avr_uart_reset, diff --git a/simavr/sim/avr_uart.h b/simavr/sim/avr_uart.h index 283f7e0..1d8c725 100644 --- a/simavr/sim/avr_uart.h +++ b/simavr/sim/avr_uart.h @@ -38,7 +38,7 @@ DECLARE_FIFO(uint8_t, uart_fifo, 64); * you to "pause" sending it bytes when it's own input buffer is full. * So, the UART will send XON to you when it's fifo is empty, XON means you can * send as many bytes as you have until XOFF is send. Note that these are two - * IRQs because you /will/ be caused with XOFF when sending a byte in INPUT... + * IRQs because you /will/ be called with XOFF when sending a byte in INPUT... * So it's a reentrant process. * * When XOFF has been called, do not send any new bytes, they would be dropped. -- 2.20.1