Skip to content

Commit db59d16

Browse files
committed
Align erpc freertos extensions with static api
1 parent ee7c8e6 commit db59d16

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

erpc_c/port/erpc_setup_extensions_freertos.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ using namespace erpc;
1616

1717
static Semaphore *s_erpc_call_in_progress = NULL;
1818
static TimerHandle_t s_erpc_call_timer_cb = NULL;
19+
#if configSUPPORT_STATIC_ALLOCATION
20+
static StaticTimer_t s_static_erpc_call_timer_cb;
21+
#endif
1922

2023
void erpc::erpc_pre_cb_default(void)
2124
{
@@ -46,8 +49,13 @@ void erpc_init_call_progress_detection_default(
4649
s_erpc_call_in_progress = new Semaphore(1);
4750
assert(s_erpc_call_in_progress && "Creating eRPC semaphore failed.");
4851

52+
#if configSUPPORT_STATIC_ALLOCATION
53+
s_erpc_call_timer_cb = xTimerCreateStatic("Erpc client call timer", waitTimeMs / portTICK_PERIOD_MS, pdFALSE, NULL,
54+
erpc_call_timer_cb, &s_static_erpc_call_timer_cb);
55+
#else
4956
s_erpc_call_timer_cb =
5057
xTimerCreate("Erpc client call timer", waitTimeMs / portTICK_PERIOD_MS, pdFALSE, NULL, erpc_call_timer_cb);
58+
#endif
5159
assert(s_erpc_call_timer_cb && "Creating eRPC timer failed.");
5260
}
5361

0 commit comments

Comments
 (0)