Revision 1e5f7648 os/unittests/periphery-lld/src/ut_alld_mpr121.c
| os/unittests/periphery-lld/src/ut_alld_mpr121.c | ||
|---|---|---|
| 135 | 135 |
do {
|
| 136 | 136 |
aosSysGetUptime(&tcurrent); |
| 137 | 137 |
const aos_timestamp_t ttimeout = MICROSECONDS_PER_SECOND - ((tcurrent - tstart) % MICROSECONDS_PER_SECOND); |
| 138 |
const eventmask_t emask = chEvtWaitOneTimeout(EVENT_MASK(INTERRUPT_EVENT_ID), TIME_US2I(ttimeout));
|
|
| 138 |
const eventmask_t emask = chEvtWaitOneTimeout(EVENT_MASK(INTERRUPT_EVENT_ID), chTimeUS2I(ttimeout));
|
|
| 139 | 139 |
const eventflags_t eflags = chEvtGetAndClearFlags(&event_listener); |
| 140 | 140 |
if (emask == EVENT_MASK(INTERRUPT_EVENT_ID) && eflags == ((ut_mpr121data_t*)ut->data)->evtflags) {
|
| 141 | 141 |
// interrupt detected |
Also available in: Unified diff