USART Driver Library Interface for Harmony v2

System Functions

Function NameDescription
DRV_USART_InitializeInitializes the USART instance for the specified driver index.
Implementation: static/dynamic.
DRV_USART_DeinitializeDeinitializes the specified instance of the USART driver module.
Implementation: static/dynamic.
DRV_USART_StatusGets the current status of the USART driver module.
Implementation: dynamic.
DRV_USART_TasksReceiveMaintains the driver's receive state machine and implements its Interrupt Service Routine (ISR).
Implementation: dynamic.
DRV_USART_TasksTransmitMaintains the driver's transmit state machine and implements its ISR.
Implementation: dynamic.
DRV_USART_TasksErrorMaintains the driver's error state machine and implements its ISR.
Implementation: dynamic.

Core Client Functions

Function NameDescription
DRV_USART_OpenOpens the specified USART driver instance and returns a handle to it.
Implementation: dynamic.
DRV_USART_CloseCloses an opened-instance of the USART driver.
Implementation: dynamic.
DRV_USART_ClientStatusGets the current client-specific status the USART driver.
Implementation: dynamic.
DRV_USART_ErrorGetThis function returns the error (if any) associated with the last client request.
Implementation: dynamic.

Communication Management Client Functions

Function NameDescription
DRV_USART_BaudSetThis function changes the USART module baud to the specified value.
Implementation: dynamic.
DRV_USART_LineControlSetThis function changes the USART module line control to the specified value.
Implementation: dynamic.

Buffer Queue Read/Write Client Functions

Function NameDescription
DRV_USART_BufferAddReadSchedules a non-blocking driver read operation.
Implementation: dynamic.
DRV_USART_BufferAddWriteSchedules a non-blocking driver write operation.
Implementation: dynamic.
DRV_USART_BufferEventHandlerSetAllows 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_BufferProcessedSizeGetThis function returns the number of bytes that have been processed for the specified buffer.
Implementation: dynamic.

File I/O Type Read/Write Functions

Function NameDescription
DRV_USART_ReadReads data from the USART.
Implementation: dynamic.
DRV_USART_WriteWrites data to the USART.
Implementation: dynamic.

Byte Transfer Functions

Function NameDescription
DRV_USART_ReadByteReads a byte of data from the USART.
Implementation: static/dynamic.
DRV_USART_WriteByteWrites a byte of data to the USART.
Implementation: static/dynamic.
DRV_USART_TransmitBufferSizeGetReturns the size of the transmit buffer.
Implementation: dynamic.
DRV_USART_ReceiverBufferSizeGetReturns the size of the receive buffer.
Implementation: dynamic.
DRV_USART_TransferStatusReturns the transmitter and receiver transfer status.
Implementation: dynamic.
DRV_USART_TransmitBufferIsFullProvides the status of the driver's transmit buffer.
Implementation: dynamic.
DRV_USART_ReceiverBufferIsEmptyProvides the status of the driver's receive buffer.
Implementation: static/dynamic.

Data Types and Constants

NameDescription
DRV_USART_CLIENT_STATUSDefines the client-specific status of the USART driver.
DRV_USART_INITDefines the data required to initialize or reinitialize the USART driver.
DRV_USART_INIT_FLAGSFlags identifying features that can be enabled when the driver is initialized.
DRV_USART_TRANSFER_STATUSSpecifies the status of the receive or transmit.
DRV_USART_INDEX_0USART driver index definitions.
DRV_USART_INDEX_1This is macroDRV_USART_INDEX_1.
DRV_USART_INDEX_2This is macroDRV_USART_INDEX_2.
DRV_USART_INDEX_3This is macroDRV_USART_INDEX_3.
DRV_USART_INDEX_4This is macroDRV_USART_INDEX_4.
DRV_USART_INDEX_5This is macroDRV_USART_INDEX_5.
DRV_USART_BAUD_SET_RESULTIdentifies the handshaking modes supported by the USART driver.
DRV_USART_BUFFER_EVENTIdentifies the possible events that can result from a buffer add request.
DRV_USART_BUFFER_EVENT_HANDLERPoints to a USART driver Buffer Event handler function.
DRV_USART_BUFFER_HANDLEHandles identifying a read or write buffer passed to the driver.
DRV_USART_ERRORDefines the possible errors that can occur during driver operation.
DRV_USART_LINE_CONTROL_SET_RESULTIdentifies the results of the baud set function.
DRV_USART_OPERATION_MODE_DATADefines the initialization data required for different operation modes of USART.
DRV_USART_BUFFER_HANDLE_INVALIDDefinition of an invalid buffer handle.
DRV_USART_COUNTNumber of valid USART drivers.
DRV_USART_READ_ERRORUSART driver Read Error.
DRV_USART_WRITE_ERRORUSART driver Write Error.
DRV_USART_LINE_CONTROLIdentifies the line control modes supported by the USART driver.
DRV_USART_OPERATION_MODEIdentifies the modes of the operation of the USART module.