[NUC472/M453] Fix PDMA error on timeout

pull/3918/head
ccli8 2017-03-07 17:54:32 +08:00 committed by cyliangtw
parent 1da33e809f
commit 4e96f8b721
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ static void pdma_vec(void)
PDMA->INTSTS = reqto;
while (reqto) {
int chn_id = nu_ctz(reqto) >> PDMA_INTSTS_REQTOFn_Pos;
int chn_id = nu_ctz(reqto) - PDMA_INTSTS_REQTOFn_Pos;
if (dma_chn_mask & (1 << chn_id)) {
struct nu_dma_chn_s *dma_chn = dma_chn_arr + chn_id;
if (dma_chn->handler && (dma_chn->event & DMA_EVENT_TIMEOUT)) {

View File

@ -165,7 +165,7 @@ static void pdma_vec(void)
PDMA->INTSTS = reqto;
while (reqto) {
int chn_id = nu_ctz(reqto) >> PDMA_INTSTS_REQTOFX_Pos;
int chn_id = nu_ctz(reqto) - PDMA_INTSTS_REQTOFX_Pos;
if (dma_chn_mask & (1 << chn_id)) {
struct nu_dma_chn_s *dma_chn = dma_chn_arr + chn_id;
if (dma_chn->handler && (dma_chn->event & DMA_EVENT_TIMEOUT)) {