HiveMind
USBMock.h
Go to the documentation of this file.
1 #ifndef HIVE_MIND_USBMOCK_H
2 #define HIVE_MIND_USBMOCK_H
3 
7 class USBMock : public IUSB {
8  public:
9  ~USBMock() override = default;
10 
11  bool send(const uint8_t* buffer, uint16_t length) override {
12  (void)buffer;
13  (void)length;
14 
15  return true;
16  }
17  bool receive(uint8_t* buffer, uint16_t length) override {
18  (void)buffer;
19  (void)length;
20 
21  return true;
22  }
23  bool isConnected() const override { return true; }
24 };
25 
26 #endif // HIVE_MIND_USBMOCK_H
USBMock
mocking the USB, not working for now, only for compilation
Definition: USBMock.h:7
USBMock::receive
bool receive(uint8_t *buffer, uint16_t length) override
Definition: USBMock.h:17
IUSB
USBMock::send
bool send(const uint8_t *buffer, uint16_t length) override
Definition: USBMock.h:11
USBMock::isConnected
bool isConnected() const override
Definition: USBMock.h:23
USBMock::~USBMock
~USBMock() override=default