From ff9ccdb6a1ad827c6d8c719f40c783b8e225d34c Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Thu, 17 Dec 2009 19:50:37 +0000 Subject: [PATCH] uart: Register the interupt vectors This has no functiinal change, apart to keep the table of "handled" interupts in the avr_t structure complete. Signed-off-by: Michel Pollet --- simavr/sim/avr_uart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 151b8f7..e11679c 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -144,7 +144,6 @@ static avr_io_t _io = { void avr_uart_init(avr_t * avr, avr_uart_t * p) { p->io = _io; - avr_register_io(avr, &p->io); // printf("%s UART%c UDR=%02x\n", __FUNCTION__, p->name, p->r_udr); @@ -153,6 +152,11 @@ void avr_uart_init(avr_t * avr, avr_uart_t * p) p->io.irq = avr_alloc_irq(0, p->io.irq_count); p->io.irq_ioctl_get = AVR_IOCTL_UART_GETIRQ(p->name); + avr_register_io(avr, &p->io); + avr_register_vector(avr, &p->rxc); + avr_register_vector(avr, &p->txc); + avr_register_vector(avr, &p->udrc); + avr_register_io_write(avr, p->r_udr, avr_uart_write, p); avr_register_io_read(avr, p->r_udr, avr_uart_read, p); -- 2.39.5