Treehopper C++ API
Uart.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include "Treehopper.h"
5 #include <vector>
6 
7 namespace Treehopper {
8  class Uart {
9  public:
13  virtual void startUart() = 0;
14 
20  virtual void send(std::vector<uint8_t> dataToSend) = 0;
21 
35  virtual std::vector<uint8_t> receive() = 0;
36 
42  virtual void baud(int baud) = 0;
43 
47  virtual int baud() = 0;
48  };
49 }
virtual void startUart()=0
Start the UART with the specified baud
virtual std::vector< uint8_t > receive()=0
Receive bytes from the UART in UART mode
Definition: Uart.h:8
virtual int baud()=0
Gets the baud of the UART.
virtual void send(std::vector< uint8_t > dataToSend)=0
Send data
Definition: AdcPin.h:3