|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
When the panel may write its own flash, and when the IOmcu may not write its own. More...
#include "flash_gate.h"Functions | |
| bool | flash_gate_open (bool armed, bool supply) |
| Whether a flash operation may start now. | |
| bool | flash_gate_busy (bool driving, bool supply_on, bool pd_on, bool kst_session) |
| Whether the IOmcu's flash may not be written now, for the store and for the firmware update alike. | |
When the panel may write its own flash, and when the IOmcu may not write its own.
See flash_gate.h.
SPDX-License-Identifier: MIT
| bool flash_gate_busy | ( | bool | driving, |
| bool | supply_on, | ||
| bool | pd_on, | ||
| bool | kst_session ) |
Whether the IOmcu's flash may not be written now, for the store and for the firmware update alike.
The bank driving: a window stops this core and steps no output. The supply asked on or perhaps on: its UART replies would overrun the 8-byte FIFO in a 19ms window, and an OFF asked over the link would wait for it. A KST session: a flash write stalls the pass that steps it.
False only when all four arguments are false.
| driving | true when the bank is driving (outputs_driving()). |
| supply_on | true when the SUPPLY page's output register is non-zero. |
| pd_on | true when the PD mini is open and may be on (pdmini_may_be_on()). |
| kst_session | true when the KST port is out of PWM. |
| bool flash_gate_open | ( | bool | armed, |
| bool | supply ) |
Whether a flash operation may start now.
True only when both armed and supply are false.
| armed | true when the bank is armed, or an arm is waiting for the line to settle (arming_link_needed()): a stall inside the settle can cost the far end's trust in the heartbeat and so the arm. |
| supply | true when the supply's output is on, or an ON for it is queued and not yet taken. |