kopia lustrzana https://github.com/espressif/esp-idf
freertos tests: Use CCOMPARE1 always in xPortInIsrContext() test
Mismatched CCOMPARE meant test would only run once.pull/466/merge
rodzic
3f68c5e988
commit
304f0a399a
|
@ -31,12 +31,13 @@ static void testthread(void *arg) {
|
||||||
in_int_context=0;
|
in_int_context=0;
|
||||||
int_handled=0;
|
int_handled=0;
|
||||||
TEST_ASSERT(!xPortInIsrContext());
|
TEST_ASSERT(!xPortInIsrContext());
|
||||||
xthal_set_ccompare(2, xthal_get_ccount()+8000000);
|
xthal_set_ccompare(1, xthal_get_ccount()+8000000);
|
||||||
esp_intr_alloc(ETS_INTERNAL_TIMER1_INTR_SOURCE, 0, &testint, NULL, &handle);
|
esp_err_t err = esp_intr_alloc(ETS_INTERNAL_TIMER1_INTR_SOURCE, 0, &testint, NULL, &handle);
|
||||||
|
TEST_ASSERT_EQUAL_HEX32(ESP_OK, err);
|
||||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
TEST_ASSERT(int_handled);
|
TEST_ASSERT(int_handled);
|
||||||
TEST_ASSERT(in_int_context);
|
TEST_ASSERT(in_int_context);
|
||||||
esp_intr_free(handle);
|
TEST_ASSERT_EQUAL_HEX32( ESP_OK, esp_intr_free(handle) );
|
||||||
vTaskDelete(NULL);
|
vTaskDelete(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue