#ifndef DRILL_SPI_TRANSPORT_H
#define DRILL_SPI_TRANSPORT_H
#include <stdbool.h>
#include <stdint.h>
/* Single main-loop owner. now_us must be monotonic modulo32 bits with <2^31
 * gaps. Caller must use a qualified timebase; no such live caller exists yet. */
bool drill_spi_init(uint32_t now_us);
bool drill_spi_available(void);
bool drill_spi_start(uint16_t frame,uint32_t now_us);
void drill_spi_poll(uint32_t now_us);
bool drill_spi_get(uint16_t *response,uint32_t now_us);
bool drill_spi_failed(void);
bool drill_spi_active(void);
void drill_spi_abort(void);
#endif
