|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The panel's half of the Hitec receive mode. More...
Functions | |
| void | hitec_rx_link_init (hitec_rx_link_t *l) |
| No IOmcu, PULL-UP asked, nothing owed. | |
| void | hitec_rx_link_want (hitec_rx_link_t *l, uint8_t mode) |
| The setting as it is now; a change owes it. | |
| void | hitec_rx_link_came_up (hitec_rx_link_t *l, uint16_t minor) |
A link-up edge with an IOmcu of minor: the mode is owed again. | |
| void | hitec_rx_link_lost (hitec_rx_link_t *l) |
| The link went down. | |
| static bool | knows_register (const hitec_rx_link_t *l) |
| Whether the IOmcu has the HITEC RX register (LINK_MINOR_HITEC_RX or later). | |
| bool | hitec_rx_link_next (const hitec_rx_link_t *l, uint32_t now_ms, uint16_t *value) |
Whether to write the page's register 23 at now_ms, and with what. | |
| void | hitec_rx_link_done (hitec_rx_link_t *l, int result, uint32_t now_ms) |
| How the write hitec_rx_link_next() gave went: HITEC_RX_LINK_ACK, a NACK's reason, or HITEC_RX_LINK_NO_ANSWER. | |
| hitec_rx_link_mark_t | hitec_rx_link_mark (const hitec_rx_link_t *l) |
| What the row says now. | |
| void hitec_rx_link_came_up | ( | hitec_rx_link_t * | l, |
| uint16_t | minor ) |
A link-up edge with an IOmcu of minor: the mode is owed again.
| l | The link state. |
| minor | The protocol minor version of the IOmcu. |
| void hitec_rx_link_done | ( | hitec_rx_link_t * | l, |
| int | result, | ||
| uint32_t | now_ms ) |
How the write hitec_rx_link_next() gave went: HITEC_RX_LINK_ACK, a NACK's reason, or HITEC_RX_LINK_NO_ANSWER.
| l | The link state. |
| result | The write's result: an acknowledgement, a NACK's reason or HITEC_RX_LINK_NO_ANSWER. |
| now_ms | The time of the answer, in ms. |
| void hitec_rx_link_init | ( | hitec_rx_link_t * | l | ) |
No IOmcu, PULL-UP asked, nothing owed.
| l | The link state to set up. |
| void hitec_rx_link_lost | ( | hitec_rx_link_t * | l | ) |
The link went down.
| l | The link state. |
| hitec_rx_link_mark_t hitec_rx_link_mark | ( | const hitec_rx_link_t * | l | ) |
What the row says now.
| l | The link state. |
| bool hitec_rx_link_next | ( | const hitec_rx_link_t * | l, |
| uint32_t | now_ms, | ||
| uint16_t * | value ) |
Whether to write the page's register 23 at now_ms, and with what.
False while nothing is owed, no IOmcu answers, it is older than 4.24, or an unanswered write is younger than HITEC_RX_LINK_RETRY_MS.
| l | The link state. |
| now_ms | The time of the poll, in ms. |
| value | Receives the register 23 value to write. |
| void hitec_rx_link_want | ( | hitec_rx_link_t * | l, |
| uint8_t | mode ) |
The setting as it is now; a change owes it.
A value above LINK_HITEC_RX_PRECHARGE is PULL-UP.
| l | The link state. |
| mode | The setting; a value above LINK_HITEC_RX_PRECHARGE is PULL-UP. |
|
static |
Whether the IOmcu has the HITEC RX register (LINK_MINOR_HITEC_RX or later).
| l | The link state. |