RP.PWM

Entities

Simple Types

Array Types

Record Types

Subtypes

Constants

Variables

Subprograms

Description

Acknowledge_Interrupt

procedure Acknowledge_Interrupt
   (Slice : PWM_Slice)
Parameters
Slice

Advance_Phase

procedure Advance_Phase
   (Slice : PWM_Slice)
Parameters
Slice

Compare_Reg_Address

function Compare_Reg_Address (Slice : PWM_Slice) return System.Address

For DMA transfers

Parameters
Slice
Return Value

Count

function Count
   (Slice : PWM_Slice)
   return UInt16
Parameters
Slice
Return Value

Disable

procedure Disable
   (Slice : PWM_Slice)
Parameters
Slice

Disable

procedure Disable
   (Slices : PWM_Slice_Array)
Parameters
Slices

Disable_Interrupt

procedure Disable_Interrupt
   (Slice : PWM_Slice)
Parameters
Slice

Divider_Fraction

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

Enable

procedure Enable
   (Slice : PWM_Slice)
Parameters
Slice

Enable

procedure Enable
   (Slices : PWM_Slice_Array)
Parameters
Slices

Enable_Interrupt

procedure Enable_Interrupt
   (Slice : PWM_Slice)
Parameters
Slice

Enabled

function Enabled
   (Slice : PWM_Slice)
   return Boolean
Parameters
Slice
Return Value

Initialize

procedure Initialize

Initialized

Initialized : Boolean := False;

Period

subtype Period is UInt16;

PWM_Channel

type PWM_Channel is (A, B);
Enumeration Literal
A
B

PWM_Divider_Mode

type PWM_Divider_Mode is
   (Free_Running,
    Gated,
    Rising_Edge,
    Falling_Edge);
Enumeration Literal
Free_Running
Gated

Slice counter only runs while channel B is high

Rising_Edge

Slice counter increments on channel B rising edge

Falling_Edge

Slice counter increments on channel B falling edge

PWM_Point

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

PWM_Slice

type PWM_Slice is range 0 .. 7;

PWM_Slice_Array

type PWM_Slice_Array is array (PWM_Slice) of Boolean;

Retard_Phase

procedure Retard_Phase
   (Slice : PWM_Slice)
Parameters
Slice

Set_Count

procedure Set_Count
   (Slice : PWM_Slice;
    Value : Period)
Parameters
Slice
Value

Set_Divider

procedure Set_Divider
   (Slice : PWM_Slice;
    Div   : Divider)
Parameters
Slice
Div

Set_Duty_Cycle

procedure Set_Duty_Cycle
   (Slice     : PWM_Slice;
    Channel_A : Period;
    Channel_B : Period)
Parameters
Slice
Channel_A
Channel_B

Set_Duty_Cycle

procedure Set_Duty_Cycle
   (Slice      : PWM_Slice;
    Channel    : PWM_Channel;
    Duty_Cycle : Period)
Parameters
Slice
Channel
Duty_Cycle

Set_Frequency

procedure Set_Frequency
   (Slice     : PWM_Slice;
    Frequency : Hertz)
Parameters
Slice
Frequency

Set_Interval

procedure Set_Interval
   (Slice  : PWM_Slice;
    Clocks : Period)
Parameters
Slice
Clocks

Set_Invert

procedure Set_Invert
   (Slice     : PWM_Slice;
    Channel_A : Boolean;
    Channel_B : Boolean)
Parameters
Slice
Channel_A
Channel_B

Set_Mode

procedure Set_Mode
   (Slice : PWM_Slice;
    Mode  : PWM_Divider_Mode)
Parameters
Slice
Mode

Set_Phase_Correction

procedure Set_Phase_Correction
   (Slice   : PWM_Slice;
    Enabled : Boolean)
Parameters
Slice
Enabled

To_PWM

function To_PWM
   (GPIO : RP.GPIO.GPIO_Point)
   return PWM_Point
Parameters
GPIO
Return Value