Class RmtChannelSettings
- Namespace
- nanoFramework.Hardware.Esp32.Rmt
- Assembly
- nanoFramework.Hardware.Esp32.Rmt.dll
Base class for shared RMT Channel settings.
public abstract class RmtChannelSettings
- Inheritance
-
RmtChannelSettings
- Derived
- Inherited Members
- Extension Methods
Constructors
RmtChannelSettings(int)
Initializes a new instance of the RmtChannelSettings class.
protected RmtChannelSettings(int pinNumber)
Parameters
pinNumber
intThe GPIO Pin number to use with the channel.
RmtChannelSettings(int, int)
Initializes a new instance of the RmtChannelSettings class.
protected RmtChannelSettings(int channel, int pinNumber)
Parameters
channel
intThe channel number to use. Valid value range is 0 to 7 (inclusive).
pinNumber
intThe GPIO Pin number to use with the channel.
Exceptions
- ArgumentOutOfRangeException
channel
must be between 0 and 7.
Properties
BufferSize
Gets or sets the RMT Ring Buffer size.
public int BufferSize { get; set; }
Property Value
Remarks
The ring buffer is available in transmit and receive channels. For receive channels, Incoming RmtCommands are moved to the ring buffer after the IdleThreshold has lapsed. For transmit channels, RmtCommands are automatically copied over to the channel's memory block and written to the transmitter.
Channel
Gets or sets the channel number.
public int Channel { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Value cannot be less than 0 or more than 7.
ClockDivider
Gets or sets the clock divider value.
public byte ClockDivider { get; set; }
Property Value
Remarks
ESP IDF v4.4.3 only supports the APB bus clock @ 80Mhz. The default value for the divider is 80 (80Mhz / 80 = 1Mhz = 1us ticks).
Exceptions
- ArgumentOutOfRangeException
Value cannot be less than 1.
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.
Exceptions
- ArgumentOutOfRangeException
Value cannot be 0 or more than 8.
PinNumber
Gets or sets the GPIO pin number to be used with the specified channel.
public int PinNumber { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Value cannot be less than 0.
SignalInverterEnabled
Gets or sets a value indicating if the RMT module should invert the incoming/outgoing signal.
public bool SignalInverterEnabled { get; set; }
Property Value
Remarks
This works like an external inverter connected to the GPIO of certain RMT channel.