Permalink
Browse files

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

  • Loading branch information...
1 parent 11281ec commit 915e4889e41b61e2b4b312ca3cddb943cb31487f @damellis damellis committed Feb 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 hardware/arduino/cores/arduino/HardwareSerial.cpp
@@ -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)

0 comments on commit 915e488

Please sign in to comment.