mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
23 lines
611 B
C++
23 lines
611 B
C++
#ifndef IPHYSICAL_LAYER_H
|
|
#define IPHYSICAL_LAYER_H
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include "esp_err.h"
|
|
|
|
#ifndef MAX_CHANNELS
|
|
#define MAX_CHANNELS 4
|
|
#endif
|
|
|
|
class IPhysicalLayer {
|
|
public:
|
|
virtual ~IPhysicalLayer() = default;
|
|
|
|
virtual esp_err_t send(uint8_t* data, size_t size, void* config, uint8_t channel_num) = 0;
|
|
virtual esp_err_t receive(uint8_t* recv_buf, size_t size, size_t* output_size, uint8_t channel_num) = 0;
|
|
virtual esp_err_t start_receiving(uint8_t channel_num) = 0;
|
|
virtual esp_err_t wait_until_send_complete(uint8_t channel_num) = 0;
|
|
};
|
|
|
|
#endif // IPHYSICAL_LAYER_H
|