#include <binary_protocol.h>
◆ idle()
static void SDFileTransferProtocol::idle |
( |
| ) |
|
|
static |
160 if (transfer_active &&
ELAPSED(ms, idle_timeout)) {
162 if (
ELAPSED(ms, transfer_timeout)) transfer_abort();
◆ process()
static void SDFileTransferProtocol::process |
( |
uint8_t |
packet_type, |
|
|
char * |
buffer, |
|
|
const uint16_t |
length |
|
) |
| |
|
static |
168 switch (static_cast<FileTransfer>(packet_type)) {
169 case FileTransfer::QUERY:
171 #if ENABLED(BINARY_STREAM_COMPRESSION)
177 case FileTransfer::OPEN:
183 compression = packet.compression_enabled();
184 dummy_transfer = packet.dummy_transfer();
185 if (file_open(packet.filename())) {
193 case FileTransfer::CLOSE:
194 if (transfer_active) {
202 case FileTransfer::WRITE:
203 if (!transfer_active)
205 else if (!file_write(buffer,
length))
208 case FileTransfer::ABORT:
◆ VERSION_MAJOR
const uint16_t SDFileTransferProtocol::VERSION_MAJOR = 0 |
|
static |
◆ VERSION_MINOR
const uint16_t SDFileTransferProtocol::VERSION_MINOR = 1 |
|
static |
◆ VERSION_PATCH
const uint16_t SDFileTransferProtocol::VERSION_PATCH = 0 |
|
static |
◆ TIMEOUT
const uint16_t SDFileTransferProtocol::TIMEOUT = 10000 |
|
static |
◆ IDLE_PERIOD
const uint16_t SDFileTransferProtocol::IDLE_PERIOD = 1000 |
|
static |