rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
hitec_driver_t Struct Reference

A pin driver. More...

#include <hitec_wire.h>

Data Fields

void * ctx
bool(*) start (void *ctx, const hitec_xfer_t *xfer)
bool(*) poll (void *ctx, hitec_capture_t *out)
 Reports the end of a run: false while it runs; true once, with out filled, after it has ended.
uint32_t(*) now_us (void *ctx)

Detailed Description

A pin driver.

Non-blocking; there is no delay function.

  • start() begins xfer and returns at once; false when the line is not open, a transaction runs, xfer is not valid or the line cannot make it (another family, a level its drive does not make).
  • poll() returns false while the transaction runs. Once it has ended it fills out and returns true, once.
  • now_us() is a free-running microsecond clock. It may wrap; compare times with hitec_elapsed_us().

Field Documentation

◆ ctx

void* hitec_driver_t::ctx

driver state, passed to each function

◆ now_us

uint32_t(*) hitec_driver_t::now_us(void *ctx)

us, may wrap

◆ poll

bool(*) hitec_driver_t::poll(void *ctx, hitec_capture_t *out)

Reports the end of a run: false while it runs; true once, with out filled, after it has ended.

Parameters
ctxDriver state, as in the struct.
outReceives the capture when the run has ended.
Returns
true once, after the run has ended; false while it runs.

◆ start

bool(*) hitec_driver_t::start(void *ctx, const hitec_xfer_t *xfer)

begin a run


The documentation for this struct was generated from the following file: