Skip to main content

PwmController Class

Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core

Chip-neutral entry point for PWM setup. Call once before using Pwm.PwmChannel: it brings up the PWM channel and muxes its pin.

class PwmController {};

Methods​

GetChannelId(int pin)​

static int32_t GetChannelId(int32_t pin);

Channel index within the PWM chip to pass to PwmChannel.Create.

Returns int

GetChipId(int pin)​

static int32_t GetChipId(int32_t pin);

Kernel pwmchipN index to pass to PwmChannel.Create.

Returns int

Initialize(int pin)​

static void Initialize(int32_t pin);

Brings up a PWM channel. The argument is a pin constant from the chip's namespace (for example EPM815.Pwm.Pin.PA8 or EPN256.Pwm.Pin.PK5); only that pin is claimed.

UnInitialize(int pin)​

static void UnInitialize(int32_t pin);

Releases the PWM pin back to free GPIO.