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.
Dependents: DeepCover Embedded Security in IoT MaximInterface MAXREFDES155#
Uart Class Reference
Wrapper for mbed::Serial. More...
#include <Uart.hpp>
Inherits MaximInterfaceCore::Uart.
Public Types | |
| enum | ErrorValue { HardwareError = 1 } |
Public Member Functions | |
| virtual MaximInterfaceCore::Result < void > | setBaudRate (int_least32_t baudRate) |
| Set the baud rate of the port in Hz. | |
| virtual MaximInterfaceCore::Result < void > | sendBreak () |
| Generate a break condition on the port for a small amount of time. | |
| virtual MaximInterfaceCore::Result < void > | clearReadBuffer () |
| Clear all received data that was buffered. | |
| virtual MaximInterfaceCore::Result < void > | writeByte (uint_least8_t data) |
| Writes a byte of data to the port. | |
| virtual MaximInterfaceCore::Result < uint_least8_t > | readByte () |
| Reads a byte of data from the port. | |
| virtual MaximInterfaceCore_EXPORT Result< void > | writeBlock (span< const uint_least8_t > data) |
| Writes a block of data to the port. | |
| virtual MaximInterfaceCore_EXPORT Result< void > | readBlock (span< uint_least8_t > data) |
| Read a block of data from the port. | |
Detailed Description
Wrapper for mbed::Serial.
Definition at line 42 of file MaximInterfaceMbed/Uart.hpp.
Member Enumeration Documentation
| enum ErrorValue |
Reimplemented from Uart.
Definition at line 44 of file MaximInterfaceMbed/Uart.hpp.
Member Function Documentation
| virtual MaximInterfaceCore::Result<void> clearReadBuffer | ( | ) | [virtual] |
Clear all received data that was buffered.
Implements Uart.
| Result< void > readBlock | ( | span< uint_least8_t > | data ) | [virtual, inherited] |
Read a block of data from the port.
Block until data is received or a timeout is reached.
- Parameters:
-
[out] data Data read from the port if successful.
Definition at line 45 of file MaximInterfaceCore/Uart.cpp.
| virtual MaximInterfaceCore::Result<uint_least8_t> readByte | ( | ) | [virtual] |
Reads a byte of data from the port.
Block until data is received or a timeout is reached.
- Returns:
- Data read from the port if successful.
Implements Uart.
| virtual MaximInterfaceCore::Result<void> sendBreak | ( | ) | [virtual] |
Generate a break condition on the port for a small amount of time.
Implements Uart.
| virtual MaximInterfaceCore::Result<void> setBaudRate | ( | int_least32_t | baudRate ) | [virtual] |
Set the baud rate of the port in Hz.
Implements Uart.
| Result< void > writeBlock | ( | span< const uint_least8_t > | data ) | [virtual, inherited] |
Writes a block of data to the port.
Definition at line 38 of file MaximInterfaceCore/Uart.cpp.
| virtual MaximInterfaceCore::Result<void> writeByte | ( | uint_least8_t | data ) | [virtual] |
Writes a byte of data to the port.
Implements Uart.
Generated on Tue Jul 12 2022 11:13:26 by
1.7.2