Skip to content

Commit

Permalink
s32k1xx: backport s32k3xx serial driver changes to s32k1xx
Browse files Browse the repository at this point in the history
  • Loading branch information
PetervdPerk-NXP committed Dec 22, 2023
1 parent bfbfeab commit 113434d
Show file tree
Hide file tree
Showing 3 changed files with 364 additions and 146 deletions.
18 changes: 18 additions & 0 deletions arch/arm/src/s32k1xx/s32k1xx_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,24 @@ unsigned int s32k1xx_dmach_getcount(DMACH_HANDLE *handle)
return remaining;
}

/****************************************************************************
* Name: s32k3xx_dmach_idle
*
* Description:
* This function checks if the dma is idle
*
* Returned Value:
* 0 - if idle
* !0 - not
*
****************************************************************************/

unsigned int s32k1xx_dmach_idle(DMACH_HANDLE handle)
{
struct s32k1xx_dmach_s *dmach = (struct s32k1xx_dmach_s *)handle;
return dmach->state == S32K1XX_DMA_IDLE ? 0 : -1;
}

/****************************************************************************
* Name: s32k1xx_dmasample
*
Expand Down
15 changes: 15 additions & 0 deletions arch/arm/src/s32k1xx/s32k1xx_edma.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,21 @@ void s32k1xx_dmach_stop(DMACH_HANDLE handle);

unsigned int s32k1xx_dmach_getcount(DMACH_HANDLE *handle);


/****************************************************************************
* Name: s32k3xx_dmach_idle
*
* Description:
* This function checks if the dma is idle
*
* Returned Value:
* 0 - if idle
* !0 - not
*
****************************************************************************/

unsigned int s32k1xx_dmach_idle(DMACH_HANDLE handle);

/****************************************************************************
* Name: s32k1xx_dmasample
*
Expand Down

0 comments on commit 113434d

Please sign in to comment.