TeensyNanoExoCode
Loading...
Searching...
No Matches
UART_msg_t.h
Go to the documentation of this file.
1#ifndef UARTMSG_H
2#define UARTMSG_H
3
4#define UART_MSG_T_MAX_DATA_LEN 64
5#include "Arduino.h"
6#include "Logger.h"
7
8typedef struct
9{
10 uint8_t command;
11 uint8_t joint_id;
13 uint8_t len;
15
17{
18 static void print_msg(UART_msg_t msg)
19 {
20 logger::println("UART_command_utils::print_msg->Msg: ");
21 logger::print(msg.command); logger::print("\t");
22 logger::print(msg.joint_id); logger::print("\t");
23 logger::print(msg.len); logger::println();
24 for (int i=0; i<msg.len; i++)
25 {
26 logger::print(msg.data[i]); logger::print(", ");
27 }
28 logger::println();
29 }
30};
31
32
33#endif
#define UART_MSG_T_MAX_DATA_LEN
Definition UART_msg_t.h:4
Definition UART_msg_t.h:17
Definition UART_msg_t.h:9
uint8_t len
Definition UART_msg_t.h:13
uint8_t joint_id
Definition UART_msg_t.h:11
uint8_t command
Definition UART_msg_t.h:10