|
TeensyNanoExoCode
|
Singleton Class to handle the UART Work. More...
#include <UARTHandler.h>
Public Member Functions | |
| void | UART_msg (uint8_t msg_id, uint8_t len, uint8_t joint_id, float *buffer) |
| Packs and sends a UART message. | |
| void | UART_msg (UART_msg_t msg) |
| UART_msg_t | poll (float timeout_us=RX_TIMEOUT_US) |
| Check for incoming data. If there is data read the message, timing out if it takes too long. | |
| uint8_t | check_for_data () |
| See if data is available in the UART buffer. | |
Static Public Member Functions | |
| static UARTHandler * | get_instance () |
| Get the instance object. | |
Singleton Class to handle the UART Work.
|
inline |
See if data is available in the UART buffer.
|
static |
Get the instance object.
| UART_msg_t UARTHandler::poll | ( | float | timeout_us = RX_TIMEOUT_US | ) |
Check for incoming data. If there is data read the message, timing out if it takes too long.
| timeout_us |
| void UARTHandler::UART_msg | ( | UART_msg_t | msg | ) |
| void UARTHandler::UART_msg | ( | uint8_t | msg_id, |
| uint8_t | len, | ||
| uint8_t | joint_id, | ||
| float * | buffer | ||
| ) |
Packs and sends a UART message.
| msg_id | An ID used to associate data on the receiver |
| len | Length of data |
| joint_id | Joint ID associated with data |
| buffer | Payload |