pub struct Slice<I, M> where
    I: SliceId,
    M: SliceMode + ValidSliceMode<I>, 
{ pub channel_a: Channel<I, M, A>, pub channel_b: Channel<I, M, B>, /* private fields */ }
Expand description

Pwm slice

Fields

channel_a: Channel<I, M, A>

Channel A (always output)

channel_b: Channel<I, M, B>

Channel B (input or output)

Implementations

Convert the slice to the requested SliceMode

Set a default config for the slice

Advance the phase with one count

Counter must be running at less than full speed (div_int + div_frac / 16 > 1)

Retard the phase with one count

Counter must be running at less than full speed (div_int + div_frac / 16 > 1)

Enable phase correct mode

Disables phase correct mode

Enable slice

Disable slice

Sets the integer part of the clock divider

Sets the fractional part of the clock divider

Get the counter register value

Set the counter register value

Get the top register value

Sets the top register value

Enable the PWM_IRQ_WRAP interrupt when this slice overflows.

Disable the PWM_IRQ_WRAP interrupt for this slice.

Did this slice trigger an overflow interrupt?

Mark the interrupt handled for this slice.

Force the interrupt. This bit is not cleared by hardware and must be manually cleared to stop the interrupt from continuing to be asserted.

Clear force interrupt. This bit is not cleared by hardware and must be manually cleared to stop the interrupt from continuing to be asserted.

Capture a gpio pin and use it as pwm output

Capture a gpio pin and use it as pwm input for channel B

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.