summaryrefslogtreecommitdiff
path: root/bsp/nrf5x
diff options
context:
space:
mode:
authorHan Xinrong <[email protected]>2020-12-07 20:13:03 +0800
committerHan Xinrong <[email protected]>2020-12-09 22:24:01 +0800
commit3bb8edf4c1b9b0a8ecb1cd9072da3e5edc3502b0 (patch)
treea5496a0655ce5e752b37ba5e10badd7109caea92 /bsp/nrf5x
parent3f122bd790231ad097cc2346fa574a660eb294da (diff)
error check of rt_event_recv()
add error check
Diffstat (limited to 'bsp/nrf5x')
-rw-r--r--bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c b/bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c
index f4a51493ed..0ce3d43a36 100644
--- a/bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c
+++ b/bsp/nrf5x/libraries/templates/nrf52x/applications/ble_nus_app.c
@@ -599,9 +599,11 @@ static void _stack_thread(void *parameter)
{
rt_uint32_t event = 0;
rt_tick_t dispatch_timeout = RT_WAITING_NO;
+ rt_err_t result;
- rt_event_recv(stack_event, STACK_EV_DISCON | STACK_EV_DISPATCH | STACK_EV_KEY,
+ result = rt_event_recv(stack_event, STACK_EV_DISCON | STACK_EV_DISPATCH | STACK_EV_KEY,
RT_EVENT_FLAG_OR | RT_EVENT_FLAG_CLEAR, next_timeout, &event);
+ RT_ASSERT(result == RT_EOK);
if (evt_dispatch_worker() != RT_EOK)
{