Class RmtChannel
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
settingsRmtChannelSettingsA RmtChannelSettings instance to configure the channel.
Exceptions
- ArgumentNullException
settingscannot be null.
Fields
_settings
The RmtChannel settings instance.
protected readonly RmtChannelSettings _settings
Field Value
Properties
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 number of memory blocks allocated to a channel. The size of the memory block depends on the target ESP32 and is normally 64x32-bit or 48x32-bit, and the maximum number of blocks that can be allocated is the number of channels available on target.
List of memory block sizes for various ESP32 targets:
- ESP32: 8 Channels of 64x32-bit = 512x32-bit RAM block total
- ESP32_S2: 8 Channels of 64x32-bit = 512x32-bit RAM
- ESP32_S3: 8 Channels of 64x32-bit = 512x32-bit RAM
- ESP32_C3: 4 Channels of 48x32-bit = 192x32-bit RAM
- ESP32_C5: 4 Channels of 48x32-bit = 192x32-bit RAM
- ESP32_C6: 4 Channels of 48x32-bit = 192x32-bit RAM
- ESP32_P4: 8 Channels of 48x32-bit = 384x32-bit RAM
- ESP32_H2: 4 Channels of 48x32-bit = 192x32-bit RAM
This means that every channel gets a single memory block equaling 64x32-bit or 48x32-bit. If the number of memory blocks of one channel is set to a value greater than 1, this channel will occupy the memory block of the next channel. The first Channel can use at most 8/4 blocks of memory, accordingly last channel 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
ResolutionHz
Gets or Sets the resolution of the internal tick counter. This effects all RMT channels. The default value is 1000000 (1Mhz) giving a tick period of 1 µs.
public int ResolutionHz { get; set; }