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)
@staticmethod
def GetChannelId(pin: int) -> int:
Channel index within the PWM chip to pass to PwmChannel.Create.
Returns int
GetChipId(int pin)
@staticmethod
def GetChipId(pin: int) -> int:
Kernel pwmchipN index to pass to PwmChannel.Create.
Returns int
Initialize(int pin)
@staticmethod
def Initialize(pin: int) -> None:
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)
@staticmethod
def UnInitialize(pin: int) -> None:
Releases the PWM pin back to free GPIO.