Example of UART-DMA transfers taken form the npx cmsis driver libary

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

GPDMA Public Functions

GPDMA Public Functions
[GPDMA]

Functions

void GPDMA_Init (void)
 Initialize GPDMA controller.
Status GPDMA_Setup (GPDMA_Channel_CFG_Type *GPDMAChannelConfig)
 Setup GPDMA channel peripheral according to the specified parameters in the GPDMAChannelConfig.
void GPDMA_ChannelCmd (uint8_t channelNum, FunctionalState NewState)
 Enable/Disable DMA channel.
IntStatus GPDMA_IntGetStatus (GPDMA_Status_Type type, uint8_t channel)
 Check if corresponding channel does have an active interrupt request or not.
void GPDMA_ClearIntPending (GPDMA_StateClear_Type type, uint8_t channel)
 Clear one or more interrupt requests on DMA channels.

Function Documentation

void GPDMA_ChannelCmd ( uint8_t  channelNum,
FunctionalState  NewState 
)

Enable/Disable DMA channel.

Parameters:
[in]channelNumGPDMA channel, should be in range from 0 to 7
[in]NewStateNew State of this command, should be:

  • ENABLE.
  • DISABLE.
Returns:
None

Definition at line 357 of file lpc17xx_gpdma.c.

void GPDMA_ClearIntPending ( GPDMA_StateClear_Type  type,
uint8_t  channel 
)

Clear one or more interrupt requests on DMA channels.

Parameters:
[in]typetype of interrupt request, should be:

  • GPDMA_STATCLR_INTTC: GPDMA Interrupt Terminal Count Request Clear
  • GPDMA_STATCLR_INTERR: GPDMA Interrupt Error Clear
[in]channelGPDMA channel, should be in range from 0 to 7
Returns:
None

Definition at line 428 of file lpc17xx_gpdma.c.

void GPDMA_Init ( void   )

Initialize GPDMA controller.

Parameters:
None
Returns:
None

Definition at line 193 of file lpc17xx_gpdma.c.

IntStatus GPDMA_IntGetStatus ( GPDMA_Status_Type  type,
uint8_t  channel 
)

Check if corresponding channel does have an active interrupt request or not.

Parameters:
[in]typetype of status, should be:

  • GPDMA_STAT_INT: GPDMA Interrupt Status
  • GPDMA_STAT_INTTC: GPDMA Interrupt Terminal Count Request Status
  • GPDMA_STAT_INTERR: GPDMA Interrupt Error Status
  • GPDMA_STAT_RAWINTTC: GPDMA Raw Interrupt Terminal Count Status
  • GPDMA_STAT_RAWINTERR: GPDMA Raw Error Interrupt Status
  • GPDMA_STAT_ENABLED_CH:GPDMA Enabled Channel Status
[in]channelGPDMA channel, should be in range from 0 to 7
Returns:
IntStatus status of DMA channel interrupt after masking Should be:
  • SET: the corresponding channel has no active interrupt request
  • RESET: the corresponding channel does have an active interrupt request

Definition at line 386 of file lpc17xx_gpdma.c.

Status GPDMA_Setup ( GPDMA_Channel_CFG_Type GPDMAChannelConfig )

Setup GPDMA channel peripheral according to the specified parameters in the GPDMAChannelConfig.

Parameters:
[in]GPDMAChannelConfigPointer to a GPDMA_CH_CFG_Type structure that contains the configuration information for the specified GPDMA channel peripheral.
Returns:
ERROR if selected channel is enabled before or SUCCESS if channel is configured successfully

Definition at line 222 of file lpc17xx_gpdma.c.