Making head and tail unsigned to avoid division in serial ISR.

http://code.google.com/p/arduino/issues/detail?id=776
This commit is contained in:
David A. Mellis 2012-02-03 17:24:29 -05:00
parent 11281ec77e
commit 915e4889e4
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@
struct ring_buffer
{
unsigned char buffer[SERIAL_BUFFER_SIZE];
volatile int head;
volatile int tail;
volatile unsigned int head;
volatile unsigned int tail;
};
#if defined(USBCON)