Ja bin ich blöd?
1 |
void rmt_tx_init()
|
2 |
{
|
3 |
|
4 |
rmt_channel_handle_t tx_chan = NULL;
|
5 |
|
6 |
rmt_tx_channel_config_t tx_chan_config = {
|
7 |
.clk_src = RMT_CLK_SRC_DEFAULT, // select source clock
|
8 |
.gpio_num = 33, // GPIO number
|
9 |
.mem_block_symbols = 64, // memory block size, 64 * 4 = 256 Bytes
|
10 |
.resolution_hz = 1 * 1000 * 1000, // 1 MHz tick resolution, i.e., 1 tick = 1 µs
|
11 |
.trans_queue_depth = 4, // set the number of transactions that can pend in the background
|
12 |
.flags.invert_out = false, // do not invert output signal
|
13 |
.flags.with_dma = false, // do not need DMA backend
|
14 |
};
|
15 |
ESP_ERROR_CHECK(rmt_new_tx_channel(&tx_chan_config, &tx_chan));
|
16 |
|
17 |
rmt_carrier_config_t tx_carrier_cfg = {
|
18 |
.duty_cycle = 0.33, // duty cycle 33%
|
19 |
.frequency_hz = 38000, // 38 KHz
|
20 |
.flags.polarity_active_low = false, // carrier should be modulated to high level
|
21 |
.always_on = true, // If set, the carrier can always exist even there's not transfer undergoing
|
22 |
};
|
23 |
// modulate carrier to TX channel
|
24 |
ESP_ERROR_CHECK(rmt_apply_carrier(tx_chan, &tx_carrier_cfg));
|
25 |
|
26 |
}
|
error: 'rmt_carrier_config_t' has no member named 'always_on'
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/rmt.html#_CPPv420rmt_carrier_config_t
????