DCAITI Robot Hardware  1.0
UARTCom.hpp
Go to the documentation of this file.
1 #ifndef UART_COM_HPP
2 #define UART_COM_HPP
3 
15 #include "Arduino.h"
16 #include "constants.h"
17 
18 class UARTCom {
19 private:
20  /* functions */
21 
22 public:
23  /* variables */
24  static uint8_t data[MAX_PACKET_LENGTH];
25 
26  /* functions */
27 
33  static void init (uint8_t* d);
34 
40  static void read (uint8_t* d);
41 
50  static void send (U_FrameType ft, uint8_t pll, U_Component c, uint8_t* pl);
51 };
52 
53 #endif
Definition: UARTCom.hpp:18
static void init(uint8_t *d)
initializes uart communication
Definition: UARTCom.cpp:242
static uint8_t data[MAX_PACKET_LENGTH]
Definition: UARTCom.hpp:24
static void read(uint8_t *d)
reads uart interface and stores the data into an uint8_t array
Definition: UARTCom.cpp:253
static void send(U_FrameType ft, uint8_t pll, U_Component c, uint8_t *pl)
assembles and sends a uart package
Definition: UARTCom.cpp:307
enum frametypes U_FrameType
enum components U_Component
#define MAX_PACKET_LENGTH
Definition: constants.h:46