Skip to content

Commit 318d7ff

Browse files
committed
Using constant for defining queue size.
1 parent 904ee61 commit 318d7ff

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Shared.hpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@
2525

2626
#include <mbed.h>
2727

28+
/**************************************************************************************
29+
* CONSTANT
30+
**************************************************************************************/
31+
32+
static size_t constexpr SHARED_QUEUE_SIZE = 16;
33+
2834
/**************************************************************************************
2935
* CLASS DECLARATION
3036
**************************************************************************************/
3137

32-
template<class T, size_t QUEUE_SIZE = 16>
38+
template<class T, size_t QUEUE_SIZE = SHARED_QUEUE_SIZE>
3339
class Shared
3440
{
3541
public:
@@ -43,6 +49,7 @@ class Shared
4349

4450
T _val;
4551
rtos::Mail<T, QUEUE_SIZE> _mailbox;
52+
4653
};
4754

4855
/**************************************************************************************

0 commit comments

Comments
 (0)