pub struct PruCode<'a> { /* private fields */ }
Expand description
Handle to a binary code loaded in the PRU.
Implementations§
Source§impl<'a> PruCode<'a>
impl<'a> PruCode<'a>
Sourcepub unsafe fn run(&mut self)
pub unsafe fn run(&mut self)
Executes the code loaded in the PRU.
This function writes 1 to the enable bit of the PRU control register, which allows the loaded code to be started or, if it had been stopped, to resume its execution.
§Safety
This runs a binary code that has unrestricted access to pretty much all the processor memory and peripherals. What could possibly go wrong?
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PruCode<'a>
impl<'a> RefUnwindSafe for PruCode<'a>
impl<'a> Unpin for PruCode<'a>
impl<'a> !UnwindSafe for PruCode<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more