mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(gptimer): check the alarm config is not in flash
related to https://github.com/espressif/esp-idf/issues/13543
This commit is contained in:
parent
8248477524
commit
1ca8de6e89
@ -272,6 +272,9 @@ esp_err_t gptimer_set_alarm_action(gptimer_handle_t timer, const gptimer_alarm_c
|
||||
{
|
||||
ESP_RETURN_ON_FALSE_ISR(timer, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
|
||||
if (config) {
|
||||
#if CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM
|
||||
ESP_RETURN_ON_FALSE_ISR(esp_ptr_internal(config), ESP_ERR_INVALID_ARG, TAG, "alarm config struct not in internal RAM");
|
||||
#endif
|
||||
// When auto_reload is enabled, alarm_count should not be equal to reload_count
|
||||
bool valid_auto_reload = !config->flags.auto_reload_on_alarm || config->alarm_count != config->reload_count;
|
||||
ESP_RETURN_ON_FALSE_ISR(valid_auto_reload, ESP_ERR_INVALID_ARG, TAG, "reload count can't equal to alarm count");
|
||||
|
@ -334,9 +334,6 @@ static void test_rmt_receive_filter(rmt_clock_source_t clk_src)
|
||||
rmt_channel_handle_t rx_channel = NULL;
|
||||
TEST_ESP_OK(rmt_new_rx_channel(&rx_channel_cfg, &rx_channel));
|
||||
|
||||
// initialize the GPIO level to low
|
||||
TEST_ESP_OK(gpio_set_level(TEST_RMT_GPIO_NUM_A, 0));
|
||||
|
||||
printf("register rx event callbacks\r\n");
|
||||
rmt_rx_event_callbacks_t cbs = {
|
||||
.on_recv_done = test_rmt_received_done,
|
||||
|
Loading…
x
Reference in New Issue
Block a user