Developing the UART DMA driver
Create a copy of your previous project in your IDE. Rename this copied project UART_DMA
. Next, create a new file named uart_dma.c
in the Src
folder and another file named uart_dma.h
in the Inc
folder. Update your uart_dma.c
file, as shown here:
#include "uart_dma.h" #define UART2EN (1U<<17) #define GPIOAEN (1U<<0) #define CR1_TE (1U<<3) #define CR1_RE (1U<<2) #define CR1_UE (1U<<13) #define SR_TXE (1U<<7) #define CR3_DMAT (1U<<7) #define...