6#include "OgcLoggerUsbGecko.h"
7#include <ogc/usbgecko.h>
11 constexpr uint32_t PROBE_INTERVAL_MS = 1000;
12 constexpr int GECKO_RETRY_SPINS_PER_BYTE = 64;
15bool OgcLoggerUsbGecko::probe()
17 attached = usb_isgeckoalive(channel) != 0;
51 int retries =
static_cast<int>(len) * GECKO_RETRY_SPINS_PER_BYTE;
52 int sent = usb_sendbuffer_safe_ex(channel, line,
static_cast<int>(len), retries);
54 if (sent <
static_cast<int>(len))
void shutdown() override
Releases whatever init() acquired.
void write(LogLevel level, const char *line, size_t len) override
Writes one already-formatted, newline-terminated line.
bool init(const LogConfig &config) override
Opens whatever handle/socket/file this backend needs, using only fields from config (nothing hardcode...
static uint32_t diffMillisecs(Ticks start, Ticks end)
LogLevel
Severity of a single log call.
Full runtime configuration for the Logger.
int geckoChannel
EXI channel (GC/Wii): 0 = memory card slot A, 1 = memory card slot B (where a USB Gecko is normally i...