In an interrupt-driven USART responsibility for reception and transmission of data is split between the application code and interrupt code. The interrupt code is called whenever configured events occur; for example, when the transmit data register is empty or the receive data register is full. The interrupt code is responsible for removing the interrupt condition. In the case of a full receive data register, the interrupt handler removes the interrupt condition by reading the received data. The application code and interrupt handler communicate through a pair of software buffers implemented as queues as
illustrated in Figure 11.4.