From deadcee06cee7d0bb3f4686a7ed385411d1eafde Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Wed, 13 Nov 2019 14:51:14 +0200 Subject: [PATCH] Cellular: Fix queue scheduling for bare metal For non-rtos build (bare metal) cellular event queue is now scheduled by shared event queue. --- features/cellular/framework/device/CellularStateMachine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/cellular/framework/device/CellularStateMachine.cpp b/features/cellular/framework/device/CellularStateMachine.cpp index 480b108e750..08b779773bc 100644 --- a/features/cellular/framework/device/CellularStateMachine.cpp +++ b/features/cellular/framework/device/CellularStateMachine.cpp @@ -19,6 +19,7 @@ #include "CellularDevice.h" #include "CellularLog.h" #include "Thread.h" +#include "mbed_shared_queues.h" #ifndef MBED_TRACE_MAX_LEVEL #define MBED_TRACE_MAX_LEVEL TRACE_LEVEL_INFO @@ -111,6 +112,8 @@ void CellularStateMachine::stop() delete _queue_thread; _queue_thread = NULL; } +#else + _queue.chain(NULL); #endif reset(); @@ -655,6 +658,8 @@ nsapi_error_t CellularStateMachine::start_dispatch() } _event_id = -1; +#else + _queue.chain(mbed_event_queue()); #endif return NSAPI_ERROR_OK; }