title: Data structure for storing serial port data in firmware
body: <p>I am sending data from a linux application through serial port to an embedded device.</p>
  
  <p>In the current implementation a byte circular buffer is used in the firmware. (Nothing but an array with a read and write pointer)
  As the bytes come in, it is written to the circular bufffer.</p>
  
  <p>Now the PC application appears to be sending the data too fast for the firmware to handle. Bytes are missed resulting in the firmware returning WRONG_INPUT too mant times.</p>
  
  <p>I think baud rate (115200) is not the issue. A more efficient data structure at the firmware side might help. Any suggestions on choice of data structure?</p>