mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Fix RIP bugs, add in UART
This commit is contained in:
22
components/rmt/include/IPhysicalLayer.h
Normal file
22
components/rmt/include/IPhysicalLayer.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user