NANO103 BSP V3.01.004
The Board Support Package for Nano103 Series
Macros | Functions
Collaboration diagram for PDMA Exported Functions:

Macros

#define PDMA_GET_INT_STATUS()
 Get PDMA Interrupt Status. More...
 
#define PDMA_GET_CH_INT_STS(u32Ch)
 Get PDMA Channel Interrupt Status. More...
 
#define PDMA_CLR_CH_INT_FLAG(u32Ch, u32Mask)
 Clear PDMA Channel Interrupt Flag. More...
 
#define PDMA_IS_CH_BUSY(u32Ch)
 Check Channel Status. More...
 
#define PDMA_SET_SRC_ADDR(u32Ch, u32Addr)
 Set Source Address. More...
 
#define PDMA_SET_DST_ADDR(u32Ch, u32Addr)
 Set Destination Address. More...
 
#define PDMA_SET_TRANS_CNT(u32Ch, u32Count)
 Set Transfer Count. More...
 
#define PDMA_SET_PERIODIC_CNT(u32Ch, u32Count)
 Set Periodic Count. More...
 
#define PDMA_STOP(u32Ch)
 Stop the channel. More...
 

Functions

void PDMA_Open (uint32_t u32Mask)
 PDMA Open. More...
 
void PDMA_Close (void)
 PDMA Close. More...
 
void PDMA_SetTransferCnt (uint32_t u32Ch, uint32_t u32Width, uint32_t u32TransCount)
 Set PDMA Transfer Count. More...
 
void PDMA_SetTransferAddr (uint32_t u32Ch, uint32_t u32SrcAddr, uint32_t u32SrcCtrl, uint32_t u32DstAddr, uint32_t u32DstCtrl)
 Set PDMA Transfer Address. More...
 
void PDMA_SetTransferMode (uint32_t u32Ch, uint32_t u32Peripheral, uint32_t u32ScatterEn, uint32_t u32DescAddr)
 Set PDMA Transfer Mode. More...
 
void PDMA_SetTimeOut (uint32_t u32Ch, uint32_t u32OnOff, uint32_t u32TimeOutCnt)
 Set PDMA Timeout. More...
 
void PDMA_Trigger (uint32_t u32Ch)
 Trigger PDMA. More...
 
void PDMA_EnableInt (uint32_t u32Ch, uint32_t u32Mask)
 Enable Interrupt. More...
 
void PDMA_DisableInt (uint32_t u32Ch, uint32_t u32Mask)
 Disable Interrupt. More...
 

Detailed Description

Macro Definition Documentation

◆ PDMA_CLR_CH_INT_FLAG

#define PDMA_CLR_CH_INT_FLAG (   u32Ch,
  u32Mask 
)

Clear PDMA Channel Interrupt Flag.

Parameters
[in]u32ChSelected DMA channel
[in]u32MaskInterrupt Mask
Returns
None

This macro clear the channel interrupt flag.

Definition at line 126 of file pdma.h.

◆ PDMA_GET_CH_INT_STS

#define PDMA_GET_CH_INT_STS (   u32Ch)

Get PDMA Channel Interrupt Status.

Parameters
[in]u32ChSelected DMA channel
Returns
Interrupt Status

This macro gets the channel interrupt status.

Definition at line 113 of file pdma.h.

◆ PDMA_GET_INT_STATUS

#define PDMA_GET_INT_STATUS ( )

Get PDMA Interrupt Status.

Parameters
[in]None
Returns
None

This macro gets the interrupt status.

Definition at line 101 of file pdma.h.

◆ PDMA_IS_CH_BUSY

#define PDMA_IS_CH_BUSY (   u32Ch)

Check Channel Status.

Parameters
[in]u32ChThe selected channel
Returns
0 = idle
1 = busy

Check the selected channel is busy or not.

Definition at line 139 of file pdma.h.

◆ PDMA_SET_DST_ADDR

#define PDMA_SET_DST_ADDR (   u32Ch,
  u32Addr 
)

Set Destination Address.

Parameters
[in]u32ChThe selected channel
[in]u32AddrThe selected address
Returns
None

This macro set the selected channel destination address.

Definition at line 165 of file pdma.h.

◆ PDMA_SET_PERIODIC_CNT

#define PDMA_SET_PERIODIC_CNT (   u32Ch,
  u32Count 
)

Set Periodic Count.

Parameters
[in]u32ChThe selected channel
[in]u32CountPeriodic FIFO Count
Returns
None

This macro set the selected channel periodic fifo count.

Definition at line 194 of file pdma.h.

◆ PDMA_SET_SRC_ADDR

#define PDMA_SET_SRC_ADDR (   u32Ch,
  u32Addr 
)

Set Source Address.

Parameters
[in]u32ChThe selected channel
[in]u32AddrThe selected address
Returns
None

This macro set the selected channel source address.

Definition at line 152 of file pdma.h.

◆ PDMA_SET_TRANS_CNT

