|
23 | 23 | #include "greentea-client/test_env.h"
|
24 | 24 |
|
25 | 25 | #include "Semaphore.h"
|
| 26 | +#include "ThisThread.h" |
26 | 27 |
|
27 | 28 | #include "mbed_trace.h"
|
28 | 29 | #define TRACE_GROUP "RTST"
|
@@ -61,39 +62,39 @@ static volatile event_t received_event;
|
61 | 62 |
|
62 | 63 | static void tx_done()
|
63 | 64 | {
|
64 |
| - ThisThread::sleep_for(2); |
| 65 | + rtos::ThisThread::sleep_for(2); |
65 | 66 | TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
66 | 67 | received_event = EV_TX_DONE;
|
67 | 68 | TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
68 | 69 | }
|
69 | 70 |
|
70 | 71 | static void tx_timeout()
|
71 | 72 | {
|
72 |
| - ThisThread::sleep_for(2); |
| 73 | + rtos::ThisThread::sleep_for(2); |
73 | 74 | TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
74 | 75 | received_event = EV_TX_TIMEOUT;
|
75 | 76 | TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
76 | 77 | }
|
77 | 78 |
|
78 | 79 | static void rx_done(const uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)
|
79 | 80 | {
|
80 |
| - ThisThread::sleep_for(2); |
| 81 | + rtos::ThisThread::sleep_for(2); |
81 | 82 | TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
82 | 83 | received_event = EV_RX_DONE;
|
83 | 84 | TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
84 | 85 | }
|
85 | 86 |
|
86 | 87 | static void rx_timeout()
|
87 | 88 | {
|
88 |
| - ThisThread::sleep_for(2); |
| 89 | + rtos::ThisThread::sleep_for(2); |
89 | 90 | TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
90 | 91 | received_event = EV_RX_TIMEOUT;
|
91 | 92 | TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
92 | 93 | }
|
93 | 94 |
|
94 | 95 | static void rx_error()
|
95 | 96 | {
|
96 |
| - ThisThread::sleep_for(2); |
| 97 | + rtos::ThisThread::sleep_for(2); |
97 | 98 | TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
98 | 99 | received_event = EV_RX_ERROR;
|
99 | 100 | TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
@@ -146,7 +147,7 @@ void test_set_rx_config()
|
146 | 147 | 0, // payload_len,
|
147 | 148 | false, false, 0, // crc_on, freq_hop_on, hop_period,
|
148 | 149 | true, false); // iq_inverted, rx_continuous
|
149 |
| - radio->receive(100); |
| 150 | + radio->receive(); |
150 | 151 |
|
151 | 152 | TEST_ASSERT_EQUAL(RF_RX_RUNNING, radio->get_status());
|
152 | 153 |
|
|
0 commit comments