MSPM0G1X0X_G3X0X TI-Driver Library  1.20.01.06
Data Structures | Typedefs | Functions | Variables
UART MSPM0G1X0X_G3X0X driver supporting APIs
Collaboration diagram for UART MSPM0G1X0X_G3X0X driver supporting APIs:

Data Structures

struct  UARTSupport_Fxns
 Function pointers to implementation/hardware specific logic. More...
 
struct  UART_Object
 Private Metadata structure for a UART instance. More...
 
struct  UART_Buffers_Object
 Private Metadata structure for a UART instance supporting buffers. More...
 
struct  UART_EventCallback_Object
 Private Metadata structure for a UART instance supporting events. More...
 
struct  UART_Callback_Object
 Private Metadata structure for a UART instance supporting callbacks. More...
 
struct  UART_Data_Object
 Private Metadata structure for a UART instance supporting data structures needed for UART TX/RX execution. More...
 
struct  UART_Config_
 UART Global configuration. More...
 

Typedefs

typedef struct UART_Config_ UART_Config
 UART Global configuration. More...
 

Functions

int_fast16_t UART_readBuffered (UART_Handle handle, void *buf, size_t size, size_t *bytesRead)
 UART read that only supports buffered mode. More...
 
int_fast16_t UART_writeBuffered (UART_Handle handle, const void *buf, size_t size, size_t *bytesWritten)
 UART write that only supports buffered mode. More...
 
int_fast16_t UART_readCallback (UART_Handle handle, void *buf, size_t size, size_t *bytesRead)
 UART read that only supports callback mode. More...
 
int_fast16_t UART_writeCallback (UART_Handle handle, const void *buf, size_t size, size_t *bytesWritten)
 UART write that only supports callback mode. More...
 
int_fast16_t UART_readFullFeatured (UART_Handle handle, void *buf, size_t size, size_t *bytesRead)
 UART read that only supports buffered and callback mode. More...
 
int_fast16_t UART_writeFullFeatured (UART_Handle handle, const void *buf, size_t size, size_t *bytesWritten)
 UART write that only supports buffered and callback mode. More...
 

Variables

const UART_Config UART_config []
 Array of UART_Config structure.
 
const uint_least8_t UART_count
 Count of UART instances.
 

Detailed Description

Overview

Refer to ti_drivers_UART_Overview for a complete description of APIs and examples of use.

Typedef Documentation

§ UART_Config

typedef struct UART_Config_ UART_Config

UART Global configuration.

The UART_Config structure contains a set of pointers used to characterize the UART driver implementation.

Function Documentation

§ UART_readBuffered()

int_fast16_t UART_readBuffered ( UART_Handle  handle,
void *  buf,
size_t  size,
size_t *  bytesRead 
)

UART read that only supports buffered mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[out]buflocation to read data into.
[in]sizeamount of data to read in bytes.
[out]bytesReadIf non-NULL, the location to store the number of bytes actually read into the buffer. If NULL, this parameter will be ignored.
Returns
Returns a status indicating success or failure of the read.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother read from the UART is currently ongoing.
UART_STATUS_ECANCELLEDIn UART_Mode_BLOCKING, the read was canceled by a call to UART_readCancel() before any data could be received.

§ UART_writeBuffered()

int_fast16_t UART_writeBuffered ( UART_Handle  handle,
const void *  buf,
size_t  size,
size_t *  bytesWritten 
)

UART write that only supports buffered mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[in]buflocation to write data from.
[in]sizeamount of data to write in bytes.
[out]bytesWrittenIf non-NULL, the location to store the number of bytes actually written into the buffer. If NULL, this parameter will be ignored.
Returns
Returns a status indicating success or failure of the write.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother write to the UART is currently ongoing.

§ UART_readCallback()

int_fast16_t UART_readCallback ( UART_Handle  handle,
void *  buf,
size_t  size,
size_t *  bytesRead 
)

UART read that only supports callback mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[out]buflocation to read data into.
[in]sizeamount of data to read in bytes.
[out]bytesReadIf non-NULL, the location to store the number of bytes actually read into the buffer. If NULL, this parameter will be ignored. In callback mode, NULL could be passed in for this parameter, since the callback function will be passed the number of bytes read.
Returns
Returns a status indicating success or failure of the read.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother read from the UART is currently ongoing.
UART_STATUS_ECANCELLEDIn UART_Mode_BLOCKING, the read was canceled by a call to UART_readCancel() before any data could be received.

§ UART_writeCallback()

int_fast16_t UART_writeCallback ( UART_Handle  handle,
const void *  buf,
size_t  size,
size_t *  bytesWritten 
)

UART write that only supports callback mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[in]buflocation to write data from.
[in]sizeamount of data to write in bytes.
[out]bytesWrittenIf non-NULL, the location to store the number of bytes actually written into the buffer. If NULL, this parameter will be ignored. In callback mode, NULL could be passed in for this parameter, since the callback function will be passed the number of bytes written.
Returns
Returns a status indicating success or failure of the write.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother write to the UART is currently ongoing.

§ UART_readFullFeatured()

int_fast16_t UART_readFullFeatured ( UART_Handle  handle,
void *  buf,
size_t  size,
size_t *  bytesRead 
)

UART read that only supports buffered and callback mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[out]buflocation to read data into.
[in]sizeamount of data to read in bytes.
[out]bytesReadIf non-NULL, the location to store the number of bytes actually read into the buffer. If NULL, this parameter will be ignored. In callback mode, NULL could be passed in for this parameter, since the callback function will be passed the number of bytes read.
Returns
Returns a status indicating success or failure of the read.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother read from the UART is currently ongoing.
UART_STATUS_ECANCELLEDIn UART_Mode_BLOCKING, the read was canceled by a call to UART_readCancel() before any data could be received.

§ UART_writeFullFeatured()

int_fast16_t UART_writeFullFeatured ( UART_Handle  handle,
const void *  buf,
size_t  size,
size_t *  bytesWritten 
)

UART write that only supports buffered and callback mode.

Parameters
[in]handleUART_Handle instance from UART_open().
[in]buflocation to write data from.
[in]sizeamount of data to write in bytes.
[out]bytesWrittenIf non-NULL, the location to store the number of bytes actually written into the buffer. If NULL, this parameter will be ignored. In callback mode, NULL could be passed in for this parameter, since the callback function will be passed the number of bytes written.
Returns
Returns a status indicating success or failure of the write.
Return values
UART_STATUS_SUCCESSThe call was successful.
UART_STATUS_EINUSEAnother write to the UART is currently ongoing.
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale