/********************************************************************** * $Id$ lpc43xx_gpdma.h 2011-06-02 *//** * @file lpc43xx_gpdma.h * @brief Contains all macro definitions and function prototypes * support for GPDMA firmware library on lpc43xx * @version 1.0 * @date 02. June. 2011 * @author NXP MCU SW Application Team * * Copyright(C) 2011, NXP Semiconductor * All rights reserved. * *********************************************************************** * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * products. This software is supplied "AS IS" without any warranties. * NXP Semiconductors assumes no responsibility or liability for the * use of the software, conveys no license or title under any patent, * copyright, or mask work right to the product. NXP Semiconductors * reserves the right to make changes in the software without * notification. NXP Semiconductors also make no representation or * warranty that such application will be suitable for the specified * use without further testing or modification. * Permission to use, copy, modify, and distribute this software and its * documentation is hereby granted, under NXP Semiconductors� * relevant copyright in the software, without fee, provided that it * is used in conjunction with NXP Semiconductors microcontrollers. This * copyright, permission, and disclaimer notice must appear in all copies of * this code. **********************************************************************/ /* Peripheral group ----------------------------------------------------------- */ /** @defgroup GPDMA GPDMA (General Purpose DMA) * @ingroup LPC4300CMSIS_FwLib_Drivers * @{ */ #ifndef lpc43xx_GPDMA_H_ #define lpc43xx_GPDMA_H_ /* Includes ------------------------------------------------------------------- */ #include "LPC43xx.h" #include "lpc_types.h" #ifdef __cplusplus extern "C" { #endif /* Public Macros -------------------------------------------------------------- */ /** @defgroup GPDMA_Public_Macros GPDMA Public Macros * @{ */ /** DMA Connection number definitions */ #define GPDMA_CONN_RESERVED ((0UL)) #define GPDMA_CONN_MAT0_0 ((1UL)) /**< MAT0.0 */ #define GPDMA_CONN_UART0_Tx ((2UL)) /**< UART0 Tx */ #define GPDMA_CONN_MAT0_1 ((3UL)) /**< MAT0.1 */ #define GPDMA_CONN_UART0_Rx ((4UL)) /**< UART0 Rx */ #define GPDMA_CONN_MAT1_0 ((5UL)) /**< MAT1.0 */ #define GPDMA_CONN_UART1_Tx ((6UL)) /**< UART1 Tx */ #define GPDMA_CONN_MAT1_1 ((7UL)) /**< MAT1.1 */ #define GPDMA_CONN_UART1_Rx ((8UL)) /**< UART1 Rx */ #define GPDMA_CONN_MAT2_0 ((9UL)) /**< MAT2.0 */ #define GPDMA_CONN_UART2_Tx ((10UL)) /**< UART2 Tx */ #define GPDMA_CONN_MAT2_1 ((11UL)) /**< MAT2.1 */ #define GPDMA_CONN_UART2_Rx ((12UL)) /**< UART2 Rx */ #define GPDMA_CONN_MAT3_0 ((13UL)) /**< MAT3.0 */ #define GPDMA_CONN_UART3_Tx ((14UL)) /**< UART3 Tx */ #define GPDMA_CONN_SCT_0 ((15UL)) /**< SCT timer channel 0*/ #define GPDMA_CONN_MAT3_1 ((16UL)) /**< MAT3.1 */ #define GPDMA_CONN_UART3_Rx ((17UL)) /**< UART3 Rx */ #define GPDMA_CONN_SCT_1 ((18UL)) /**< SCT timer channel 1*/ #define GPDMA_CONN_SSP0_Rx ((19UL)) /**< SSP0 Rx */ #define GPDMA_CONN_I2S_Channel_0 ((20UL)) /**< I2S channel 0 */ #define GPDMA_CONN_SSP0_Tx ((21UL)) /**< SSP0 Tx */ #define GPDMA_CONN_I2S_Channel_1 ((22UL)) /**< I2S channel 1 */ #define GPDMA_CONN_SSP1_Rx ((23UL)) /**< SSP1 Rx */ #define GPDMA_CONN_SSP1_Tx ((24UL)) /**< SSP1 Tx */ #define GPDMA_CONN_ADC_0 ((25UL)) /**< ADC 0 */ #define GPDMA_CONN_ADC_1 ((26UL)) /**< ADC 1 */ #define GPDMA_CONN_DAC ((27UL)) /**< DAC */ /** GPDMA Transfer type definitions */ #define GPDMA_TRANSFERTYPE_M2M_CONTROLLER_DMA ((0UL)) /**< Memory to memory - DMA control */ #define GPDMA_TRANSFERTYPE_M2P_CONTROLLER_DMA ((1UL)) /**< Memory to peripheral - DMA control */ #define GPDMA_TRANSFERTYPE_P2M_CONTROLLER_DMA ((2UL)) /**< Peripheral to memory - DMA control */ #define GPDMA_TRANSFERTYPE_P2P_CONTROLLER_DMA ((3UL)) /**< Source peripheral to destination peripheral - DMA control */ #define GPDMA_TRANSFERTYPE_P2P_CONTROLLER_DestPERIPHERAL ((4UL)) /**< Source peripheral to destination peripheral - destination peripheral control */ #define GPDMA_TRANSFERTYPE_M2P_CONTROLLER_PERIPHERAL ((5UL)) /**< Memory to peripheral - peripheral control */ #define GPDMA_TRANSFERTYPE_P2M_CONTROLLER_PERIPHERAL ((6UL)) /**< Peripheral to memory - peripheral control */ #define GPDMA_TRANSFERTYPE_P2P_CONTROLLER_SrcPERIPHERAL ((7UL)) /**< Source peripheral to destination peripheral - source peripheral control */ /** Burst size in Source and Destination definitions */ #define GPDMA_BSIZE_1 ((0UL)) /**< Burst size = 1 */ #define GPDMA_BSIZE_4 ((1UL)) /**< Burst size = 4 */ #define GPDMA_BSIZE_8 ((2UL)) /**< Burst size = 8 */ #define GPDMA_BSIZE_16 ((3UL)) /**< Burst size = 16 */ #define GPDMA_BSIZE_32 ((4UL)) /**< Burst size = 32 */ #define GPDMA_BSIZE_64 ((5UL)) /**< Burst size = 64 */ #define GPDMA_BSIZE_128 ((6UL)) /**< Burst size = 128 */ #define GPDMA_BSIZE_256 ((7UL)) /**< Burst size = 256 */ /** Width in Source transfer width and Destination transfer width definitions */ #define GPDMA_WIDTH_BYTE ((0UL)) /**< Width = 1 byte */ #define GPDMA_WIDTH_HALFWORD ((1UL)) /**< Width = 2 bytes */ #define GPDMA_WIDTH_WORD ((2UL)) /**< Width = 4 bytes */ /** LPC_GPDMA base addresses */ #define LPC_GPDMACH0_BASE 0x40002100 #define LPC_GPDMACH1_BASE 0x40002120 #define LPC_GPDMACH2_BASE 0x40002140 #define LPC_GPDMACH3_BASE 0x40002160 #define LPC_GPDMACH4_BASE 0x40002180 #define LPC_GPDMACH5_BASE 0x400021A0 #define LPC_GPDMACH6_BASE 0x400021C0 #define LPC_GPDMACH7_BASE 0x400021E0 /* LPC_GPDMA channels definitions */ #define LPC_GPDMACH0 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE ) #define LPC_GPDMACH1 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE ) #define LPC_GPDMACH2 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH2_BASE ) #define LPC_GPDMACH3 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH3_BASE ) #define LPC_GPDMACH4 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH4_BASE ) #define LPC_GPDMACH5 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH5_BASE ) #define LPC_GPDMACH6 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH6_BASE ) #define LPC_GPDMACH7 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH7_BASE ) /** * @} */ /* Private Macros ------------------------------------------------------------- */ /** @defgroup GPDMA_Private_Macros GPDMA Private Macros * @{ */ /* --------------------- BIT DEFINITIONS -------------------------------------- */ /*********************************************************************//** * Macro defines for DMA Interrupt Status register **********************************************************************/ #define GPDMA_DMACIntStat_Ch(n) (((1UL<