Changeset efe25a8 in avrstuff


Ignore:
Timestamp:
Jul 29, 2014, 9:20:04 PM (10 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
cd3a9ac
Parents:
82d2b68
Message:

Avoid calling the counter overflow handler multiple times.

git-svn-id: svn://pulkomandy.tk/avrstuff@108 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chiptest/main.c

    r82d2b68 refe25a8  
    5151                        TIFR = (1 << TOV0); // reset flag
    5252                        counter++;
    53                 }
    5453
    55                 if (counter == 0)
    56                 {
    57                         PORTLED ^= LEDBIT; // Toggle the LED
    58                         UDR = 'H'; // Send a byte to the UART
     54                        if (counter == 0)
     55                        {
     56                                PORTLED ^= LEDBIT; // Toggle the LED
     57                                UDR = 'H'; // Send a byte to the UART
     58                        }
    5959                }
    6060        }
Note: See TracChangeset for help on using the changeset viewer.