RP.PWM

Simple types

PWM_Channel
type PWM_Channel is (A, B);
PWM_Divider_Mode
type PWM_Divider_Mode is
   (Free_Running,
    Gated,
    Rising_Edge,
    Falling_Edge);
@enum Free_Running @enum Gated Slice counter only runs while channel B is high @enum Rising_Edge Slice counter increments on channel B rising edge @enum Falling_Edge Slice counter increments on channel B falling edge
PWM_Slice
type PWM_Slice is range 0 .. 7;

Array types

PWM_Slice_Array
type PWM_Slice_Array is array (PWM_Slice) of Boolean;

Record types

PWM_Point
type PWM_Point is record
   Slice   : PWM_Slice;
   Channel : PWM_Channel;
end record;

Subtypes

Period
subtype Period is UInt16;

Constants

Divider_Fraction
Divider_Fraction : constant := 1.0 / (2.0 ** 4);

Variables

Initialized
Initialized : Boolean := False;