rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
out_stage_ops_t Struct Reference

What the IOmcu does with a page once the commit has matched. More...

#include <out_stage.h>

Data Fields

uint8_t(*) take_cfg (void *ctx, const uint16_t *next)
 Judges a CHAN_CFG page and puts it in force, or refuses it.
uint8_t(*) take_slots (void *ctx, const uint16_t *next)
 Judges an OUTPUTS page and puts it in force, or refuses it.
void(*) put_cfg (void *ctx, const uint16_t *prev)
 Puts a CHAN_CFG page back, without judging it.
void(*) keep (void *ctx)
 Called once when both pages are in force.
outputs_t * bank
 The bank the two takes change, or NULL.

Detailed Description

What the IOmcu does with a page once the commit has matched.

take_cfg and take_slots judge a whole page by the rules of a CHAN_CFG and an OUTPUTS write and put it in force: 0, or a link_nack_t with the page in force unchanged. put_cfg puts a CHAN_CFG page's registers back without judging them, and makes the silicon agree with the bank again. keep is called once when both pages are in force.

bank is the bank the two takes change, or NULL. A CHAN_CFG page that changes a role moves that channel's command and output to the new role's rest (outputs_set_role()), so taking the old page again would leave the old role at its rest and not at the command it held. The commit keeps a copy of the bank's channels from before take_cfg and puts them back ahead of put_cfg when the OUTPUTS page is refused. Nothing else of the bank is put back: take_slots leaves the slots as they were when it refuses, and the pins reserved may have been brought up to date inside it.

Field Documentation

◆ keep

void(*) out_stage_ops_t::keep(void *ctx)

Called once when both pages are in force.

May be NULL.


The documentation for this struct was generated from the following file: