[Overview][Types][Classes][Index] Reference for unit 'fppwm' (#pascalio)

TPWMLinux

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

PWM implementation based on Linux SysFS user space interface

Declaration

Source position: fppwm.pas line 69

type TPWMLinux = class(TPWM)

strict protected

  function GetDutyCycle; override;

  function GetEnabled; override;

  function GetPeriod; override;

  function GetPolarity; override;

  procedure SetDutyCycle(); override;

  procedure SetEnabled(); override;

  procedure SetPeriod(); override;

  procedure SetPolarity(); override;

  class procedure SetExport();

  

Exports or unexports PWM channel

public

  property ChipCount: LongInt; [r]

  

Returns the chip count visible in SysFS

  property ChannelCount []: LongInt; [r]

  

Channel cound provided by given chip

  property Chip: LongInt; [r]

  

The used PWM chip

  property Channel: LongInt; [r]

  

The used PWM channel

  constructor Create();

  

Creates a new PWM object

  destructor Destroy; override;

  

Unexports PWM channel and destroys object

end;

Inheritance

TPWMLinux

  

PWM implementation based on Linux SysFS user space interface

|

TPWM

  

Abstract PWM access class

|

TObject

Example

program pwm_linux;

uses fppwm;

var
  pwm: TPWMLinux;
begin
  pwm := TPWMLinux.Create(0,0);
  try
    pwm.Period    := 10000;  // 10 kHz total time
    pwm.DutyCycle := 6000;   //  6 kHz active time
    pwm.Enabled   := True;
  finally
    pwm.Destroy;
  end;
end.


Documentation generated on: 2020-05-22