Class RmtChannel
- Namespace
- nanoFramework.Hardware.Esp32.Rmt
- Assembly
- nanoFramework.Hardware.Esp32.Rmt.dll
Base class for a RMT channel
public abstract class RmtChannel
- Inheritance
-
RmtChannel
- Derived
- Inherited Members
- Extension Methods
Constructors
RmtChannel(RmtChannelSettings)
Initializes a new instance of the RmtChannel class.
protected RmtChannel(RmtChannelSettings settings)
Parameters
settings
RmtChannelSettingsA RmtChannelSettings instance to configure the channel.
Exceptions
- ArgumentNullException
settings
cannot be null.
Fields
_settings
The RmtChannel settings instance.
protected readonly RmtChannelSettings _settings
Field Value
Properties
Channel
Gets the channel number for this instance.
public int Channel { get; }
Property Value
ClockDivider
The value can be between 1 and 255 and affects all RMT channels.
public byte ClockDivider { get; set; }
Property Value
Mode
Gets the current ChannelMode for this instance.
public abstract ChannelMode Mode { get; }
Property Value
NumberOfMemoryBlocks
Gets or sets the number of memory blocks available to the current channel.
public byte NumberOfMemoryBlocks { get; set; }
Property Value
Remarks
This function is used to configure the amount of memory blocks allocated to a channel. The 8 channels share a 512x32-bit RAM block which can be read and written by the processor cores over the APB bus, as well as read by the transmitters and written by the receivers. This means that every channel gets a single memory block equaling 64x32-bit. If memory block number of one channel is set to a value greater than 1, this channel will occupy the memory block of the next channel. Channel 0 can use at most 8 blocks of memory, accordingly channel 7 can only use one memory block.
Pin
Gets or sets the GPIO pin used with the current channel.
public int Pin { get; set; }
Property Value
SourceClock
Gets the source clock type. This is currently fixed to use APB clock so will always be APB in the current implementation.
public static SourceClock SourceClock { get; }
Property Value
Remarks
ESP IDF v5.1.4 supports only APB for ESP32. This property cannot be changed.
Exceptions
SourceClockFrequency
Returns the actual frequency of the source clock used by the hardware when clock source is set to default. This is currently 80Mhz for all devices except ESP32_H2 which is 32Mhz. This should be used to calculate timings on rmtChannel.
public static int SourceClockFrequency { get; }