1.14. lpc17xx_gpdma
Module¶
General purpose DMA client library functions. Find implementation details in CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation.
-
robovero.lpc17xx_gpdma.
GPDMA_ChannelCmd
(channelNum, NewState)¶ Enable/Disable DMA channel.
Args:
- channelNum: GPDMA channel, should be in range from 0 to 7
- NewState: New State of this command, should be:
- ENABLE
- DISABLE
-
class
robovero.lpc17xx_gpdma.
GPDMA_Channel_CFG_Type
(**kwargs)¶ Bases:
robovero.internals.cstruct
GPDMA Channel configuration structure type definition.
- ChannelNum: DMA channel number, should be in range from 0 to 7. DMA channel 0
has the highest priority and DMA channel 7 the lowest priority.
TransferSize: Length/Size of transfer
- TransferWidth: Transfer width - used for TransferType is
GPDMA_TRANSFERTYPE_M2M only
- SrcMemAddr: Physical Source Address, used in case TransferType is chosen as
GPDMA_TRANSFERTYPE_M2M or GPDMA_TRANSFERTYPE_M2P
- DstMemAddr: Physical Destination Address, used in case TransferType is chosen
as GPDMA_TRANSFERTYPE_M2M or GPDMA_TRANSFERTYPE_P2M
TransferType: Transfer Type, should be one of the following:
- GPDMA_TRANSFERTYPE_M2M: Memory to memory - DMA control
- GPDMA_TRANSFERTYPE_M2P: Memory to peripheral - DMA control
- GPDMA_TRANSFERTYPE_P2M: Peripheral to memory - DMA control
- GPDMA_TRANSFERTYPE_P2P: Source peripheral to destination
- peripheral - DMA control
- SrcConn: Peripheral Source Connection type, used in case TransferType is
chosen as GPDMA_TRANSFERTYPE_P2M or GPDMA_TRANSFERTYPE_P2P, should be one of:
- GPDMA_CONN_SSP0_Tx: SSP0, Tx
- GPDMA_CONN_SSP0_Rx: SSP0, Rx
- GPDMA_CONN_SSP1_Tx: SSP1, Tx
- GPDMA_CONN_SSP1_Rx: SSP1, Rx
- GPDMA_CONN_ADC: ADC
- GPDMA_CONN_I2S_Channel_0: I2S Channel 0
- GPDMA_CONN_I2S_Channel_1: I2S Channel 1
- GPDMA_CONN_DAC: DAC
- GPDMA_CONN_UART0_Tx_MAT0_0: UART0 Tx / MAT0.0
- GPDMA_CONN_UART0_Rx_MAT0_1: UART0 Rx / MAT0.1
- GPDMA_CONN_UART1_Tx_MAT1_0: UART1 Tx / MAT1.0
- GPDMA_CONN_UART1_Rx_MAT1_1: UART1 Rx / MAT1.1
- GPDMA_CONN_UART2_Tx_MAT2_0: UART2 Tx / MAT2.0
- GPDMA_CONN_UART2_Rx_MAT2_1: UART2 Rx / MAT2.1
- GPDMA_CONN_UART3_Tx_MAT3_0: UART3 Tx / MAT3.0
- GPDMA_CONN_UART3_Rx_MAT3_1: UART3 Rx / MAT3.1
- DstConn: Peripheral Destination Connection type, used in case TransferType is
chosen as GPDMA_TRANSFERTYPE_M2P or GPDMA_TRANSFERTYPE_P2P, should be one of:
- GPDMA_CONN_SSP0_Tx: SSP0, Tx
- GPDMA_CONN_SSP0_Rx: SSP0, Rx
- GPDMA_CONN_SSP1_Tx: SSP1, Tx
- GPDMA_CONN_SSP1_Rx: SSP1, Rx
- GPDMA_CONN_ADC: ADC
- GPDMA_CONN_I2S_Channel_0: I2S Channel 0
- GPDMA_CONN_I2S_Channel_1: I2S Channel 1
- GPDMA_CONN_DAC: DAC
- GPDMA_CONN_UART0_Tx_MAT0_0: UART0 Tx / MAT0.0
- GPDMA_CONN_UART0_Rx_MAT0_1: UART0 Rx / MAT0.1
- GPDMA_CONN_UART1_Tx_MAT1_0: UART1 Tx / MAT1.0
- GPDMA_CONN_UART1_Rx_MAT1_1: UART1 Rx / MAT1.1
- GPDMA_CONN_UART2_Tx_MAT2_0: UART2 Tx / MAT2.0
- GPDMA_CONN_UART2_Rx_MAT2_1: UART2 Rx / MAT2.1
- GPDMA_CONN_UART3_Tx_MAT3_0: UART3 Tx / MAT3.0
- GPDMA_CONN_UART3_Rx_MAT3_1: UART3 Rx / MAT3.1
DMALLI: Linker List Item structure data address if there’s no Linker List, set as ‘0’
ptr: LPC1769 memory address where structure is stored. Use this in place of the C reference operator (&).
-
robovero.lpc17xx_gpdma.
GPDMA_ClearIntPending
(int_type, channel)¶ Clear one or more interrupt requests on DMA channels.
Args:
- int_type: GPDMA_STATCLR_INTTC: GPDMA Interrupt Terminal Count Request Clear
- GPDMA_STATCLR_INTERR: GPDMA Interrupt Error Clear
- channel: GPDMA channel, should be in range from 0 to 7
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxConfig_DestPeripheral
(n)¶ Destination peripheral.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxConfig_SrcPeripheral
(n)¶ Source peripheral.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxConfig_TransferType
(n)¶ This value indicates the type of transfer.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxControl_DBSize
(n)¶ Destination burst size.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxControl_DWidth
(n)¶ Destination transfer width.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxControl_SBSize
(n)¶ Source burst size.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxControl_SWidth
(n)¶ Source transfer width.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACCxControl_TransferSize
(n)¶ Transfer size.
-
robovero.lpc17xx_gpdma.
GPDMA_DMACEnbldChns_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACIntErrClr_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACIntErrStat_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACIntStat_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACIntTCClear_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACIntTCStat_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACRawIntErrStat_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACRawIntTCStat_Ch
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACSoftBReq_Src
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACSoftLBReq_Src
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACSoftLSReq_Src
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACSoftSReq_Src
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMACSync_Src
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_DMAReqSel_Input
(n)¶
-
robovero.lpc17xx_gpdma.
GPDMA_Init
()¶ Initialize GPDMA controller.
-
robovero.lpc17xx_gpdma.
GPDMA_IntGetStatus
(stat_type, channel)¶ Check if corresponding channel does have an active interrupt request or not.
Args:
- stat_type: type 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
- channel: GPDMA channel, should be in range from 0 to 7
Return:
- status of DMA channel interrupt after masking
- SET: the corresponding channel has no active interrupt request
- RESET: the corresponding channel does have an active interrupt request
- stat_type: type of status, should be:
-
class
robovero.lpc17xx_gpdma.
GPDMA_LLI_Type
(**kwargs)¶ Bases:
robovero.internals.cstruct
GPDMA Linker List Item structure type definition.
- SrcAddr: Source Address
- DstAddr: Destination address
- NextLLI: Next LLI address, otherwise set to ‘0’
- Control: GPDMA Control of this LLI
- ptr: LPC1769 memory address where structure is stored. Use this in place of
- the C reference operator (&).
-
robovero.lpc17xx_gpdma.
GPDMA_Setup
(GPDMAChannelConfig)¶ Setup GPDMA channel peripheral according to the specified parameters in the GPDMAChannelConfig.
Args:
- GPDMAChannelConfig: Pointer to a GPDMA_CH_CFG_Type structure that contains the
- configuration information for the specified GPDMA channel peripheral.
Return:
- ERROR if selected channel is enabled before
- SUCCESS if channel is configured successfully
-
class
robovero.lpc17xx_gpdma.
GPDMA_StateClear_Type
¶ GPDMA Interrupt clear status enumeration.
-
GPDMA_STATCLR_INTERR
= 1¶
-
GPDMA_STATCLR_INTTC
= 0¶
-
-
class
robovero.lpc17xx_gpdma.
GPDMA_Status_Type
¶ GPDMA Status enumeration.
-
GPDMA_STAT_ENABLED_CH
= 5¶
-
GPDMA_STAT_INT
= 0¶
-
GPDMA_STAT_INTERR
= 2¶
-
GPDMA_STAT_INTTC
= 1¶
-
GPDMA_STAT_RAWINTERR
= 4¶
-
GPDMA_STAT_RAWINTTC
= 3¶
-
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_BSIZE
(n)¶ Macros check GPDMA burst size type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_CHANNEL
(n)¶ Macros check GPDMA channel.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_CONN
(n)¶ Macros check GPDMA connection type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_REQSEL
(n)¶ Macros check GPDMA request select type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_STAT
(n)¶ Macros check GPDMA status type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_STATCLR
(n)¶ Macros check GPDMA state clear type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_TRANSFERTYPE
(n)¶ Macros check GPDMA transfer type.
-
robovero.lpc17xx_gpdma.
PARAM_GPDMA_WIDTH
(n)¶ Macros check GPDMA width type.