Skip to main content

Interface IDeviceChannelManager

Abstraction for managing device channels

Assembly: Meadow.Contracts.dll
View Source
public interface IDeviceChannelManager

Properties

SystemReservedPins

Gets or sets a list of pins that are not usable by applications

View Source
string[]? SystemReservedPins { get; set; }

Methods

ReservePin(IPin, ChannelConfigurationType)

Reserves an IPin at run-time for a specified configuration

View Source
Tuple<bool, string> ReservePin(IPin pin, ChannelConfigurationType configType)
Returns

System.Tuple<System.Boolean,System.String>

Parameters
TypeName
Meadow.Hardware.IPinpin
Meadow.Hardware.ChannelConfigurationTypeconfigType

ReleasePin(IPin)

Releases a reservation on an IPin at run-time

View Source
bool ReleasePin(IPin pin)
Returns

System.Boolean

Parameters
TypeName
Meadow.Hardware.IPinpin

ReservePwm(IPin, IPwmChannelInfo, Frequency)

Reserves an IPin for PWM use

View Source
Tuple<bool, string> ReservePwm(IPin pin, IPwmChannelInfo channelInfo, Frequency frequency)
Returns

System.Tuple<System.Boolean,System.String>

Parameters
TypeName
Meadow.Hardware.IPinpin
Meadow.Hardware.IPwmChannelInfochannelInfo
Meadow.Units.Frequencyfrequency

BeforeStartPwm(IPwmChannelInfo)

Method called before Meadow Core starts a PWM. This allows hardware-specific actions like channel reservation and setup.

View Source
void BeforeStartPwm(IPwmChannelInfo info)
Parameters
TypeName
Meadow.Hardware.IPwmChannelInfoinfo

AfterStartPwm(IPwmChannelInfo, IMeadowIOController)

Method called after Meadow Core starts a PWM. This allows hardware-specific actions like channel reservation and setup.

View Source
void AfterStartPwm(IPwmChannelInfo info, IMeadowIOController ioController)
Parameters
TypeName
Meadow.Hardware.IPwmChannelInfoinfo
Meadow.Hardware.IMeadowIOControllerioController