A31L12x F/W Packages  1.4.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31L12x_hal_dmacn.h
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 #ifndef _DMACn_H_
36 #define _DMACn_H_
37 
38 #include "A31L12x.h"
39 #include "A31L12x_hal_aa_types.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 //******************************************************************************
46 // Constant
47 //******************************************************************************
48 
49 // Transfer Direction Control
50 #define DIR_MemToPeri DMACn_CR_DIR_MemToPeri
51 #define DIR_PeriToMem DMACn_CR_DIR_PeriToMem
52 
53 // Transfer Size Selection Control
54 #define SIZE_8bit DMACn_CR_SIZE_8bit
55 #define SIZE_16bit DMACn_CR_SIZE_16bit
56 #define SIZE_32bit DMACn_CR_SIZE_32bit
57 
58 // Error Flag Stop Control
59 #define ERFGSTP_Disable DMACn_CR_ERFGSTP_Disable
60 #define ERFGSTP_Enable DMACn_CR_ERFGSTP_Enable
61 
62 // Peripheral Selection Control
63 #define PERSEL_Idle DMACn_CR_PERSEL_Idle
64 #define PERSEL_ADC DMACn_CR_PERSEL_ADC
65 #define PERSEL_SPI0Rx DMACn_CR_PERSEL_SPI0Rx
66 #define PERSEL_SPI0Tx DMACn_CR_PERSEL_SPI0Tx
67 #define PERSEL_SPI1Rx DMACn_CR_PERSEL_SPI1Rx
68 #define PERSEL_SPI1Tx DMACn_CR_PERSEL_SPI1Tx
69 #define PERSEL_USART10Rx DMACn_CR_PERSEL_USART10Rx
70 #define PERSEL_USART10Tx DMACn_CR_PERSEL_USART10Tx
71 #define PERSEL_I2C0Rx DMACn_CR_PERSEL_I2C0Rx
72 #define PERSEL_I2C0Tx DMACn_CR_PERSEL_I2C0Tx
73 #define PERSEL_I2C1Rx DMACn_CR_PERSEL_I2C1Rx
74 #define PERSEL_I2C1Tx DMACn_CR_PERSEL_I2C1Tx
75 #define PERSEL_UART0Rx DMACn_CR_PERSEL_UART0Rx
76 #define PERSEL_UART0Tx DMACn_CR_PERSEL_UART0Tx
77 #define PERSEL_UART1Rx DMACn_CR_PERSEL_UART1Rx
78 #define PERSEL_UART1Tx DMACn_CR_PERSEL_UART1Tx
79 #define PERSEL_LPUARTRx DMACn_CR_PERSEL_LPUARTRx
80 #define PERSEL_LPUARTTx DMACn_CR_PERSEL_LPUARTTx
81 #define PERSEL_SC0Rx DMACn_CR_PERSEL_SC0Rx
82 #define PERSEL_SC0Tx DMACn_CR_PERSEL_SC0Tx
83 #define PERSEL_SC1Rx DMACn_CR_PERSEL_SC1Rx
84 #define PERSEL_SC1Tx DMACn_CR_PERSEL_SC1Tx
85 
86 // Peripheral Address
87 #define PAR_ADC 0x300C
88 #define PAR_SPI0_Rx 0x5808
89 #define PAR_SPI0_Tx 0x580c
90 #define PAR_SPI1_Rx 0x5888
91 #define PAR_SPI1_Tx 0x588c
92 #define PAR_USART10_Rx 0x3814
93 #define PAR_USART10_Tx 0x3818
94 #define PAR_I2C0_Rx 0x4810
95 #define PAR_I2C0_Tx 0x4810
96 #define PAR_I2C1_Rx 0x4910
97 #define PAR_I2C1_Tx 0x4910
98 #define PAR_UART0_Rx 0x4000
99 #define PAR_UART0_Tx 0x4000
100 #define PAR_UART1_Rx 0x4100
101 #define PAR_UART1_Tx 0x4100
102 #define PAR_LPUART_Rx 0x5C18
103 #define PAR_LPUART_Tx 0x5C1C
104 #define PAR_SC0_Rx 0x5318
105 #define PAR_SC0_Tx 0x531C
106 #define PAR_SC1_Rx 0x5398
107 #define PAR_SC1_Tx 0x539c
108 
109 //******************************************************************************
110 // Function
111 //******************************************************************************
112 
113 HAL_Status_Type HAL_DMAC_Init( DMACn_Type* DMACx, uint8_t PERSEL, uint8_t DIR, uint8_t SIZE, uint8_t ERFGSTP );
114 HAL_Status_Type HAL_DMAC_DeInit( DMACn_Type* DMACx );
115 
116 HAL_Status_Type HAL_DMAC_Setup( DMACn_Type* DMACx, uint32_t MAR, uint16_t TRANSCNT );
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* _DMACn_H_ */
123 
HAL_Status_Type HAL_DMAC_Setup(DMACn_Type *DMACx, uint32_t MAR, uint16_t TRANSCNT)
Enable the transfer.
Contains the ABOV typedefs for C standard types. It is intended to be used in ISO C conforming develo...
HAL_Status_Type HAL_DMAC_Init(DMACn_Type *DMACx, uint8_t PERSEL, uint8_t DIR, uint8_t SIZE, uint8_t ERFGSTP)
Init the DMAC configuration with the specified values.
HAL_Status_Type
HAL_Status_Type HAL_DMAC_DeInit(DMACn_Type *DMACx)
DeInitialize DMAC peripheral.