|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The PD mini driver's private functions, shared by pdmini.c and pdmini_jobs.c. More...
Go to the source code of this file.
Functions | |
| void | pdmini_start (pdmini_t *d, uint32_t now, const uint8_t *req, size_t n, bool write) |
Starts the transaction req of n bytes and its CRC8: attaches the pins and enters PD_ATTACH. | |
| void | pdmini_read1 (pdmini_t *d, uint32_t now, uint8_t cmd) |
Starts the one-byte read cmd. | |
| void | pdmini_finish (pdmini_t *d, uint32_t now, bool ok) |
Ends the transaction under way, ok when its reply was taken (a write: when its bytes left), and enters PD_GAP. | |
| uint16_t | pdmini_target_mv (const pdmini_t *d) |
| The voltage set point the module is given for the one asked. | |
| bool | pdmini_under_line (const pdmini_t *d) |
| Whether the input last read lies under the set point read back and PDMINI_HEADROOM_MV. | |
| void | pdmini_sag_hold (pdmini_t *d) |
| The output switched off for the input, or its ON not written, and held off until an OFF is asked. | |
The PD mini driver's private functions, shared by pdmini.c and pdmini_jobs.c.
Not part of the module's interface; another project includes pdmini.h only.
SPDX-License-Identifier: MIT
| void pdmini_finish | ( | pdmini_t * | d, |
| uint32_t | now, | ||
| bool | ok ) |
Ends the transaction under way, ok when its reply was taken (a write: when its bytes left), and enters PD_GAP.
| d | Driver state. |
| now | Current time, in milliseconds. |
| ok | true when its reply was taken (a write: when its bytes left). |
| void pdmini_read1 | ( | pdmini_t * | d, |
| uint32_t | now, | ||
| uint8_t | cmd ) |
Starts the one-byte read cmd.
| d | Driver state. |
| now | Current time, in milliseconds. |
| cmd | Command byte to read. |
| void pdmini_sag_hold | ( | pdmini_t * | d | ) |
The output switched off for the input, or its ON not written, and held off until an OFF is asked.
| d | Driver state. |
| void pdmini_start | ( | pdmini_t * | d, |
| uint32_t | now, | ||
| const uint8_t * | req, | ||
| size_t | n, | ||
| bool | write ) |
Starts the transaction req of n bytes and its CRC8: attaches the pins and enters PD_ATTACH.
write is true for a write.
| d | Driver state. |
| now | Current time, in milliseconds. |
| req | Request bytes, without the CRC8. |
| n | Number of bytes in req. |
| write | true for a write, which has no reply. |
| uint16_t pdmini_target_mv | ( | const pdmini_t * | d | ) |
The voltage set point the module is given for the one asked.
| d | Driver state. |
| bool pdmini_under_line | ( | const pdmini_t * | d | ) |
Whether the input last read lies under the set point read back and PDMINI_HEADROOM_MV.
| d | Driver state. |