procedure Acknowledge_Interrupt
(Slice : PWM_Slice)
procedure Advance_Phase
(Slice : PWM_Slice)
function Compare_Reg_Address (Slice : PWM_Slice) return System.Address
For DMA transfers
function Count
(Slice : PWM_Slice)
return UInt16
procedure Disable
(Slice : PWM_Slice)
procedure Disable
(Slices : PWM_Slice_Array)
procedure Disable_Interrupt
(Slice : PWM_Slice)
Divider_Fraction : constant := 1.0 / (2.0 ** 4);
procedure Enable
(Slice : PWM_Slice)
procedure Enable
(Slices : PWM_Slice_Array)
procedure Enable_Interrupt
(Slice : PWM_Slice)
function Enabled
(Slice : PWM_Slice)
return Boolean
procedure Initialize
Initialized : Boolean := False;
subtype Period is UInt16;
type PWM_Channel is (A, B);
type PWM_Divider_Mode is
(Free_Running,
Gated,
Rising_Edge,
Falling_Edge);
Slice counter only runs while channel B is high
Slice counter increments on channel B rising edge
Slice counter increments on channel B falling edge
type PWM_Point is record
Slice : PWM_Slice;
Channel : PWM_Channel;
end record;
type PWM_Slice is range 0 .. 7;
type PWM_Slice_Array is array (PWM_Slice) of Boolean;
procedure Retard_Phase
(Slice : PWM_Slice)
procedure Set_Count
(Slice : PWM_Slice;
Value : Period)
procedure Set_Divider
(Slice : PWM_Slice;
Div : Divider)
procedure Set_Duty_Cycle
(Slice : PWM_Slice;
Channel_A : Period;
Channel_B : Period)
procedure Set_Duty_Cycle
(Slice : PWM_Slice;
Channel : PWM_Channel;
Duty_Cycle : Period)
procedure Set_Frequency
(Slice : PWM_Slice;
Frequency : Hertz)
procedure Set_Interval
(Slice : PWM_Slice;
Clocks : Period)
procedure Set_Invert
(Slice : PWM_Slice;
Channel_A : Boolean;
Channel_B : Boolean)
procedure Set_Mode
(Slice : PWM_Slice;
Mode : PWM_Divider_Mode)
procedure Set_Phase_Correction
(Slice : PWM_Slice;
Enabled : Boolean)
function To_PWM
(GPIO : RP.GPIO.GPIO_Point)
return PWM_Point