|
1 | 1 | /* |
2 | 2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. |
3 | 3 | * Copyright 2016-2020 NXP |
4 | | - * Copyright 2020 ACRIOS Systems s.r.o. |
| 4 | + * Copyright 2020-2021 ACRIOS Systems s.r.o. |
5 | 5 | * All rights reserved. |
6 | 6 | * |
7 | 7 | * |
|
23 | 23 |
|
24 | 24 | //! @name Threading model options |
25 | 25 | //@{ |
26 | | -#define ERPC_THREADS_NONE (0) //!< No threads. |
27 | | -#define ERPC_THREADS_PTHREADS (1) //!< POSIX pthreads. |
28 | | -#define ERPC_THREADS_FREERTOS (2) //!< FreeRTOS. |
29 | | -#define ERPC_THREADS_ZEPHYR (3) //!< ZEPHYR. |
30 | | -#define ERPC_THREADS_MBED (4) //!< Mbed OS |
31 | | -#define ERPC_THREADS_WIN32 (5) //!< WIN32 |
32 | | -#define ERPC_THREADS_THREADX (6) //!< THREADX |
| 26 | +#define ERPC_ALLOCATION_POLICY_DYNAMIC (0U) //!< Dynamic allocation policy |
| 27 | +#define ERPC_ALLOCATION_POLICY_STATIC (1U) //!< Static allocation policy |
33 | 28 |
|
34 | | -#define ERPC_NOEXCEPT_DISABLED (0) //!< Disabling noexcept feature. |
35 | | -#define ERPC_NOEXCEPT_ENABLED (1) //!< Enabling noexcept feature. |
| 29 | +#define ERPC_THREADS_NONE (0U) //!< No threads. |
| 30 | +#define ERPC_THREADS_PTHREADS (1U) //!< POSIX pthreads. |
| 31 | +#define ERPC_THREADS_FREERTOS (2U) //!< FreeRTOS. |
| 32 | +#define ERPC_THREADS_ZEPHYR (3U) //!< ZEPHYR. |
| 33 | +#define ERPC_THREADS_MBED (4U) //!< Mbed OS |
| 34 | +#define ERPC_THREADS_WIN32 (5U) //!< WIN32 |
| 35 | +#define ERPC_THREADS_THREADX (6U) //!< THREADX |
36 | 36 |
|
37 | | -#define ERPC_NESTED_CALLS_DISABLED (0) //!< No nested calls support. |
38 | | -#define ERPC_NESTED_CALLS_ENABLED (1) //!< Nested calls support. |
| 37 | +#define ERPC_NOEXCEPT_DISABLED (0U) //!< Disabling noexcept feature. |
| 38 | +#define ERPC_NOEXCEPT_ENABLED (1U) //!< Enabling noexcept feature. |
39 | 39 |
|
40 | | -#define ERPC_NESTED_CALLS_DETECTION_DISABLED (0) //!< Nested calls detection disabled. |
41 | | -#define ERPC_NESTED_CALLS_DETECTION_ENABLED (1) //!< Nested calls detection enabled. |
| 40 | +#define ERPC_NESTED_CALLS_DISABLED (0U) //!< No nested calls support. |
| 41 | +#define ERPC_NESTED_CALLS_ENABLED (1U) //!< Nested calls support. |
42 | 42 |
|
43 | | -#define ERPC_MESSAGE_LOGGING_DISABLED (0) //!< Trace functions disabled. |
44 | | -#define ERPC_MESSAGE_LOGGING_ENABLED (1) //!< Trace functions enabled. |
| 43 | +#define ERPC_NESTED_CALLS_DETECTION_DISABLED (0U) //!< Nested calls detection disabled. |
| 44 | +#define ERPC_NESTED_CALLS_DETECTION_ENABLED (1U) //!< Nested calls detection enabled. |
45 | 45 |
|
46 | | -#define ERPC_TRANSPORT_MU_USE_MCMGR_DISABLED (0) //!< Do not use MCMGR for MU ISR management. |
47 | | -#define ERPC_TRANSPORT_MU_USE_MCMGR_ENABLED (1) //!< Use MCMGR for MU ISR management. |
| 46 | +#define ERPC_MESSAGE_LOGGING_DISABLED (0U) //!< Trace functions disabled. |
| 47 | +#define ERPC_MESSAGE_LOGGING_ENABLED (1U) //!< Trace functions enabled. |
48 | 48 |
|
49 | | -#define ERPC_PRE_POST_ACTION_DISABLED (0) //!< Pre post shim callbacks functions disabled. |
50 | | -#define ERPC_PRE_POST_ACTION_ENABLED (1) //!< Pre post shim callback functions enabled. |
| 49 | +#define ERPC_TRANSPORT_MU_USE_MCMGR_DISABLED (0U) //!< Do not use MCMGR for MU ISR management. |
| 50 | +#define ERPC_TRANSPORT_MU_USE_MCMGR_ENABLED (1U) //!< Use MCMGR for MU ISR management. |
51 | 51 |
|
52 | | -#define ERPC_PRE_POST_ACTION_DEFAULT_DISABLED (0) //!< Pre post shim default callbacks functions disabled. |
53 | | -#define ERPC_PRE_POST_ACTION_DEFAULT_ENABLED (1) //!< Pre post shim default callback functions enabled. |
| 52 | +#define ERPC_PRE_POST_ACTION_DISABLED (0U) //!< Pre post shim callbacks functions disabled. |
| 53 | +#define ERPC_PRE_POST_ACTION_ENABLED (1U) //!< Pre post shim callback functions enabled. |
| 54 | + |
| 55 | +#define ERPC_PRE_POST_ACTION_DEFAULT_DISABLED (0U) //!< Pre post shim default callbacks functions disabled. |
| 56 | +#define ERPC_PRE_POST_ACTION_DEFAULT_ENABLED (1U) //!< Pre post shim default callback functions enabled. |
54 | 57 | //@} |
55 | 58 |
|
56 | 59 | //! @name Configuration options |
57 | 60 | //@{ |
58 | 61 |
|
| 62 | +//! @def ERPC_ALLOCATION_POLICY |
| 63 | +//! |
| 64 | +//! @brief Choose which allocation policy should be used. |
| 65 | +//! |
| 66 | +//! Set ERPC_ALLOCATION_POLICY_DYNAMIC if dynamic allocations should be used. |
| 67 | +//! Set ERPC_ALLOCATION_POLICY_STATIC if static allocations should be used. |
| 68 | +//! |
| 69 | +//! Default value is ERPC_ALLOCATION_POLICY_DYNAMIC or in case of FreeRTOS it can be auto-detected if __has_include() is supported |
| 70 | +//! by compiler. Uncomment comment bellow to use static allocation policy. |
| 71 | +//! In case of static implementation user need consider another values to set (ERPC_CODEC_COUNT, |
| 72 | +//! ERPC_MESSAGE_LOGGERS_COUNT, ERPC_CLIENTS_THREADS_AMOUNT). |
| 73 | +// #define ERPC_ALLOCATION_POLICY (ERPC_ALLOCATION_POLICY_STATIC) |
| 74 | + |
| 75 | +//! @def ERPC_CODEC_COUNT |
| 76 | +//! |
| 77 | +//! @brief Set amount of codecs objects used simultaneously in case of ERPC_ALLOCATION_POLICY is set to |
| 78 | +//! ERPC_ALLOCATION_POLICY_STATIC. For example if client or server is used in one thread then 1. If both are used in one thread per |
| 79 | +//! each then 2, ... Default value 2. |
| 80 | +// #define ERPC_CODEC_COUNT (2U) |
| 81 | + |
| 82 | +//! @def ERPC_MESSAGE_LOGGERS_COUNT |
| 83 | +//! |
| 84 | +//! @brief Set amount of message loggers objects used simultaneously in case of ERPC_ALLOCATION_POLICY is set to |
| 85 | +//! ERPC_ALLOCATION_POLICY_STATIC. |
| 86 | +//! For example if client or server is used in one thread then 1. If both are used in one thread per each then 2, ... |
| 87 | +//! For arbitrated client 1 is enough. |
| 88 | +//! Default value 0 (May not be used). |
| 89 | +// #define ERPC_MESSAGE_LOGGERS_COUNT (0U) |
| 90 | + |
| 91 | +//! @def ERPC_CLIENTS_THREADS_AMOUNT |
| 92 | +//! |
| 93 | +//! @brief Set amount of client threads objects used in case of ERPC_ALLOCATION_POLICY is set to ERPC_ALLOCATION_POLICY_STATIC. |
| 94 | +//! Default value 1 (Most of current cases). |
| 95 | +// #define ERPC_CLIENTS_THREADS_AMOUNT (1U) |
| 96 | + |
59 | 97 | //! @def ERPC_THREADS |
60 | 98 | //! |
61 | 99 | //! @brief Select threading model. |
|
0 commit comments