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]

[src]

Constructs an empty PRU interrupt controller configuration.

[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::S17 to Channel::C1,
    • Sysevt::S18 to Channel::C0,
    • Sysevt::S19 to Channel::C2,
    • Sysevt::S20 to Channel::C3,
    • Sysevt::S21 to Channel::C0,
    • Sysevt::S22 to Channel::C1,
  • it maps:

    • Channel::C0 to Host::Pru0,
    • Channel::C1 to Host::Pru1,
    • Channel::C2 to Host::Evtout0,
    • Channel::C3 to Host::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

[src]

Enables the specified system events.

Panics

This will panic if a system event is enabled several times.

[src]

Enables the specified host interrupts.

Panics

This will panic if a host interrupt is enabled several times.

[src]

Automatically enables system events that are already assigned to a channel.

[src]

Automatically enables host interrupts that are already mapped to a 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.

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more