Chapter 2. API Reference
Enumerations
enum pcnt_channel_level_action_t
PCNT channel action on control level.
Values:
PCNT_CHANNEL_LEVEL_ACTION_KEEP
Keep current count mode
PCNT_CHANNEL_LEVEL_ACTION_INVERSE
Invert current count mode (increase -> decrease, decrease -> increase)
PCNT_CHANNEL_LEVEL_ACTION_HOLD
Hold current count value
enum pcnt_channel_edge_action_t
PCNT channel action on signal edge.
Values:
PCNT_CHANNEL_EDGE_ACTION_HOLD
Hold current count value
PCNT_CHANNEL_EDGE_ACTION_INCREASE
Increase count value
PCNT_CHANNEL_EDGE_ACTION_DECREASE
Decrease count value
enum pcnt_unit_count_sign_t
PCNT unit counter value’s sign.
Values:
PCNT_UNIT_COUNT_SIGN_ZERO_POS
positive value to zero
PCNT_UNIT_COUNT_SIGN_ZERO_NEG
negative value to zero
PCNT_UNIT_COUNT_SIGN_NEG
counter value negative
PCNT_UNIT_COUNT_SIGN_POS
counter value positive
2.2.13 Remote Control (RMT)
The RMT (Remote Control) module driver can be used to send and receive infrared remote control signals. Due to
flexibility of RMT module, the driver can also be used to generate or receive many other types of signals.
The signal, which consists of a series of pulses, is generated by RMT’s transmitter based on a list of values. The
values define the pulse duration and a binary level, see below. The transmitter can also provide a carrier and modulate
it with provided pulses.
The reverse operation is performed by the receiver, where a series of pulses is decoded into a list of values containing
the pulse duration and binary level. A filter may be applied to remove high frequency noise from the input signal.
There couple of typical steps to setup and operate the RMT and they are discussed in the following sections:
1. Configure Driver
2. Transmit Data or Receive Data
3. Change Operation Parameters
4. Use Interrupts
The RMT has four channels numbered from zero to three. Each channel is able to independently transmit or receive
data. They are referred to using indexes defined in structure rmt_channel_t.
Espressif Systems 338
Submit Document Feedback
Release v4.4