USART Driver Library Interface for Harmony v2
Detailed descriptions for this library can be found in the MPLAB® Harmony Documentation.
System Functions
Function Name | Description |
---|---|
DRV_USART_Initialize | Initializes the USART instance for the specified driver index. Implementation: static/dynamic. |
DRV_USART_Deinitialize | Deinitializes the specified instance of the USART driver module. Implementation: static/dynamic. |
DRV_USART_Status | Gets the current status of the USART driver module. Implementation: dynamic. |
DRV_USART_TasksReceive | Maintains the driver's receive state machine and implements its Interrupt Service Routine (ISR). Implementation: dynamic. |
DRV_USART_TasksTransmit | Maintains the driver's transmit state machine and implements its ISR. Implementation: dynamic. |
DRV_USART_TasksError | Maintains the driver's error state machine and implements its ISR. Implementation: dynamic. |
Core Client Functions
Function Name | Description |
---|---|
DRV_USART_Open | Opens the specified USART driver instance and returns a handle to it. Implementation: dynamic. |
DRV_USART_Close | Closes an opened-instance of the USART driver. Implementation: dynamic. |
DRV_USART_ClientStatus | Gets the current client-specific status the USART driver. Implementation: dynamic. |
DRV_USART_ErrorGet | This function returns the error (if any) associated with the last client request. Implementation: dynamic. |
Communication Management Client Functions
Function Name | Description |
---|---|
DRV_USART_BaudSet | This function changes the USART module baud to the specified value. Implementation: dynamic. |
DRV_USART_LineControlSet | This function changes the USART module line control to the specified value. Implementation: dynamic. |
Buffer Queue Read/Write Client Functions
Function Name | Description |
---|---|
DRV_USART_BufferAddRead | Schedules a non-blocking driver read operation. Implementation: dynamic. |
DRV_USART_BufferAddWrite | Schedules a non-blocking driver write operation. Implementation: dynamic. |
DRV_USART_BufferEventHandlerSet | Allows a client to identify a buffer event handling function for the driver to call back when queued buffer transfers have finished. Implementation: dynamic. |
DRV_USART_BufferProcessedSizeGet | This function returns the number of bytes that have been processed for the specified buffer. Implementation: dynamic. |
File I/O Type Read/Write Functions
Function Name | Description |
---|---|
DRV_USART_Read | Reads data from the USART. Implementation: dynamic. |
DRV_USART_Write | Writes data to the USART. Implementation: dynamic. |
Byte Transfer Functions
Function Name | Description |
---|---|
DRV_USART_ReadByte | Reads a byte of data from the USART. Implementation: static/dynamic. |
DRV_USART_WriteByte | Writes a byte of data to the USART. Implementation: static/dynamic. |
DRV_USART_TransmitBufferSizeGet | Returns the size of the transmit buffer. Implementation: dynamic. |
DRV_USART_ReceiverBufferSizeGet | Returns the size of the receive buffer. Implementation: dynamic. |
DRV_USART_TransferStatus | Returns the transmitter and receiver transfer status. Implementation: dynamic. |
DRV_USART_TransmitBufferIsFull | Provides the status of the driver's transmit buffer. Implementation: dynamic. |
DRV_USART_ReceiverBufferIsEmpty | Provides the status of the driver's receive buffer. Implementation: static/dynamic. |
Data Types and Constants
Name | Description |
---|---|
DRV_USART_CLIENT_STATUS | Defines the client-specific status of the USART driver. |
DRV_USART_INIT | Defines the data required to initialize or reinitialize the USART driver. |
DRV_USART_INIT_FLAGS | Flags identifying features that can be enabled when the driver is initialized. |
DRV_USART_TRANSFER_STATUS | Specifies the status of the receive or transmit. |
DRV_USART_INDEX_0 | USART driver index definitions. |
DRV_USART_INDEX_1 | This is macro DRV_USART_INDEX_1. |
DRV_USART_INDEX_2 | This is macro DRV_USART_INDEX_2. |
DRV_USART_INDEX_3 | This is macro DRV_USART_INDEX_3. |
DRV_USART_INDEX_4 | This is macro DRV_USART_INDEX_4. |
DRV_USART_INDEX_5 | This is macro DRV_USART_INDEX_5. |
DRV_USART_BAUD_SET_RESULT | Identifies the handshaking modes supported by the USART driver. |
DRV_USART_BUFFER_EVENT | Identifies the possible events that can result from a buffer add request. |
DRV_USART_BUFFER_EVENT_HANDLER | Points to a USART driver Buffer Event handler function. |
DRV_USART_BUFFER_HANDLE | Handles identifying a read or write buffer passed to the driver. |
DRV_USART_ERROR | Defines the possible errors that can occur during driver operation. |
DRV_USART_LINE_CONTROL_SET_RESULT | Identifies the results of the baud set function. |
DRV_USART_OPERATION_MODE_DATA | Defines the initialization data required for different operation modes of USART. |
DRV_USART_BUFFER_HANDLE_INVALID | Definition of an invalid buffer handle. |
DRV_USART_COUNT | Number of valid USART drivers. |
DRV_USART_READ_ERROR | USART driver Read Error. |
DRV_USART_WRITE_ERROR | USART driver Write Error. |
DRV_USART_LINE_CONTROL | Identifies the line control modes supported by the USART driver. |
DRV_USART_OPERATION_MODE | Identifies the modes of the operation of the USART module. |