/************************************************************************************************** Phyplus Microelectronics Limited confidential and proprietary. All rights reserved. IMPORTANT: All rights of this software belong to Phyplus Microelectronics Limited ("Phyplus"). Your use of this Software is limited to those specific rights granted under the terms of the business contract, the confidential agreement, the non-disclosure agreement and any other forms of agreements as a customer or a partner of Phyplus. You may not use this Software unless you agree to abide by the terms of these agreements. You acknowledge that the Software may not be modified, copied, distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy (BLE) integrated circuit, either as a product or is integrated into your products. Other than for the aforementioned purposes, you may not use, reproduce, copy, prepare derivative works of, modify, distribute, perform, display or sell this Software and/or its documentation for any purposes. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. **************************************************************************************************/ /* Peripheral group ----------------------------------------------------------- */ /** @defgroup GPDMA GPDMA (General Purpose Direct Memory Access) * @ingroup LPC177x_8xCMSIS_FwLib_Drivers * @{ */ #ifndef __DMA_H_ #define __DMA_H_ /* Includes ------------------------------------------------------------------- */ #include "ap_cp.h" #include "common.h" //#include "lpc_types.h" #ifdef __cplusplus extern "C" { #endif /* Public Macros -------------------------------------------------------------- */ /** @defgroup GPDMA_Public_Macros GPDMA Public Macros * @{ */ /** DMA Connection number definitions */ typedef enum{ DMA_CONN_MEM=0,// ((0)) /*memory*/ DMA_CONN_MCI,// ((1UL)) /** SD card */ DMA_CONN_SSP0_Tx,// ((2UL)) /**< SSP0 Tx */ DMA_CONN_SSP0_Rx,// ((3UL)) /**< SSP0 Rx */ DMA_CONN_SSP1_Tx,// ((4UL)) /**< SSP1 Tx */ DMA_CONN_SSP1_Rx,// ((5UL)) /**< SSP1 Rx */ DMA_CONN_SSP2_Tx,// ((6UL)) /**< SSP2 Tx */ DMA_CONN_SSP2_Rx,// ((7UL)) /**< SSP2 Rx */ DMA_CONN_ADC,// ((8UL)) /**< ADC */ DMA_CONN_DAC,// ((9UL)) /**< DAC */ DMA_CONN_UART0_Tx,// ((10UL)) /**< UART0 Tx */ DMA_CONN_UART0_Rx,// ((11UL)) /**< UART0 Rx */ DMA_CONN_UART1_Tx,// ((12UL)) /**< UART1 Tx */ DMA_CONN_UART1_Rx,// ((13UL)) /**< UART1 Rx */ DMA_CONN_UART2_Tx,// ((14UL)) /**< UART2 Tx */ DMA_CONN_UART2_Rx,// ((15UL)) /**< UART2 Rx */ DMA_CONN_MAT0_0,// ((16UL)) /**< MAT0.0 */ DMA_CONN_MAT0_1,// ((17UL)) /**< MAT0.1 */ DMA_CONN_MAT1_0,// ((18UL)) /**< MAT1.0 */ DMA_CONN_MAT1_1,// ((19UL)) /**< MAT1.1 */ DMA_CONN_MAT2_0,// ((20UL)) /**< MAT2.0 */ DMA_CONN_MAT2_1,// ((21UL)) /**< MAT2.1 */ DMA_CONN_I2S_Channel_0,// ((22UL)) /**< I2S channel 0 */ DMA_CONN_I2S_Channel_1,// ((23UL)) /**< I2S channel 1 */ DMA_CONN_UART3_Tx,// ((26UL)) /**< UART3 Tx */ DMA_CONN_UART3_Rx,// ((27UL)) /**< UART3 Rx */ DMA_CONN_UART4_Tx,// ((28UL)) /**< UART3 Tx */ DMA_CONN_UART4_Rx,// ((29UL)) /**< UART3 Rx */ DMA_CONN_MAT3_0,// ((30UL)) /**< MAT3.0 */ DMA_CONN_MAT3_1// ((31UL)) /**< MAT3.1 */ } dma_conn_t; /** Burst size in Source and Destination definitions */ #define DMA_BSIZE_1 ((0UL)) /**< Burst size = 1 */ #define DMA_BSIZE_4 ((1UL)) /**< Burst size = 4 */ #define DMA_BSIZE_8 ((2UL)) /**< Burst size = 8 */ #define DMA_BSIZE_16 ((3UL)) /**< Burst size = 16 */ #define DMA_BSIZE_32 ((4UL)) /**< Burst size = 32 */ #define DMA_BSIZE_64 ((5UL)) /**< Burst size = 64 */ #define DMA_BSIZE_128 ((6UL)) /**< Burst size = 128 */ #define DMA_BSIZE_256 ((7UL)) /**< Burst size = 256 */ /** Width in Source transfer width and Destination transfer width definitions */ #define DMA_WIDTH_BYTE ((0UL)) /**< Width = 1 byte */ #define DMA_WIDTH_HALFWORD ((1UL)) /**< Width = 2 bytes */ #define DMA_WIDTH_WORD ((2UL)) /**< Width = 4 bytes */ /** DMA Request Select Mode definitions */ #define DMA_REQSEL_UART ((0UL)) /**< UART TX/RX is selected */ #define DMA_REQSEL_TIMER ((1UL)) /**< Timer match is selected */ /** * @} */ /* Private Macros ------------------------------------------------------------- */ /** @defgroup GPDMA_Private_Macros GPDMA Private Macros * @{ */ /* --------------------- BIT DEFINITIONS -------------------------------------- */ /*********************************************************************//** * Macro defines for DMA Interrupt Status register **********************************************************************/ #define DMA_DMACIntStat_Ch(n) (((1UL<