Functions
UART2Support.h File Reference

Detailed Description

Holder of common helper functions for the UART driver.

============================================================================


#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/UART2.h>
Include dependency graph for UART2Support.h:

Go to the source code of this file.

Functions

void UART2Support_disableRx (UART2_HWAttrs const *hwAttrs)
 Function to disable the receive and receive interrupts. More...
 
void UART2Support_disableTx (UART2_HWAttrs const *hwAttrs)
 Function to disable the transmit interrupt. More...
 
void UART2Support_dmaRefreshRx (UART2_Handle handle)
 Function to update RX ring buffer state. More...
 
void UART2Support_dmaStartRx (UART2_Handle handle)
 Function to configure the receive DMA. More...
 
void UART2Support_dmaStartTx (UART2_Handle handle)
 Function to configure the tramsit DMA. More...
 
void UART2Support_dmaStopRx (UART2_Handle handle)
 Function to disable the RX DMA. More...
 
uint32_t UART2Support_dmaStopTx (UART2_Handle handle)
 Function to disable the TX DMA. More...
 
void UART2Support_enableInts (UART2_Handle handle)
 Function to enable receive, receive timeout, and error interrupts. More...
 
void UART2Support_enableRx (UART2_HWAttrs const *hwAttrs)
 Function to enable the receive. More...
 
void UART2Support_enableTx (UART2_HWAttrs const *hwAttrs)
 Function to enable the transmit interrupt. More...
 
void UART2Support_powerSetConstraint (UART2_Handle handle, bool setFlashConstraint)
 Function to set power constraints. More...
 
void UART2Support_powerRelConstraint (UART2_Handle handle, bool relFlashConstraint)
 Function to release power constraints. More...
 
int_fast16_t UART2Support_rxStatus2ErrorCode (uint32_t errorData)
 Function to convert RX error status to a UART2 error code. More...
 
uint32_t UART2Support_sendData (UART2_HWAttrs const *hwAttrs, size_t size, uint8_t *buf)
 Function to send data. More...
 
bool UART2Support_txDone (UART2_HWAttrs const *hwAttrs)
 Function to determine if TX is in progress. More...
 
int UART2Support_uartRxError (UART2_HWAttrs const *hwAttrs)
 Function to clear receive errors. More...
 

Function Documentation

§ UART2Support_disableRx()

void UART2Support_disableRx ( UART2_HWAttrs const *  hwAttrs)

Function to disable the receive and receive interrupts.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure

§ UART2Support_disableTx()

void UART2Support_disableTx ( UART2_HWAttrs const *  hwAttrs)

Function to disable the transmit interrupt.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure

§ UART2Support_dmaRefreshRx()

void UART2Support_dmaRefreshRx ( UART2_Handle  handle)

Function to update RX ring buffer state.

Parameters
[in]handleA UART2_Handle returned from UART2_open()

§ UART2Support_dmaStartRx()

void UART2Support_dmaStartRx ( UART2_Handle  handle)

Function to configure the receive DMA.

Parameters
[in]handleA UART2_Handle returned from UART2_open()

§ UART2Support_dmaStartTx()

void UART2Support_dmaStartTx ( UART2_Handle  handle)

Function to configure the tramsit DMA.

Parameters
[in]handleA UART2_Handle returned from UART2_open()

§ UART2Support_dmaStopRx()

void UART2Support_dmaStopRx ( UART2_Handle  handle)

Function to disable the RX DMA.

Parameters
[in]handleA UART2_Handle returned from UART2_open()

§ UART2Support_dmaStopTx()

uint32_t UART2Support_dmaStopTx ( UART2_Handle  handle)

Function to disable the TX DMA.

Parameters
[in]handleA UART2_Handle returned from UART2_open()
Returns
Returns the number of bytes that were not transacted

§ UART2Support_enableInts()

void UART2Support_enableInts ( UART2_Handle  handle)

Function to enable receive, receive timeout, and error interrupts.

Parameters
[in]handleA UART2_Handle returned from UART2_open()

§ UART2Support_enableRx()

void UART2Support_enableRx ( UART2_HWAttrs const *  hwAttrs)

Function to enable the receive.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure

§ UART2Support_enableTx()

void UART2Support_enableTx ( UART2_HWAttrs const *  hwAttrs)

Function to enable the transmit interrupt.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure

§ UART2Support_powerSetConstraint()

void UART2Support_powerSetConstraint ( UART2_Handle  handle,
bool  setFlashConstraint 
)

Function to set power constraints.

Parameters
[in]handleA UART2_Handle returned from UART2_open()
[in]setFlashConstraintA boolean value, on whether or not to conditionally set a "keep flash in idle" power constraint

§ UART2Support_powerRelConstraint()

void UART2Support_powerRelConstraint ( UART2_Handle  handle,
bool  relFlashConstraint 
)

Function to release power constraints.

Parameters
[in]handleA UART2_Handle returned from UART2_open()
[in]relFlashConstraintA boolean value, on whether or not to conditionally release a "keep flash in idle" power constraint

§ UART2Support_rxStatus2ErrorCode()

int_fast16_t UART2Support_rxStatus2ErrorCode ( uint32_t  errorData)

Function to convert RX error status to a UART2 error code.

Parameters
[in]errorDataData indicating the UART RX error status
Returns
Returns a status indicating success or failure of the read.
Return values
UART2_STATUS_SUCCESSThe call was successful.
UART2_STATUS_EOVERRUNA fifo overrun occurred.
UART2_STATUS_EFRAMINGA framinig error occurred.
UART2_STATUS_EBREAKA break error occurred.
UART2_STATUS_EPARITYA parity error occurred.

§ UART2Support_sendData()

uint32_t UART2Support_sendData ( UART2_HWAttrs const *  hwAttrs,
size_t  size,
uint8_t *  buf 
)

Function to send data.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure
[in]sizeThe number of bytes in the buffer that should be written to the UART
[in]bufA pointer to buffer containing data to be written to the UART
Returns
Returns the number of bytes written

§ UART2Support_txDone()

bool UART2Support_txDone ( UART2_HWAttrs const *  hwAttrs)

Function to determine if TX is in progress.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure
Returns
Returns true if there is no TX in progress, otherwise false

§ UART2Support_uartRxError()

int UART2Support_uartRxError ( UART2_HWAttrs const *  hwAttrs)

Function to clear receive errors.

Parameters
[in]hwAttrsA pointer to a UART2_HWAttrs structure
Returns
Returns a status indicating success or failure of the read.
Return values
UART2_STATUS_SUCCESSThe call was successful.
UART2_STATUS_EOVERRUNA fifo overrun occurred.
UART2_STATUS_EFRAMINGA framinig error occurred.
UART2_STATUS_EBREAKA break error occurred.
UART2_STATUS_EPARITYA parity error occurred.
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale