class PinCtrl – configure pin functions at runtime
Uses Zephyr Dynamic PinCtrl API.
This class allows configuring pin functions at runtime, either via the Dynamic PinCtrl API when device deinit is supported, or by abusing the pinctrl API to force reconfiguration via an ‘illegal’ mode.
Constructors
- class zephyr.PinCtrl(func, mode=0, pull=None, drive=0, schmitt=False, slew=0)
Gets an object defining a specific pin configuration.
funcmay be a zephyr.PinMux instance, or, depending on the PinMux capabilities a string or an integer corresponding to a PinMux.modeis the same as machine.Pin’s mode, but supports onlyPin.INandPin.OUT.pullis the same as machine.Pin’s pull.driveis the pin’s drive strength in microAmperes (uA), if supported.schmittset whether the schmitt trigger device on the pin is enabled.slewis an integer that defines the pin’s slew rate. It is platform-specific.
Methods
- PinCtrl.pinmux()
Returns the zephyr.PinMux instance used by this PinCtrl.
Attributes
- PinCtrl.MUXES
If the platform supports it, this contains a list of all possible zephyr.PinMux instances.