2022-02-27 01:08:55 +01:00
|
|
|
{# One Shot function's dispatch code for opaque drivers.
|
|
|
|
Expected inputs:
|
|
|
|
* drivers: the list of driver descriptions.
|
|
|
|
* entry_point: the name of the entry point that this function dispatches to.
|
|
|
|
* entry_point_param(driver): the parameters to pass to the entry point.
|
|
|
|
* nest_indent: number of extra spaces to indent the code to.
|
|
|
|
-#}
|
2021-12-24 08:20:36 +01:00
|
|
|
{% for driver in drivers if driver.type == "opaque" -%}
|
|
|
|
{% for capability in driver.capabilities if entry_point in capability.entry_points -%}
|
2022-02-27 01:08:55 +01:00
|
|
|
#if ({% if capability['mbedtls/c_depend_on'] is defined -%}{{ capability['mbedtls/c_depend_on'] }} {% else -%} {{ 1 }} {% endif %})
|
2021-12-24 08:20:36 +01:00
|
|
|
{%- filter indent(width = nest_indent) %}
|
|
|
|
case {{ driver.location }}:
|
2022-02-27 01:08:55 +01:00
|
|
|
return( {{ entry_point_name(capability, entry_point, driver) }}({{entry_point_param(driver) | indent(20)}}));
|
2021-12-24 08:20:36 +01:00
|
|
|
{% endfilter -%}
|
|
|
|
#endif
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|