mirror of https://github.com/ARMmbed/mbed-os.git
Fix error in tests-mbed_drivers-ticker when LED not available
parent
a415dfae2d
commit
09b8d7fc5b
|
@ -71,7 +71,9 @@ void ticker_callback_1(void)
|
|||
void ticker_callback_2(void)
|
||||
{
|
||||
++callback_trigger_count;
|
||||
switch_led2_state();
|
||||
if (LED2 != NC) {
|
||||
switch_led2_state();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +112,9 @@ void test_case_1x_ticker()
|
|||
Ticker ticker;
|
||||
|
||||
led1 = 1;
|
||||
led2 = 1;
|
||||
if (LED2 != NC) {
|
||||
led2 = 1;
|
||||
}
|
||||
callback_trigger_count = 0;
|
||||
|
||||
greentea_send_kv("timing_drift_check_start", 0);
|
||||
|
@ -151,7 +155,9 @@ void test_case_2x_ticker()
|
|||
Ticker ticker1, ticker2;
|
||||
|
||||
led1 = 0;
|
||||
led2 = 1;
|
||||
if (LED2 != NC) {
|
||||
led2 = 1;
|
||||
}
|
||||
callback_trigger_count = 0;
|
||||
|
||||
ticker1.attach_us(ticker_callback_1, 2 * ONE_MILLI_SEC);
|
||||
|
|
Loading…
Reference in New Issue