File Uploader.h
File List > Firmware > Libraries > SimGateway > Uploader.h
Go to the documentation of this file
#pragma once
#include <stdint.h>
namespace Uploader {
struct Io {
void (*send)(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len);
void (*ack)(uint8_t type, uint8_t seq);
void (*nack)(uint8_t type, uint8_t seq, uint8_t reason, uint8_t detail);
void (*writeUart)(const uint8_t* p, uint16_t n);
};
void begin(const Io& io);
bool handles(uint8_t type);
void onFrame(uint8_t type, uint8_t seq, const uint8_t* payload, uint16_t len, uint32_t now);
void onClientFrame(uint32_t now);
bool onBridgeLine(const char* line, uint16_t len, uint32_t now);
void tick(uint32_t now);
bool busy();
bool ownsUart();
bool ownsUartRx();
void onUartByte(uint8_t b, uint32_t now);
} // namespace Uploader