Modify the rmt_mem_num maximum limit value from 15 to 8.

pull/2108/merge
XiongYu 2018-07-09 19:22:31 +08:00
rodzic 70f3933db1
commit 6d57757840
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -137,7 +137,7 @@ esp_err_t rmt_get_rx_idle_thresh(rmt_channel_t channel, uint16_t *thresh)
esp_err_t rmt_set_mem_block_num(rmt_channel_t channel, uint8_t rmt_mem_num) esp_err_t rmt_set_mem_block_num(rmt_channel_t channel, uint8_t rmt_mem_num)
{ {
RMT_CHECK(channel < RMT_CHANNEL_MAX, RMT_CHANNEL_ERROR_STR, ESP_ERR_INVALID_ARG); RMT_CHECK(channel < RMT_CHANNEL_MAX, RMT_CHANNEL_ERROR_STR, ESP_ERR_INVALID_ARG);
RMT_CHECK(rmt_mem_num < 16, RMT_MEM_CNT_ERROR_STR, ESP_ERR_INVALID_ARG); RMT_CHECK(rmt_mem_num <= RMT_CHANNEL_MAX - channel, RMT_MEM_CNT_ERROR_STR, ESP_ERR_INVALID_ARG);
RMT.conf_ch[channel].conf0.mem_size = rmt_mem_num; RMT.conf_ch[channel].conf0.mem_size = rmt_mem_num;
return ESP_OK; return ESP_OK;
} }