Struct prusst::IntcConfig
[−]
[src]
pub struct IntcConfig { /* fields omitted */ }PRU interrupt controller configuration.
A call to the new_populated method automatically initializes the data with the same defaults
as the PRUSS_INTC_INITDATA macro of the C prussdrv library. Alternatively, a blank-state
initialization data structure can be created with new_empty and then populated with the
dedicated methods.
Methods
impl IntcConfig[src]
fn new_empty() -> IntcConfig[src]
Constructs an empty PRU interrupt controller configuration.
fn new_populated() -> IntcConfig[src]
Constructs a PRU interrupt controller configuration with a default mapping.
The mapping reflects the one defined in the PRUSS_INTC_INITDATA C macro of the C
prussdrv library, namely:
it maps:
Sysevt::S17toChannel::C1,Sysevt::S18toChannel::C0,Sysevt::S19toChannel::C2,Sysevt::S20toChannel::C3,Sysevt::S21toChannel::C0,Sysevt::S22toChannel::C1,
it maps:
Channel::C0toHost::Pru0,Channel::C1toHost::Pru1,Channel::C2toHost::Evtout0,Channel::C3toHost::Evtout1,
it enables:
Sysevt::S17,Sysevt::S18,Sysevt::S19,Sysevt::S20,Sysevt::S21,Sysevt::S22,
it enables:
Host::Pru0,Host::Pru1,Host::Evtout0,Host::Evtout1
fn enable_sysevts(&mut self, sysevts: &[Sysevt])[src]
Enables the specified system events.
Panics
This will panic if a system event is enabled several times.
fn enable_hosts(&mut self, hosts: &[Host])[src]
Enables the specified host interrupts.
Panics
This will panic if a host interrupt is enabled several times.
fn auto_enable_sysevts(&mut self)[src]
Automatically enables system events that are already assigned to a channel.
fn auto_enable_hosts(&mut self)[src]
Automatically enables host interrupts that are already mapped to a channel.
fn map_sysevts_to_channels(&mut self, scmap: &[(Sysevt, Channel)])[src]
Assigns system events to channels.
A channel can be targeted by several events but an event can be mapped to only one channel.
Panics
This will panic if a system event is mapped to several channels simultaneously.
fn map_channels_to_hosts(&mut self, chmap: &[(Channel, Host)])[src]
Assigns channel numbers to host interrupts.
A host interrupt can be targeted by several channels but a channel can be mapped to only one host.
Panics
This will panic if a channel is mapped to several hosts.
Trait Implementations
impl Clone for IntcConfig[src]
fn clone(&self) -> IntcConfig[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more