Open jonathangjertsen opened 3 years ago
You might only want to clear one flag (and leave the others set) rather than clearing all flags? Might make sense to have e.g.
static inline pio_fifo_debug_flags_t pio_sm_get_fifo_debug_flags(PIO pio, uint sm) { ... }
static inline void pio_sm_clear_fifo_debug_flags(PIO pio, uint sm, pio_fifo_debug_flags_t clear) { ... }
:man_shrugging: (disclaimer: I've never actually done any PIO debugging!)
AFAICT the only way to get at the contents of the PIO FIFO debug register is to access the
fdebug
field on the PIO struct and do the appropriate bit manipulations. It would be nice with a more convenient helper function.One possible API is
where
pio_fifo_debug_flags_t
is a struct with one bool for each flag, and theclear
parameter selects whether or not to clear the flags afterwards.