USART Driver API: Tx and Rx assignment
Now let’s attempt data send, and data receive API with blocking and non-blocking mode.
Steps:
1. Download the file attached in the resource section, and the file name is USART_DataTxRxAPIs.c (Figure 1).
![Tx and Rx assignment](https://fastbitlab.com/wp-content/uploads/2021/03/Figure-1-2.png)
2. In the downloaded file, the USART send data, receive data, send data with IT and receive data with IT APIs are implemented partially. There are a couple of TODOs, which you have to resolve.
The implementation of APIs is similar to the way you coded for I2C and SPI.
![USART Driver API: Tx and Rx assignment](https://fastbitlab.com/wp-content/uploads/2021/03/Figure-2-2.png)
3. When you code for these APIs, you can see that they use a couple of USART flags. These flags should be created in the usart_driver.h file similar to I2C and SPI.
![USART Driver API: Tx and Rx assignment](https://fastbitlab.com/wp-content/uploads/2021/03/Figure-3-2.png)
In the following article, let’s see USART Driver API: Send data.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1