title: Best practice in read data from buffer
body: <p>I would like to receive ideas about how to read data from an UART buffer. Being more precisely, I need a way to find some string pattern in the buffer. The problem is that if I wait to search this string, the buffer is written again, the counter changes, and the data can have the pattern or not. Well, I think that this explanation is a little hard to understand, so feel free to ask anything else.</p>
  
  <pre><code>void f(char * buffer) {
  
  char * p;
  p = strstr(buffer, "abc");
  
  printf(p);
  }
  </code></pre>
  
  <p>I think the UART, in my case, is written by blocks and not char by char and there's no way to say that data finished because it's a continuous stream. To better illustrate, it is a code that reads GPS data in NMEA protocol and try to get information from these data. </p>
  
  <p>Best regards</p>