blob: a6b7d69053d73c62859890a522cb4fe3253c6662 [file] [log] [blame]
Archanafdbbcba2022-02-27 05:38:55 +05301{# One Shot function's dispatch code for transparent drivers.
2Expected inputs:
3* drivers: the list of driver descriptions.
4* entry_point: the name of the entry point that this function dispatches to.
5* entry_point_param(driver): the parameters to pass to the entry point.
6* nest_indent: number of extra spaces to indent the code to.
7-#}
Archanae829cd62021-12-24 12:50:36 +05308{% for driver in drivers if driver.type == "transparent" -%}
9{% for capability in driver.capabilities if entry_point in capability.entry_points -%}
Archanaa2cac322022-04-14 09:31:28 +053010#if ({% if capability['mbedtls/c_condition'] is defined -%}{{ capability['mbedtls/c_condition'] }} {% else -%} {{ 1 }} {% endif %})
Archanae829cd62021-12-24 12:50:36 +053011{%- filter indent(width = nest_indent) %}
Archanafdbbcba2022-02-27 05:38:55 +053012status = {{ entry_point_name(capability, entry_point, driver) }}({{entry_point_param(driver) | indent(20)}});
Archanae829cd62021-12-24 12:50:36 +053013
14if( status != PSA_ERROR_NOT_SUPPORTED )
15 return( status );
16{% endfilter -%}
17#endif
18{% endfor %}
19{% endfor %}