Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
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. | |
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. | |
uint8_t | serial_tx_active (serial_t *obj) |
Attempts to determine if the serial peripheral is already in use for TX. | |
uint8_t | serial_rx_active (serial_t *obj) |
Attempts to determine if the serial peripheral is already in use for RX. | |
int | serial_irq_handler_asynch (serial_t *obj) |
The asynchronous TX and RX handler. | |
void | serial_tx_abort_asynch (serial_t *obj) |
Abort the ongoing TX transaction. | |
void | serial_rx_abort_asynch (serial_t *obj) |
Abort the ongoing RX transaction. |
Function Documentation
int serial_irq_handler_asynch | ( | serial_t * | obj ) |
The asynchronous TX and RX handler.
- Parameters:
-
obj The 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:
-
obj The serial object
uint8_t serial_rx_active | ( | serial_t * | obj ) |
Attempts to determine if the serial peripheral is already in use for RX.
- Parameters:
-
obj The 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:
-
obj The serial object rx The receive buffer rx_length The number of bytes to receive rx_width Deprecated argument handler The serial handler event The logical OR of events to be registered handler The serial handler char_match A character in range 0-254 to be matched hint A 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:
-
obj The serial object
uint8_t serial_tx_active | ( | serial_t * | obj ) |
Attempts to determine if the serial peripheral is already in use for TX.
- Parameters:
-
obj The 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:
-
obj The serial object tx The transmit buffer tx_length The number of bytes to transmit tx_width Deprecated argument handler The serial handler event The logical OR of events to be registered hint A suggestion for how to use DMA with this transfer
- Returns:
- Returns number of data transfered, otherwise returns 0
Generated on Tue Jul 12 2022 20:37:47 by
