Mistake on this page?
Report an issue in GitHub or email us
Functions
Asynchronous Serial Hardware Abstraction Layer

Functions

int serial_tx_asynch (serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint)
 Begin asynchronous TX transfer. More...
 
void serial_rx_asynch (serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint)
 Begin asynchronous RX transfer (enable interrupt for data collecting) The used buffer is specified in the serial object - rx_buff. More...
 
uint8_t serial_tx_active (serial_t *obj)
 Attempts to determine if the serial peripheral is already in use for TX. More...
 
uint8_t serial_rx_active (serial_t *obj)
 Attempts to determine if the serial peripheral is already in use for RX. More...
 
int serial_irq_handler_asynch (serial_t *obj)
 The asynchronous TX and RX handler. More...
 
void serial_tx_abort_asynch (serial_t *obj)
 Abort the ongoing TX transaction. More...
 
void serial_rx_abort_asynch (serial_t *obj)
 Abort the ongoing RX transaction. More...
 

Detailed Description

Function Documentation

int serial_irq_handler_asynch ( serial_t obj)

The asynchronous TX and RX handler.

Parameters
objThe serial object
Returns
Returns event flags if an RX transfer termination condition was met; otherwise returns 0
void serial_rx_abort_asynch ( serial_t obj)

Abort the ongoing RX transaction.

It disables the enabled interrupt for RX and flushes the RX hardware buffer if RX FIFO is used

Parameters
objThe serial object
uint8_t serial_rx_active ( serial_t obj)

Attempts to determine if the serial peripheral is already in use for RX.

Parameters
objThe serial object
Returns
Non-zero if the RX transaction is ongoing, 0 otherwise
void serial_rx_asynch ( serial_t obj,
void *  rx,
size_t  rx_length,
uint8_t  rx_width,
uint32_t  handler,
uint32_t  event,
uint8_t  char_match,
DMAUsage  hint 
)

Begin asynchronous RX transfer (enable interrupt for data collecting) The used buffer is specified in the serial object - rx_buff.

Parameters
objThe serial object
rxThe receive buffer
rx_lengthThe number of bytes to receive
rx_widthDeprecated argument
handlerThe serial handler
eventThe logical OR of events to be registered
handlerThe serial handler
char_matchA character in range 0-254 to be matched
hintA suggestion for how to use DMA with this transfer
void serial_tx_abort_asynch ( serial_t obj)

Abort the ongoing TX transaction.

It disables the enabled interupt for TX and flushes the TX hardware buffer if TX FIFO is used

Parameters
objThe serial object
uint8_t serial_tx_active ( serial_t obj)

Attempts to determine if the serial peripheral is already in use for TX.

Parameters
objThe serial object
Returns
Non-zero if the RX transaction is ongoing, 0 otherwise
int serial_tx_asynch ( serial_t obj,
const void *  tx,
size_t  tx_length,
uint8_t  tx_width,
uint32_t  handler,
uint32_t  event,
DMAUsage  hint 
)

Begin asynchronous TX transfer.

The used buffer is specified in the serial object, tx_buff

Parameters
objThe serial object
txThe transmit buffer
tx_lengthThe number of bytes to transmit
tx_widthDeprecated argument
handlerThe serial handler
eventThe logical OR of events to be registered
hintA suggestion for how to use DMA with this transfer
Returns
Returns number of data transfered, otherwise returns 0
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.