Explorar o código

Merge pull request #514 from kasjer/kasjer/fix-nrf52-edpt_dma_start

nrf52: Fix edpt_dma_start() wrong condition check
Ha Thach %!s(int64=5) %!d(string=hai) anos
pai
achega
9a0a78c52e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/portable/nordic/nrf5x/dcd_nrf5x.c

+ 1 - 1
src/portable/nordic/nrf5x/dcd_nrf5x.c

@@ -122,7 +122,7 @@ static void edpt_dma_start(volatile uint32_t* reg_startep)
         // for the DMA complete by comparing current pending DMA with number of ENDED Events
         uint32_t ended = 0;
 
-        while ( _dcd.dma_pending < ((uint8_t) ended) )
+        while ( _dcd.dma_pending > ((uint8_t) ended) )
         {
           ended = NRF_USBD->EVENTS_ENDISOIN + NRF_USBD->EVENTS_ENDISOOUT;