mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-30 05:40:55 +00:00
Merge pull request #4495 from elliotsayes/rp-status-irq
Add IRQ StatusSource for _rp235x
This commit is contained in:
commit
a3aa1e8629
@ -98,6 +98,9 @@ pub enum StatusSource {
|
||||
TxFifoLevel = 0,
|
||||
/// All-ones if RX FIFO level < N, otherwise all-zeroes.
|
||||
RxFifoLevel = 1,
|
||||
/// All-ones if the indexed IRQ flag is raised, otherwise all-zeroes
|
||||
#[cfg(feature = "_rp235x")]
|
||||
Irq = 2,
|
||||
}
|
||||
|
||||
const RXNEMPTY_MASK: u32 = 1 << 0;
|
||||
@ -736,6 +739,7 @@ impl<'d, PIO: Instance + 'd, const SM: usize> StateMachine<'d, PIO, SM> {
|
||||
w.set_status_sel(match config.status_sel {
|
||||
StatusSource::TxFifoLevel => pac::pio::vals::ExecctrlStatusSel::TXLEVEL,
|
||||
StatusSource::RxFifoLevel => pac::pio::vals::ExecctrlStatusSel::RXLEVEL,
|
||||
StatusSource::Irq => pac::pio::vals::ExecctrlStatusSel::IRQ,
|
||||
});
|
||||
#[cfg(feature = "rp2040")]
|
||||
w.set_status_sel(match config.status_sel {
|
||||
|
Loading…
x
Reference in New Issue
Block a user