Struct prusst::PruCode
[−]
[src]
pub struct PruCode<'a> { /* fields omitted */ }
Handle to a binary code loaded in the PRU.
Methods
impl<'a> PruCode<'a>
[src]
unsafe fn run(&mut self)
[src]
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?
fn halt(&mut self)
[src]
Halts the execution of code running in the PRU.
This function simply writes 0 to the enable bit of the PRU Control Register. If code was
currently running, it will be stopped. Execution of the code can be resumed with a
subsequent call to run
.
fn reset(&mut self)
[src]
Resets the PRU.
Invokes a soft reset by clearing the PRU control register.