diff --git a/connectivity/cellular/mbed_lib.json b/connectivity/cellular/mbed_lib.json index c8a24fc2cd4..ed16d4a73a3 100644 --- a/connectivity/cellular/mbed_lib.json +++ b/connectivity/cellular/mbed_lib.json @@ -48,6 +48,10 @@ "at-handler-buffer-size" : { "help": "Size of the AT handler buffer", "value": 32 + }, + "event-queue-size": { + "help": "The amount of events the default EventQueue should store", + "value": 10 } } } diff --git a/connectivity/cellular/source/framework/device/CellularDevice.cpp b/connectivity/cellular/source/framework/device/CellularDevice.cpp index 50d900e14ab..79417d3d8b8 100644 --- a/connectivity/cellular/source/framework/device/CellularDevice.cpp +++ b/connectivity/cellular/source/framework/device/CellularDevice.cpp @@ -39,7 +39,7 @@ CellularDevice::CellularDevice() : #if MBED_CONF_CELLULAR_USE_SMS _sms_ref_count(0), #endif //MBED_CONF_CELLULAR_USE_SMS - _info_ref_count(0), _queue(10 * EVENTS_EVENT_SIZE), _state_machine(0), + _info_ref_count(0), _queue(MBED_CONF_CELLULAR_EVENT_QUEUE_SIZE * EVENTS_EVENT_SIZE), _state_machine(0), _status_cb(), _nw(0) #ifdef MBED_CONF_RTOS_PRESENT , _queue_thread(osPriorityNormal, 2048, NULL, "cellular_queue") diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt index 2f8e40ce47d..85a5e17e062 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt @@ -15,6 +15,7 @@ target_compile_definitions(${TEST_NAME} DEVICE_INTERRUPTIN=1 MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32 + MBED_CONF_CELLULAR_EVENT_QUEUE_SIZE=10 MBED_CONF_RTOS_PRESENT=1 ) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/CMakeLists.txt b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/CMakeLists.txt index af73d4776c7..afb57309c9c 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/CMakeLists.txt +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/CMakeLists.txt @@ -21,6 +21,7 @@ target_compile_definitions(${TEST_NAME} DEVICE_INTERRUPTIN=1 MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32 + MBED_CONF_CELLULAR_EVENT_QUEUE_SIZE=10 ) target_sources(${TEST_NAME} diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/CMakeLists.txt b/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/CMakeLists.txt index 48843591c97..675f4abadf2 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/CMakeLists.txt +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/CMakeLists.txt @@ -19,6 +19,7 @@ target_compile_definitions(${TEST_NAME} DEVICE_INTERRUPTIN=1 MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32 + MBED_CONF_CELLULAR_EVENT_QUEUE_SIZE=10 ) target_sources(${TEST_NAME} diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/CMakeLists.txt b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/CMakeLists.txt index e5e66bdc927..4c2d0a574f0 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/CMakeLists.txt +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/CMakeLists.txt @@ -20,6 +20,7 @@ target_compile_definitions(${TEST_NAME} DEVICE_INTERRUPTIN=1 MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32 + MBED_CONF_CELLULAR_EVENT_QUEUE_SIZE=10 ) target_sources(${TEST_NAME}