TMPM4KxA Group Peripheral Driver User Manual  V1.0.4.0
txz_uart_dma.h
Go to the documentation of this file.
1 
14 /*------------------------------------------------------------------------------*/
15 /* Define to prevent recursive inclusion */
16 /*------------------------------------------------------------------------------*/
17 #ifndef __UART_DMA_H
18 #define __UART_DMA_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /*------------------------------------------------------------------------------*/
25 /* Includes */
26 /*------------------------------------------------------------------------------*/
27 #include "txz_driver_def.h"
28 #include "txz_uart.h"
29 #include "txz_dma_ex.h"
30 
40 /*------------------------------------------------------------------------------*/
41 /* Macro Definition */
42 /*------------------------------------------------------------------------------*/
53 #define UART_DMA_TYPE_UNUSE ((uint32_t)0)
54 #define UART_DMA_TYPE_MEM_TO_MEM ((uint32_t)1)
55 #define UART_DMA_TYPE_MEM_TO_PERI ((uint32_t)2)
56 #define UART_DMA_TYPE_PERI_TO_MEM ((uint32_t)3)
57 #define UART_DMA_TYPE_PERI_TO_PERI ((uint32_t)4) /* End of group UART_DMA_TransferType */
61  /* End of group UART_Exported_define */
65 
66 
67 /*------------------------------------------------------------------------------*/
68 /* Enumerated Type Definition */
69 /*------------------------------------------------------------------------------*/
75 /* no define */
76  /* End of group UART_Exported_define */
80 
81 
82 /*------------------------------------------------------------------------------*/
83 /* Structure Definition */
84 /*------------------------------------------------------------------------------*/
90 /*----------------------------------*/
94 /*----------------------------------*/
95 typedef struct
96 {
97  uint32_t type;
99  uint32_t ch;
102 
103 /*----------------------------------*/
107 /*----------------------------------*/
108 typedef struct
109 {
114 
115 /*----------------------------------*/
119 /*----------------------------------*/
120 typedef struct
121 {
126  uint32_t work[8];
127 } uart_dma_t;
128  /* End of group UART_Exported_typedef */
132 
133 
134 /*------------------------------------------------------------------------------*/
135 /* Functions */
136 /*------------------------------------------------------------------------------*/
141 TXZ_Result uart_dma_init(uart_dma_t *p_obj);
142 TXZ_Result uart_dma_deinit(uart_dma_t *p_obj);
143 TXZ_Result uart_dma_discard_transmit(uart_dma_t *p_obj);
144 TXZ_Result uart_dma_discard_receive(uart_dma_t *p_obj);
145 TXZ_Result uart_dma_transmitIt(uart_dma_t *p_obj, uart_transmit_t *p_info);
146 TXZ_Result uart_dma_receiveIt(uart_dma_t *p_obj, uart_receive_t *p_info); /* End of group UART_Exported_functions */
150  /* End of group UART */
154  /* End of group Periph_Driver */
158 
159 #ifdef __cplusplus
160 }
161 #endif /* __cplusplus */
162 #endif /* __UART_DMA_H */
163 
164 
TXZ_Result uart_dma_deinit(uart_dma_t *p_obj)
Release the UART DMA object.
Definition: txz_uart_dma.c:304
uart_dma_setting_t rx
Definition: txz_uart_dma.h:112
uart_t super
Definition: txz_uart_dma.h:122
Transmit data information structure definenition.
Definition: txz_uart.h:632
uint32_t type
Definition: txz_uart_dma.h:97
UART DMA handle structure definenition.
Definition: txz_uart_dma.h:120
DMA setting structure definenition.
Definition: txz_uart_dma.h:95
UART handle structure definenition.
Definition: txz_uart.h:745
TXZ_Result uart_dma_receiveIt(uart_dma_t *p_obj, uart_receive_t *p_info)
Receive data. Non-Blocking Communication.
Definition: txz_uart_dma.c:541
uart_dma_setting_t tx
Definition: txz_uart_dma.h:111
TXZ_Result uart_dma_discard_transmit(uart_dma_t *p_obj)
Discard transmit.
Definition: txz_uart_dma.c:370
TXZ_Result uart_dma_transmitIt(uart_dma_t *p_obj, uart_transmit_t *p_info)
Transmit data. Non-Blocking Communication.
Definition: txz_uart_dma.c:456
Receive event information structure definenition.
Definition: txz_uart.h:596
TXZ_Result uart_dma_discard_receive(uart_dma_t *p_obj)
Discard receive.
Definition: txz_uart_dma.c:413
uart_dma_initial_setting_t init
Definition: txz_uart_dma.h:124
All common macro and definition for TXZ peripheral drivers.
This file provides all the functions prototypes for DMA driver.
DMA handle structure definenition.
Definition: txz_dma.h:296
dma_t * p_obj
Definition: txz_uart_dma.h:110
uint32_t ch
Definition: txz_uart_dma.h:99
TXZ_Result uart_dma_init(uart_dma_t *p_obj)
Initialize the UART DMA object.
Definition: txz_uart_dma.c:225
UART DMA initial setting structure definenition.
Definition: txz_uart_dma.h:108
This file provides all the functions prototypes for UART driver.