|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The KST page and the programming port's hardware it drives; see iomcu.h for the other files. More...
#include "iomcu.h"Functions | |
| uint8_t | kst_hw_pin (void *ctx, uint8_t port) |
| Returns the pin of a programming port for the KST wire driver. | |
| bool | kst_hw_take (void *ctx, uint8_t port, uint8_t pin) |
| Takes the programming port's pin for the KST wire driver. | |
| void | kst_hw_give (void *ctx) |
| Gives the programming port's pin back from the KST wire driver. | |
| void | kst_hw_supply (void *ctx, supply_port_view_t *out) |
| Fills the supply view of the KST port. | |
| bool | kst_hw_supply_set (void *ctx, bool on, uint16_t mv, uint16_t ma) |
| Sets the supply of the KST port. | |
| void | kst_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the KST page. | |
| uint8_t | kst_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the KST page. | |
The KST page and the programming port's hardware it drives; see iomcu.h for the other files.
SPDX-License-Identifier: MIT
| void kst_hw_give | ( | void * | ctx | ) |
Gives the programming port's pin back from the KST wire driver.
| ctx | Unused. |
| uint8_t kst_hw_pin | ( | void * | ctx, |
| uint8_t | port ) |
Returns the pin of a programming port for the KST wire driver.
| ctx | Unused. |
| port | Index of the programming port. |
| void kst_hw_supply | ( | void * | ctx, |
| supply_port_view_t * | out ) |
Fills the supply view of the KST port.
| ctx | Unused. |
| out | Receives the port's supply view. |
| bool kst_hw_supply_set | ( | void * | ctx, |
| bool | on, | ||
| uint16_t | mv, | ||
| uint16_t | ma ) |
Sets the supply of the KST port.
No ON while the supply's wiring is not in flash, as the SUPPLY page refuses one: a restart in the run could not switch the module off.
| ctx | Unused. |
| on | True to switch the supply on. |
| mv | Set voltage in millivolts, for ON. |
| ma | Set current in milliamps, for ON. |
| bool kst_hw_take | ( | void * | ctx, |
| uint8_t | port, | ||
| uint8_t | pin ) |
Takes the programming port's pin for the KST wire driver.
| ctx | Unused. |
| port | Index of the programming port. Not used here. |
| pin | GPIO number to take. |
| void kst_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the KST page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t kst_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the KST page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |