|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The SUPPLY page and the PD mini behind it, and the current monitors' pages SENSE, SERVO_SENSE and SERVO_WIN, which core 1 reads the parts for; see iomcu.h for the other files. More...
#include <string.h>#include "iomcu.h"#include "pd_uart.h"#include "sense_limit.h"#include "sense_map.h"Functions | |
| void | capabilities_update (void) |
| Refreshes the IDENTITY page's capability word. | |
| bool | supply_rewire (void) |
| Rebinds the supply's PD mini UART to the wiring in force. | |
| static bool | supply_probe (void) |
| void | supply_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SUPPLY page. | |
| uint8_t | supply_take (uint8_t off, uint8_t n, const uint16_t *in, bool checked) |
| Takes a SUPPLY write into the supply's wiring and output state. | |
| uint8_t | supply_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the SUPPLY page. | |
| void | sense_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SENSE page. | |
| uint8_t | sense_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the SENSE page. | |
| void | servo_sense_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SERVO_SENSE page. | |
| void | sense_map_rd (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SENSE_MAP page. | |
| uint8_t | sense_map_wr (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the SENSE_MAP page. | |
| void | sense_win_a_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SENSE_WIN_A page. | |
| void | sense_win_b_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SENSE_WIN_B page. | |
| void | sense_limit_rd (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SENSE_LIMIT page. | |
| uint8_t | sense_limit_wr (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the SENSE_LIMIT page. | |
| void | servo_win_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the SERVO_WIN page. | |
| uint8_t | servo_sense_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the SERVO_SENSE page. | |
The SUPPLY page and the PD mini behind it, and the current monitors' pages SENSE, SERVO_SENSE and SERVO_WIN, which core 1 reads the parts for; see iomcu.h for the other files.
SPDX-License-Identifier: MIT
| void sense_limit_rd | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SENSE_LIMIT page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t sense_limit_wr | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the SENSE_LIMIT page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |
| void sense_map_rd | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SENSE_MAP page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t sense_map_wr | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the SENSE_MAP page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |
| void sense_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SENSE page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| void sense_win_a_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SENSE_WIN_A page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| void sense_win_b_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SENSE_WIN_B page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t sense_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the SENSE page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |
| void servo_sense_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SERVO_SENSE page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| uint8_t servo_sense_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the SERVO_SENSE page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |
| void servo_win_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SERVO_WIN page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| void supply_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the SUPPLY page.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the n register values. |
| bool supply_rewire | ( | void | ) |
Rebinds the supply's PD mini UART to the wiring in force.
| uint8_t supply_take | ( | uint8_t | off, |
| uint8_t | n, | ||
| const uint16_t * | in, | ||
| bool | checked ) |
Takes a SUPPLY write into the supply's wiring and output state.
| off | First register of the write. |
| n | Number of registers in the write. |
| in | The n register values. |
| checked | True for the wiring change a state read has shown the module off for (supply_page_wire_ready()); false for a write from the link. |
| uint8_t supply_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the SUPPLY page.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The n register values to write. |