добавлена бета проверка драйверов
This commit is contained in:
@@ -4,22 +4,31 @@
|
||||
#include <stddef.h>
|
||||
|
||||
enum class Role : uint8_t { SOLO, MASTER, SLAVE };
|
||||
enum class TestKind : uint8_t { OPTICAL, DRIVER };
|
||||
enum class LightCode : uint8_t { HH, HL, LH, LL };
|
||||
enum class FailReason : uint8_t {
|
||||
NONE, NO_SIGNAL, PERIOD_OUT, DUTY_OUT, EXTRA_EDGE, GLITCH, LOST_EDGE,
|
||||
DATA_LOSS, LINK_LOST, UNSUPPORTED, RESOLUTION, ABORTED
|
||||
DATA_LOSS, LINK_LOST, UNSUPPORTED, RESOLUTION, ABORTED,
|
||||
ACK_MISSING, ACK_TIMING, DRIVER_FAULT, ACK_MERGED,
|
||||
GATE_MONITOR_FAULT, SHORT_CIRCUIT_FAULT
|
||||
};
|
||||
|
||||
const char *roleName(Role role);
|
||||
const char *testKindName(TestKind kind);
|
||||
const char *lightCodeName(LightCode code);
|
||||
const char *failName(FailReason reason);
|
||||
|
||||
struct Settings {
|
||||
uint16_t version;
|
||||
uint8_t role;
|
||||
uint8_t testKind;
|
||||
uint8_t lightCode;
|
||||
uint8_t frequencyIndex;
|
||||
uint8_t maxPulseIndex;
|
||||
uint8_t minPulseIndex;
|
||||
uint8_t accuracyIndex;
|
||||
uint8_t timeIndex;
|
||||
uint16_t reserved;
|
||||
uint32_t checksum;
|
||||
};
|
||||
|
||||
@@ -71,6 +80,8 @@ struct IntegerPwmConfig {
|
||||
};
|
||||
|
||||
uint32_t settingsChecksum(const Settings &s);
|
||||
bool txActiveLightOn(const Settings &s);
|
||||
bool rxActiveLightOn(const Settings &s);
|
||||
uint32_t pulseWidthPointCount(uint32_t maxPulseNs, uint32_t minPulseNs);
|
||||
uint32_t pulseWidthAt(uint32_t maxPulseNs, uint32_t minPulseNs, uint32_t index);
|
||||
uint64_t nominalStageUs(uint32_t frequencyHz, uint32_t sampleTimeMs, uint32_t settleCycles);
|
||||
|
||||
Reference in New Issue
Block a user