#define PDMA_SET_TRANS_CNT (   u32Ch,
  u32Count 
)

Set Transfer Count.

Parameters
[in]u32ChThe selected channel
[in]u32CountTransfer Count
Returns
None

This macro set the selected channel transfer count.

Definition at line 178 of file pdma.h.

◆ PDMA_STOP

#define PDMA_STOP (   u32Ch)

Stop the channel.

Parameters
[in]u32ChThe selected channel
Returns
None

This macro stop the selected channel.

Definition at line 209 of file pdma.h.

Function Documentation

◆ PDMA_Close()

void PDMA_Close ( void  )

PDMA Close.

Parameters
[in]None
Returns
None

This function disable all PDMA channels.

Definition at line 52 of file pdma.c.

◆ PDMA_DisableInt()

void PDMA_DisableInt ( uint32_t  u32Ch,
uint32_t  u32Mask 
)

Disable Interrupt.

Parameters
[in]u32ChThe selected channel
[in]u32MaskThe Interrupt Type
Returns
None

This function disable the selected channel interrupt.

Definition at line 204 of file pdma.c.

◆ PDMA_EnableInt()

void PDMA_EnableInt ( uint32_t  u32Ch,
uint32_t  u32Mask 
)

Enable Interrupt.

Parameters
[in]u32ChThe selected channel
[in]u32MaskThe Interrupt Type
Returns
None

This function enable the selected channel interrupt.

Definition at line 186 of file pdma.c.

◆ PDMA_Open()

void PDMA_Open ( uint32_t  u32Mask)

PDMA Open.

Parameters
[in]u32MaskChannel enable bits.
Returns
None

This function enable the PDMA channels.

Definition at line 38 of file pdma.c.

◆ PDMA_SetTimeOut()

void PDMA_SetTimeOut ( uint32_t  u32Ch,
uint32_t  u32OnOff,
uint32_t  u32TimeOutCnt 
)

Set PDMA Timeout.

Parameters
[in]u32ChThe selected channel
[in]u32OnOffEnable/disable time out function
[in]u32TimeOutCntTimeout count
Returns
None

This function set the timeout count.

Definition at line 148 of file pdma.c.

◆ PDMA_SetTransferAddr()

void PDMA_SetTransferAddr ( uint32_t  u32Ch,
uint32_t  u32SrcAddr,
uint32_t  u32SrcCtrl,
uint32_t  u32DstAddr,
uint32_t  u32DstCtrl 
)

Set PDMA Transfer Address.

Parameters
[in]u32ChThe selected channel
[in]u32SrcAddrSource address
[in]u32SrcCtrlSource control attribute. PDMA_SAR_INC, PDMA_SAR_FIX, or PDMA_SAR_WRA
[in]u32DstAddrdestination address
[in]u32DstCtrldestination control attribute. PDMA_DAR_INC, PDMA_DAR_FIX, or PDMA_DAR_WRA
Returns
None

This function set the selected channel source/destination address and attribute.

Definition at line 89 of file pdma.c.

◆ PDMA_SetTransferCnt()

void PDMA_SetTransferCnt ( uint32_t  u32Ch,
uint32_t  u32Width,
uint32_t  u32TransCount 
)

Set PDMA Transfer Count.

Parameters
[in]u32ChThe selected channel
[in]u32WidthData width. PDMA_WIDTH_8, PDMA_WIDTH_16, or PDMA_WIDTH_32
[in]u32TransCountTransfer count
Returns
None

This function set the selected channel data width and transfer count.

Definition at line 68 of file pdma.c.

◆ PDMA_SetTransferMode()

void PDMA_SetTransferMode ( uint32_t  u32Ch,
uint32_t  u32Peripheral,
uint32_t  u32ScatterEn,
uint32_t  u32DescAddr 
)

Set PDMA Transfer Mode.

Parameters
[in]u32ChThe selected channel
[in]u32PeripheralThe selected peripheral. PDMA_SPI0_TX, PDMA_SPI1_TX, PDMA_UART0_TX, PDMA_UART1_TX, PDMA_SPI2_TX, PDMA_SPI3_TX, PDMA_TMR0, PDMA_TMR1, PDMA_TMR2, PDMA_TMR3, PDMA_SPI0_RX, PDMA_SPI1_RX, PDMA_UART0_RX, PDMA_UART1_RX, PDMA_SPI2_RX, PDMA_SPI3_RX, PDMA_ADC, PDMA_MEM
[in]u32ScatterEnScatter-gather mode enable
[in]u32DescAddrScatter-gather descriptor address
Returns
None

This function set the selected channel transfer mode. Include peripheral setting.

Definition at line 116 of file pdma.c.

◆ PDMA_Trigger()

void PDMA_Trigger ( uint32_t  u32Ch)

Trigger PDMA.

Parameters
[in]u32ChThe selected channel
Returns
None

This function trigger the selected channel.

Definition at line 168 of file pdma.c.