USART Dynamic Driver Details for Harmony v2

USART Dynamic Driver Source Files

The following Universal Synchronous/Asynchronous Receiver/Transmitter (USART) driver source files are downloaded along with the rest of MPLAB® Harmony Framework. When you use MPLAB Harmony Configurator (MHC) to add a dynamic driver to your project, MHC will automatically add the appropriate source files to your project (see table below). Having different source files for specific data transfer models helps to minimize the overall application code size.

dynamic_files.png
USART Data Transfer Model Source Files
Byte-by-Byte drv_usart.c
drv_usart_byte_model.c
File I/O Read/Write drv_usart.c
drv_usart_read_write.c
File I/O Read/Write with Buffer Queue drv_usart.c
drv_usart_read_write.c
drv_usart_buffer_queue.c
Buffer Queue drv_usart.c
drv_usart_buffer_queue.c
Buffer Queue with DMA drv_usart_dma.c
drv_usart_buffer_queue_dma.c

You will use MHC to specify the data transfer model, as shown here.

usart_data_model.png
Click image to enlarge.

USART Dynamic Driver Generation Details

After using MHC to configure the USART dynamic drivers, you will generate the code that configures the drivers by clicking the MHC Generate button. These files will be modified.

generate1.png
dynamic_files_mhc.png
Click image to enlarge.

1

system_config.h is modified by MHC to configure the USART dynamic drivers.

mhc_driver_1.png
system_config.h.png

2

system_definitions.h is modified by MHC to add the USART dynamic driver handles to the SYSTEM_OBJECTS structure.

system_definitions.h.png

3

system_tasks.c is modified by MHC to maintain the USART dynamic drivers.

system_tasks.c.png

4

system_init.c is modified by MHC to create and initialize the USART dynamic drivers.

mhc_driver_3.png
system_init.c.png
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.