USART Peripheral Library Interface for Harmony v2

Detailed descriptions for this library can be found in the MPLAB® Harmony Documentation.
( found in the <harmony install directory>/doc folder)

General Functions

Function Name Description
PLIB_USART_Disable Disables the specific Universal Synchronous/Asynchronous Receiver/Transmitter (USART) module.
PLIB_USART_Enable Enables the specific USART module.
PLIB_USART_HandshakeModeSelect Sets the data flow configuration.
PLIB_USART_IrDADisable Disables the Infared Device (IrDA) encoder and decoder.
PLIB_USART_IrDAEnable Enables the IrDA encoder and decoder.
PLIB_USART_LineControlModeSelect Sets the data flow configuration.
PLIB_USART_LoopbackDisable Disables Loopback mode.
PLIB_USART_LoopbackEnable Enables Loopback mode.
PLIB_USART_OperationModeSelect Configures the operation mode of the USART module.
PLIB_USART_StopInIdleDisable Disables the Stop in Idle mode (the USART module continues operation when the device is in Idle mode.)
PLIB_USART_StopInIdleEnable Discontinues operation when the device enters Idle mode.
PLIB_USART_WakeOnStartDisable Disables the wake-up on start bit detection feature during Sleep mode.
PLIB_USART_WakeOnStartEnable Enables the wake-up on start bit detection feature during Sleep mode.
PLIB_USART_WakeOnStartIsEnabled Gets the state of the sync break event completion.
PLIB_USART_ErrorsGet Return the status of all errors in the specified USART module.
PLIB_USART_InitializeModeGeneral Enables or disables general features of the USART module.
PLIB_USART_InitializeOperation Configures the Receive and Transmit FIFO interrupt levels and the hardware lines to be used by the module.

Baud Rate Generator Functions

Function Name Description
PLIB_USART_BaudRateAutoDetectEnable Enables baud rate measurement on the next character, which requires reception of the Sync character.
PLIB_USART_BaudRateAutoDetectIsComplete Gets the state of the automatic baud detection.
PLIB_USART_BaudRateGet Gets the baud rate current in use.
PLIB_USART_BaudRateHighDisable Disables the high baud rate selection.
PLIB_USART_BaudRateHighEnable Enables high baud rate selection.
PLIB_USART_BaudRateHighSet Sets the baud rate to the desired value.
PLIB_USART_BaudRateSet Sets the baud rate to the desired value.
PLIB_USART_BaudSetAndEnable Sets the baud rate to the desired value and enables the USART receiver, transmitter and the USART module.

Transmitter Functions

Function Name Description
PLIB_USART_Transmitter9BitsSend Data to be transmitted in the byte mode with the 9th bit.
PLIB_USART_TransmitterBreakSend Transmits the break character.
PLIB_USART_TransmitterBreakSendIsComplete Returns the status of the break transmission.
PLIB_USART_TransmitterBufferIsFull Gets the transmit buffer full status.
PLIB_USART_TransmitterByteSend Data to be transmitted in the Byte mode.
PLIB_USART_TransmitterDisable Disables the specific USART module transmitter.
PLIB_USART_TransmitterEnable Enables the specific USART module transmitter.
PLIB_USART_TransmitterIdleIsLowDisable Disables the Transmit Idle Low state.
PLIB_USART_TransmitterIdleIsLowEnable Enables the Transmit Idle Low state.
PLIB_USART_TransmitterInterruptModeSelect Set the USART transmitter interrupt mode.
PLIB_USART_TransmitterIsEmpty Gets the transmit shift register empty status.
PLIB_USART_TransmitterAddressGet Returns the address of the USART TX register.

Receiver Functions

Function Name Description
PLIB_USART_ReceiverAddressAutoDetectDisable Disables the automatic Address Detect mode.
PLIB_USART_ReceiverAddressAutoDetectEnable Setup the automatic Address Detect mode.
PLIB_USART_ReceiverAddressDetectDisable Enables the Address Detect mode.
PLIB_USART_ReceiverAddressDetectEnable Enables the Address Detect mode.
PLIB_USART_ReceiverAddressIsReceived Checks and return if the data received is an address.
PLIB_USART_ReceiverByteReceive Data to be received in the Byte mode.
PLIB_USART_ReceiverDataIsAvailable Identifies if the receive data is available for the specified USART module.
PLIB_USART_ReceiverDisable Disables the USART receiver.
PLIB_USART_ReceiverEnable Enables the USART receiver.
PLIB_USART_ReceiverFramingErrorHasOccurred Gets the framing error status.
PLIB_USART_ReceiverIdleStateLowDisable Disables receive polarity inversion.
PLIB_USART_ReceiverIdleStateLowEnable Enables receive polarity inversion.
PLIB_USART_ReceiverInterruptModeSelect Sets the USART receiver FIFO level.
PLIB_USART_ReceiverIsIdle Identifies if the receiver is idle.
PLIB_USART_ReceiverOverrunErrorClear Clears a USART Overrun error.
PLIB_USART_ReceiverOverrunHasOccurred Identifies if there was a receiver overrun error.
PLIB_USART_ReceiverParityErrorHasOccurred Gets the parity error status.
PLIB_USART_ReceiverAddressGet Returns the address of the USART Rx register.

