Browse Source

*** EFM32 branch ***
Fix a bug in USART driver

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1974 bbd45198-f89e-11dd-88c7-29a3b14d5316

onelife.real 13 years ago
parent
commit
0120ba02a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bsp/efm32/drv_usart.c

+ 1 - 1
bsp/efm32/drv_usart.c

@@ -523,8 +523,8 @@ static rt_size_t rt_usart_read (
                 {
                 {
                     *(ptr++) = usart->usart_device->RXDATA & 0xff;
                     *(ptr++) = usart->usart_device->RXDATA & 0xff;
                 }
                 }
+                len--;
             }
             }
-            len--;
         }
         }
 
 
         read_len = size - len;
         read_len = size - len;