]> granicus.if.org Git - esp-idf/commitdiff
driver: Check ledc config result in PCNT tests
authorAngus Gratton <angus@espressif.com>
Sun, 11 Aug 2019 05:48:17 +0000 (15:48 +1000)
committerbot <bot@espressif.com>
Thu, 15 Aug 2019 06:53:46 +0000 (06:53 +0000)
components/driver/test/test_pcnt.c

index af4e58fa6733e14abbb1396ed16f5bb08fc66466..90dc2c4ece91e93583d12f865b486c309f777696 100644 (file)
@@ -57,7 +57,7 @@ static void produce_pulse(void)
         .freq_hz = 1,
         .clk_cfg = LEDC_AUTO_CLK,
     };
-    ledc_timer_config(&ledc_timer);
+    ESP_ERROR_CHECK(ledc_timer_config(&ledc_timer));
 
     ledc_channel_config_t ledc_channel = {
         .speed_mode = LEDC_HIGH_SPEED_MODE,
@@ -68,7 +68,7 @@ static void produce_pulse(void)
         .duty = 100,
         .hpoint = 0,
     };
-    ledc_channel_config(&ledc_channel);
+    ESP_ERROR_CHECK(ledc_channel_config(&ledc_channel));
 }
 
 static void IRAM_ATTR pcnt_intr_handler(void *arg)