|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The HITEC page and the programming port's hardware it drives; see iomcu.h for the other files. More...
#include "iomcu.h"Functions | |
| bool | hitec_hw_take (void *ctx, uint8_t port, uint8_t pin, uint8_t family, uint8_t drive, uint8_t rx) |
| Takes the programming port's pin for the HITEC wire driver. | |
| void | hitec_hw_give (void *ctx) |
| Gives the programming port's pin back from the HITEC wire driver. | |
| void | hitec_hw_abort (void *ctx) |
| Aborts the HITEC operation in progress. | |
| void | hitec_hw_run (void *ctx, hitec_port_run_t *out) |
| Reports the timing of the last HITEC run. | |
| void | hitec_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the HITEC page. | |
| uint8_t | hitec_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the HITEC page. | |
The HITEC page and the programming port's hardware it drives; see iomcu.h for the other files.
Implements the signal-wire programming protocols of Hitec servos. Hitec is a name or trademark of its owner; it is used here only to say which servos this module works with (README.md, "Legal notice and disclaimer").
SPDX-License-Identifier: MIT
| void hitec_hw_abort | ( | void * | ctx | ) |
Aborts the HITEC operation in progress.
| ctx | Unused. |
| void hitec_hw_give | ( | void * | ctx | ) |
Gives the programming port's pin back from the HITEC wire driver.
| ctx | Unused. |
| void hitec_hw_run | ( | void * | ctx, |
| hitec_port_run_t * | out ) |
Reports the timing of the last HITEC run.
| ctx | Unused. |
| out | Receives the lead time, span and bit time of the run. |
| bool hitec_hw_take | ( | void * | ctx, |
| uint8_t | port, | ||
| uint8_t | pin, | ||
| uint8_t | family, | ||
| uint8_t | drive, | ||
| uint8_t | rx ) |
Takes the programming port's pin for the HITEC wire driver.
| ctx | Unused. |
| port | Index of the programming port. Not used here. |
| pin | GPIO number to take. |
| family | Hitec protocol family the line is opened for. |
| drive | Drive setting of the pin. |
| rx | Nonzero to claim the sampler as well, for PRECHARGE. |
| void hitec_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the HITEC page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t hitec_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the HITEC page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |