Ich möchte in diesen Forum weiterschreiben

Hier das steht in asuro.c drinen

Code:
void SerRead(unsigned char *data, unsigned char length,unsigned int timeout)
{
   unsigned char i = 0;
   unsigned int  time = 0;
   UCSRB = 0x10; // enable receiver
   /* non blocking */
   if (timeout != 0) {
      while (i < length && time++ < timeout) {
         if (UCSRA & 0x80) {
            data[i++] = UDR;
            time = 0;
         }
      }
      if (time > timeout) data[0] = 'T';
   }
   /* blocking */
   else {
      while (i < length) {
         if (UCSRA & 0x80)
            data[i++] = UDR;
      }
   }   
}