Feature Existence Functions

Function Name Description
PLIB_USART_ExistsBaudRate Identifies whether the BaudRate feature exists on the USART module.
PLIB_USART_ExistsBaudRateAutoDetect Identifies whether the BaudRateAutoDetect feature exists on the USART module.
PLIB_USART_ExistsBaudRateHigh Identifies whether the BaudRateHigh feature exists on the USART module.
PLIB_USART_ExistsEnable Identifies whether the EnableControl feature exists on the USART module.
PLIB_USART_ExistsHandshakeMode Identifies whether the HandShakeMode feature exists on the USART module.
PLIB_USART_ExistsIrDA Identifies whether the IrDAControl feature exists on the USART module.
PLIB_USART_ExistsLineControlMode Identifies whether the LineControlMode feature exists on the USART module.
PLIB_USART_ExistsLoopback Identifies whether the Loopback feature exists on the USART module.
PLIB_USART_ExistsOperationMode Identifies whether the OperationMode feature exists on the USART module.
PLIB_USART_ExistsReceiver Identifies whether the Receiver feature exists on the USART module.
PLIB_USART_ExistsReceiverAddressAutoDetect Identifies whether the ReceiverAddressAutoDetect feature exists on the USART module.
PLIB_USART_ExistsReceiverAddressDetect Identifies whether the ReceiverAddressDetect feature exists on the USART module.
PLIB_USART_ExistsReceiverDataAvailableStatus Identifies whether the ReceiverDataAvailable feature exists on the USART module.
PLIB_USART_ExistsReceiverEnable Identifies whether the ReceiverEnableControl feature exists on the USART module.
PLIB_USART_ExistsReceiverFramingErrorStatus Identifies whether the ReceiverFramingError feature exists on the USART module.
PLIB_USART_ExistsReceiverIdleStateLowEnable Identifies whether the ReceiverPolarityInvert feature exists on the USART module.
PLIB_USART_ExistsReceiverIdleStatus Identifies whether the ReceiverIdle feature exists on the USART module.
PLIB_USART_ExistsReceiverInterruptMode Identifies whether the ReceiverInterruptMode feature exists on the USART module.
PLIB_USART_ExistsReceiverOverrunStatus Identifies whether the ReceiverOverrunError feature exists on the USART module.
PLIB_USART_ExistsReceiverParityErrorStatus Identifies whether the ReceiverParityError feature exists on the USART module.
PLIB_USART_ExistsStopInIdle Identifies whether the StopInIdle feature exists on the USART module.
PLIB_USART_ExistsTransmitter Identifies whether the Transmitter feature exists on the USART module.
PLIB_USART_ExistsTransmitter9BitsSend Identifies whether the Transmitter9Bits feature exists on the USART module.
PLIB_USART_ExistsTransmitterBreak Identifies whether the TransmitterBreak feature exists on the USART module.
PLIB_USART_ExistsTransmitterBufferFullStatus Identifies whether the TransmitterBufferFull feature exists on the USART module.
PLIB_USART_ExistsTransmitterEmptyStatus Identifies whether the TransmitterEmpty feature exists on the USART module.
PLIB_USART_ExistsTransmitterEnable Identifies whether the TransmitterEnableControl feature exists on the USART module.
PLIB_USART_ExistsTransmitterIdleIsLow Identifies whether the TransmitterIdleIsLow feature exists on the USART module.
PLIB_USART_ExistsTransmitterInterruptMode Identifies whether the TransmitterInterruptMode feature exists on the USART module.
PLIB_USART_ExistsWakeOnStart Identifies whether the WakeOnStart feature exists on the USART module.

Data Types and Constants

Name Description
USART_HANDSHAKE_MODE Lists the USART handshake modes.
USART_LINECONTROL_MODE Data type defining the different configurations by which the USART data flow can be configured.
USART_MODULE_ID Enumeration: USART_MODULE_ID. This enumeration defines the number of modules that are available on the microcontroller. This is the superset of all of the possible instances that might be available on Microchip microcontrollers. Refer to the datasheet to get the correct number of modules defined for the desired microcontroller.
_USART_MODULE_ID
USART_OPERATION_MODE Data type defining the different configurations by which the USART can be enabled.
USART_RECEIVE_INTR_MODE Data type defining the different Receive FIFO levels by which the USART receive interrupt modes can be configured.
USART_TRANSMIT_INTR_MODE Data type defining the different Transmit FIFO levels by which the USART transmit interrupt modes can be configured.
© 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.