Line data Source code
1 : /********************************************************************************
2 : * Copyright (c) 2024 Accenture
3 : *
4 : * This program and the accompanying materials are made available under the
5 : * terms of the Apache License Version 2.0 which is available at
6 : * https://www.apache.org/licenses/LICENSE-2.0
7 : *
8 : * SPDX-License-Identifier: Apache-2.0
9 : ********************************************************************************/
10 :
11 : #include "async/AsyncBinding.h"
12 :
13 : namespace async
14 : {
15 : using AdapterType = AsyncBindingType::AdapterType;
16 :
17 1 : void execute(ContextType const context, RunnableType& runnable)
18 : {
19 1 : AdapterType::execute(context, runnable);
20 1 : }
21 :
22 1 : void schedule(
23 : ContextType const context,
24 : RunnableType& runnable,
25 : TimeoutType& timeout,
26 : uint32_t const delay,
27 : TimeUnitType const unit)
28 : {
29 1 : AdapterType::schedule(context, runnable, timeout, delay, unit);
30 1 : }
31 :
32 1 : void scheduleAtFixedRate(
33 : ContextType const context,
34 : RunnableType& runnable,
35 : TimeoutType& timeout,
36 : uint32_t const period,
37 : TimeUnitType const unit)
38 : {
39 1 : AdapterType::scheduleAtFixedRate(context, runnable, timeout, period, unit);
40 1 : }
41 :
42 : } // namespace async
43 :
44 : extern "C"
45 : {
46 1 : void vApplicationIdleHook() { ::async::AdapterType::callIdleTaskFunction(); }
47 :
48 1 : void vApplicationGetIdleTaskMemory(
49 : StaticTask_t** const ppxIdleTaskTCBBuffer,
50 : StackType_t** const ppxIdleTaskStackBuffer,
51 : uint32_t* const pulIdleTaskStackSize)
52 : {
53 1 : ::async::AdapterType::getTaskMemory<::async::AdapterType::TASK_IDLE>(
54 : ppxIdleTaskTCBBuffer, ppxIdleTaskStackBuffer, pulIdleTaskStackSize);
55 1 : }
56 :
57 1 : void vApplicationGetTimerTaskMemory(
58 : StaticTask_t** const ppxTimerTaskTCBBuffer,
59 : StackType_t** const ppxTimerTaskStackBuffer,
60 : uint32_t* const pulTimerTaskStackSize)
61 : {
62 1 : ::async::AdapterType::getTaskMemory<::async::AdapterType::TASK_TIMER>(
63 : ppxTimerTaskTCBBuffer, ppxTimerTaskStackBuffer, pulTimerTaskStackSize);
64 1 : }
65 :
66 : } // extern "C"
|