/* * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */#pragmaonce#include<stdint.h>#include"esp_err.h"#include"driver/rmt_types.h"#ifdef__cplusplusextern"C"{#endif/** * @brief RMT carrier wave configuration (for either modulation or demodulation) *//* ... */typedefstruct{uint32_tfrequency_hz;/*!< Carrier wave frequency, in Hz, 0 means disabling the carrier */floatduty_cycle;/*!< Carrier wave duty cycle (0~100%) */struct{uint32_tpolarity_active_low:1;/*!< Specify the polarity of carrier, by default it's modulated to base signal's high level */uint32_talways_on:1;/*!< If set, the carrier can always exist even there's not transfer undergoing */}{ ... }flags;/*!< Carrier config flags */}{ ... }rmt_carrier_config_t;/** * @brief Delete an RMT channel * * @param[in] channel RMT generic channel that created by `rmt_new_tx_channel()` or `rmt_new_rx_channel()` * @return * - ESP_OK: Delete RMT channel successfully * - ESP_ERR_INVALID_ARG: Delete RMT channel failed because of invalid argument * - ESP_ERR_INVALID_STATE: Delete RMT channel failed because it is still in working * - ESP_FAIL: Delete RMT channel failed because of other error *//* ... */esp_err_trmt_del_channel(rmt_channel_handle_tchannel);/** * @brief Apply modulation feature for TX channel or demodulation feature for RX channel * * @param[in] channel RMT generic channel that created by `rmt_new_tx_channel()` or `rmt_new_rx_channel()` * @param[in] config Carrier configuration. Specially, a NULL config means to disable the carrier modulation or demodulation feature * @return * - ESP_OK: Apply carrier configuration successfully * - ESP_ERR_INVALID_ARG: Apply carrier configuration failed because of invalid argument * - ESP_FAIL: Apply carrier configuration failed because of other error *//* ... */esp_err_trmt_apply_carrier(rmt_channel_handle_tchannel,constrmt_carrier_config_t*config);/** * @brief Enable the RMT channel * * @note This function will acquire a PM lock that might be installed during channel allocation * * @param[in] channel RMT generic channel that created by `rmt_new_tx_channel()` or `rmt_new_rx_channel()` * @return * - ESP_OK: Enable RMT channel successfully * - ESP_ERR_INVALID_ARG: Enable RMT channel failed because of invalid argument * - ESP_ERR_INVALID_STATE: Enable RMT channel failed because it's enabled already * - ESP_FAIL: Enable RMT channel failed because of other error *//* ... */esp_err_trmt_enable(rmt_channel_handle_tchannel);/** * @brief Disable the RMT channel * * @note This function will release a PM lock that might be installed during channel allocation * * @param[in] channel RMT generic channel that created by `rmt_new_tx_channel()` or `rmt_new_rx_channel()` * @return * - ESP_OK: Disable RMT channel successfully * - ESP_ERR_INVALID_ARG: Disable RMT channel failed because of invalid argument * - ESP_ERR_INVALID_STATE: Disable RMT channel failed because it's not enabled yet * - ESP_FAIL: Disable RMT channel failed because of other error *//* ... */esp_err_trmt_disable(rmt_channel_handle_tchannel);#ifdef__cplusplus}{...}#endif
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.