imxrt:edma Add idle chack
This commit is contained in:
parent
cc632ea789
commit
a81b36394e
|
@ -1273,6 +1273,24 @@ unsigned int imxrt_dmach_getcount(DMACH_HANDLE handle)
|
|||
return remaining;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imxrt_dmach_idle
|
||||
*
|
||||
* Description:
|
||||
* This function checks if the dma is idle
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 - if idle
|
||||
* !0 - not
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int imxrt_dmach_idle(DMACH_HANDLE handle)
|
||||
{
|
||||
struct imxrt_dmach_s *dmach = (struct imxrt_dmach_s *)handle;
|
||||
return dmach->state == IMXRT_DMA_IDLE ? 0 : -1;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imxrt_dmasample
|
||||
*
|
||||
|
|
|
@ -411,6 +411,20 @@ void imxrt_dmach_stop(DMACH_HANDLE handle);
|
|||
|
||||
unsigned int imxrt_dmach_getcount(DMACH_HANDLE handle);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imxrt_dmach_idle
|
||||
*
|
||||
* Description:
|
||||
* This function checks if the dma is idle
|
||||
*
|
||||
* Returned Value:
|
||||
* 0 - if idle
|
||||
* !0 - not
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int imxrt_dmach_idle(DMACH_HANDLE handle);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: imxrt_dmasample
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue