|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
What the port needs from the hardware. More...
#include <kst_port.h>
Data Fields | |
| void * | ctx |
| The caller's context, passed as the first argument of each hook. | |
| uint8_t | ports |
| Programming ports the build has, 1 to LINK_PG_PORTS_MAX. | |
| uint8_t(*) | pin (void *ctx, uint8_t port) |
| bool(*) | take (void *ctx, uint8_t port, uint8_t pin) |
| void(*) | give (void *ctx) |
| Close the wire driver and give the pin back to the generator. | |
| void(*) | supply (void *ctx, supply_port_view_t *out) |
| What the supply says now (supply_page_port_view()). | |
| bool(*) | supply_set (void *ctx, bool on, uint16_t mv, uint16_t ma) |
| kst_driver_t | driver |
| The wire driver. | |
What the port needs from the hardware.
| kst_driver_t kst_port_hw_t::driver |
The wire driver.
now_us() works while the driver is closed.
| void(*) kst_port_hw_t::give(void *ctx) |
Close the wire driver and give the pin back to the generator.
Called with the port in LINK_KST_PWM.
| uint8_t(*) kst_port_hw_t::pin(void *ctx, uint8_t port) |
The pin the PWM generator has for port, or a value above OUT_MAX_PIN while it has none.
| void(*) kst_port_hw_t::supply(void *ctx, supply_port_view_t *out) |
What the supply says now (supply_page_port_view()).
NULL, with supply_set: the build has no supply to switch.
| bool(*) kst_port_hw_t::supply_set(void *ctx, bool on, uint16_t mv, uint16_t ma) |
Ask the supply on at mv and ma, or off (the set points are then not read). False when it does not take the request.
Take pin of port from the generator and open the wire driver on it, which holds it low. False when the driver gets no resources; give() returns the pin.