Commit ff9ccdb6a1ad827c6d8c719f40c783b8e225d34c
authorMichel Pollet <buserror@gmail.com>
Thu, 17 Dec 2009 19:50:37 +0000 (19:50 +0000)
committerMichel Pollet <buserror@gmail.com>
Thu, 17 Dec 2009 19:50:37 +0000 (19:50 +0000)
This has no functiinal change, apart to keep the table of
"handled" interupts in the avr_t structure complete.

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_uart.c

index 151b8f70087ec01531089c8f2a84a8e903b4fe4c..e11679ce5267f042e0b788bc0341b5d359bf64fc 100644 (file)
@@ -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);