MSPM0G1X0X_G3X0X TI-Driver Library  2.01.00.03
Data Fields

Function pointers to implementation/hardware specific logic. More...

#include <UARTSupportMSPM0.h>

Data Fields

bool(* enable )(UART_Handle handle, UART_Params *params)
 Enable the hardware, typically called during UART_open(). More...
 
void(* disable )(UART_Handle handle)
 Disable the hardware, typically called during UART_close(). More...
 
void(* txChar )(UART_Handle handle)
 Kick the transmitter in the hardware. More...
 
int_fast16_t(* read )(UART_Handle, void *buf, size_t size, size_t *bytesRead)
 Read method to use. More...
 
int_fast16_t(* write )(UART_Handle, const void *buf, size_t size, size_t *bytesWritten)
 Write method to use. More...
 

Detailed Description

Function pointers to implementation/hardware specific logic.

Field Documentation

§ enable

bool(* UARTSupport_Fxns::enable) (UART_Handle handle, UART_Params *params)

Enable the hardware, typically called during UART_open().

Parameters
[in]handleUART_Handle instance from UART_open().
[in]paramsReference to the UART_Params struct passed in by the user.
Returns
Returns true on success, else false.

§ disable

void(* UARTSupport_Fxns::disable) (UART_Handle handle)

Disable the hardware, typically called during UART_close().

Parameters
[in]handleUART_Handle instance from UART_open().

§ txChar

void(* UARTSupport_Fxns::txChar) (UART_Handle handle)

Kick the transmitter in the hardware.

Parameters
[in]handleUART_Handle instance from UART_open().

§ read

int_fast16_t(* UARTSupport_Fxns::read) (UART_Handle, void *buf, size_t size, size_t *bytesRead)

Read method to use.

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.

§ write

int_fast16_t(* UARTSupport_Fxns::write) (UART_Handle, const void *buf, size_t size, size_t *bytesWritten)

Write method to use.

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.

The documentation for this struct was generated from the following file:
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale