- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.2k
 
Open
Description
I am working on extending the spi implementation to include a slave configuration for the RP2040 hal.
This does require a resetting of the peripheral and I am not sure how to interact with these functions below:
Please elaborate on usage and the meaninf of the Peripherals struct.  Is this the correct way to do a reset like:
reset(&mut p.SPI1);
In embassy_rp/src/reset.rs:
These functions are provided:
pub unsafe fn reset(peris: Peripherals) {
pac::RESETS.reset().write_value(peris);
}
pub unsafe fn unreset_wait(peris: Peripherals) {
// TODO use the "atomic clear" register version
pac::RESETS.reset().modify(|v| *v = Peripherals(v.0 & !peris.0));
while ((!pac::RESETS.reset_done().read().0) & peris.0) != 0 {}
}
Metadata
Metadata
Assignees
Labels
No labels