mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-22 23:07:28 +02:00
fix(esp_modem): Support 2 byte size packets
Closes https://github.com/espressif/esp-protocols/issues/46
This commit is contained in:
@ -12,6 +12,13 @@ public:
|
||||
|
||||
~LoopbackTerm() override;
|
||||
|
||||
/**
|
||||
* @brief Inject user data to the terminal, to respond.
|
||||
* inject_by defines batch sizes: the read callback is called multiple times
|
||||
* with partial data of `inject_by` size
|
||||
*/
|
||||
int inject(uint8_t *data, size_t len, size_t inject_by);
|
||||
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
@ -24,10 +31,12 @@ private:
|
||||
STARTED,
|
||||
STOPPED
|
||||
};
|
||||
void batch_read();
|
||||
status_t status;
|
||||
SignalGroup signal;
|
||||
std::vector<uint8_t> loopback_data;
|
||||
size_t data_len;
|
||||
bool pin_ok;
|
||||
bool is_bg96;
|
||||
size_t inject_by;
|
||||
};
|
||||
|
Reference in New Issue
Block a user