Merge pull request #14881 from jeromecoutant/PR_LED1

Standard Pin Name: LED1 issue for targets without LED
pull/14870/head
Martin Kojtal 2021-07-07 17:53:44 +02:00 committed by GitHub
commit e145ae3acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -76,6 +76,7 @@ void test_case_basic()
"The quick brown fox jumps over the lazy dog");
}
#ifdef LED1
void test_case_blinky()
{
static DigitalOut myled(LED1);
@ -84,6 +85,7 @@ void test_case_blinky()
myled = !myled;
}
}
#endif
void test_case_cpp_stack()
{
@ -113,7 +115,9 @@ utest::v1::status_t greentea_failure_handler(const Case *const source, const fai
// Generic test cases
Case cases[] = {
Case("Basic", test_case_basic, greentea_failure_handler),
#ifdef LED1
Case("Blinky", test_case_blinky, greentea_failure_handler),
#endif
Case("C++ stack", test_case_cpp_stack, greentea_failure_handler),
Case("C++ heap", test_case_cpp_heap, greentea_failure_handler)
};

View File

@ -59,7 +59,6 @@ float chisq(float sigma)
Timer timer;
DigitalOut led(LED1);
equeue_sema_t sema;
@ -120,8 +119,6 @@ void semaphore_timing_test()
}
TEST_ASSERT_INT_WITHIN(5000, taken, delay * 1000);
led = !led;
}
equeue_sema_destroy(&sema);

View File

@ -24,8 +24,8 @@
Requirements specified in docs/design-documents/hal/0004-pin-names-general-guidelines.md
*/
#ifndef LED1
#error [NOT_SUPPORTED] Target is not following mbed-os pin names standard // Test is set as Skipped
#if !defined LED1 && !defined BUTTON1
#error [NOT_SUPPORTED] Target doesn't have any LED and BUTTON
#else
using namespace utest::v1;