[En-Nut-Discussion] Preview Fix 060626

Harald Kipp harald.kipp at egnite.de
Tue Jun 27 09:41:01 CEST 2006


Michael,

At 21:01 26.06.2006 +0200, you wrote:

>Twif.c seems to be missing from the file...

Oops. Only the directory had been created. Here's the diff:

diff -rcb -x CVS nut/arch/avr/dev/twif.c 
C:\ethernut-4.1.4\nut/arch/avr/dev/twif.c
*** nut/arch/avr/dev/twif.c     Mon May 15 11:13:07 2006
--- C:\ethernut-4.1.4\nut/arch/avr/dev/twif.c   Sun Jun 25 13:41:48 2006
***************
*** 392,398 ****
            * must now setup the transmit buffer and re-enable the
            * interface.
            */
!         if (NutEventPostFromIrq(&tw_sr_que) == 0 || tw_sm_err) {
               /*
                * If no one has been waiting on the queue, the application
                * probably gave up waiting. So we continue on our own, either
--- 392,398 ----
            * must now setup the transmit buffer and re-enable the
            * interface.
            */
!         if (tw_sr_que == 0 || tw_sm_err) {
               /*
                * If no one has been waiting on the queue, the application
                * probably gave up waiting. So we continue on our own, either
***************
*** 408,413 ****
--- 408,414 ----
               tw_if_bsy = 0;
           }
           else {
+             NutEventPostFromIrq(&tw_sr_que);
               tw_sr_siz = 0;
               outb(TWCR, twcr & ~(_BV(TWINT) | _BV(TWIE)));
           }




More information about the En-Nut-Discussion mailing list