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:
parent
dd5bae59df
commit
e1438efb3a
|
@ -46,8 +46,8 @@
|
||||||
struct ring_buffer
|
struct ring_buffer
|
||||||
{
|
{
|
||||||
unsigned char buffer[SERIAL_BUFFER_SIZE];
|
unsigned char buffer[SERIAL_BUFFER_SIZE];
|
||||||
volatile int head;
|
volatile unsigned int head;
|
||||||
volatile int tail;
|
volatile unsigned int tail;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(USBCON)
|
#if defined(USBCON)
|
||||||
|
|
Loading…
Reference in New Issue