12static constexpr uint8_t PROBE_FRAMES = 10;
13static constexpr uint8_t PROBE_MIN_VALID = 3;
26 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
27 spi::CLOCK_PHASE_TRAILING, spi::DATA_RATE_1MHZ> {
29 void setup()
override;
Bus-independent core; the I2C and SSI hubs provide read_count(), the entities poll it.
MT6701 over SSI: read-only, but each frame carries the field, push button and track-loss flags.
void dump_config() override
bool read_count(uint16_t &count) override
uint8_t get_status() const
The 4-bit status of the last good frame: bit3 track loss, bit2 push button, bits1:0 field strength.
The SPIDevice is what components using the SPI will create.
@ PROBE_RESULT_NO_ENCODER
bool decode_frame(const uint8_t frame[3], uint16_t &count, uint8_t &status)
Decode a 24-bit SSI frame (14-bit angle, 4 status bits, 6-bit CRC); false when the CRC fails.
ProbeResult probe_result(uint8_t valid_frames, bool any_nonzero)