Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

wait_or_abort

Function wait_or_abort 

Source
pub fn wait_or_abort(ch: Channel, spins: u32) -> bool
Expand description

End a transfer started with start: wait_done; if the budget runs out, abort the channel and wait again, within the same budget, for it to read idle; then a compiler barrier so the caller’s next RAM access to the buffer is not moved before the completion read (the barrier emits no instruction). false means the data did not all land.

The second wait is there because clearing START is not documented to stop a running transfer (see abort). What it leaves assumed: a channel that still reads busy after both budgets is wedged and moving no data, as the CD channel’s console wedges were (START latched, MADR frozen). Burst-mode channels without chopping need no assumption; see OrderingTableClearDma::clear_table.