<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.2" xml:lang="en-US">
  <compounddef id="cybsp_8c" kind="file" language="C++">
    <compoundname>cybsp.c</compoundname>
    <includes local="no">stdlib.h</includes>
    <includes local="yes">cy_syspm.h</includes>
    <includes local="yes">cy_sysclk.h</includes>
    <includes refid="cybsp_8h" local="yes">cybsp.h</includes>
    <includes local="yes">cycfg.h</includes>
    <includes local="yes">mtb_srf_pool_init.h</includes>
    <incdepgraph>
      <node id="1">
        <label>cybsp.c</label>
        <link refid="cybsp_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>cy_sysclk.h</label>
      </node>
      <node id="3">
        <label>cy_syspm.h</label>
      </node>
      <node id="5">
        <label>cycfg.h</label>
      </node>
      <node id="6">
        <label>mtb_srf_pool_init.h</label>
      </node>
      <node id="2">
        <label>stdlib.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="cybsp_8c_1afa59dac61cf3d20529cee4978cf0de40" prot="public" static="no">
        <name>CYBSP_SYSCLK_PM_CALLBACK_ORDER</name>
        <initializer>(255u)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" line="64" column="13" bodyfile="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" bodystart="64" bodyend="-1"/>
      </memberdef>
      <memberdef kind="define" id="cybsp_8c_1a934d562d62bd0c02534e51b028f276f4" prot="public" static="no">
        <name>CYBSP_DISABLE_SRF_INIT</name>
        <initializer>(1)</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" line="69" column="9" bodyfile="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" bodystart="69" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="cybsp_8c_1a1c5a0abe5db95f744948208745abd1f1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void _cybsp_global_sema_init</definition>
        <argsstring>(void)</argsstring>
        <name>_cybsp_global_sema_init</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" line="276" column="6" bodyfile="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" bodystart="276" bodyend="290"/>
      </memberdef>
      <memberdef kind="function" id="group__group__bsp__functions_1gab989986b285e127f78f61c29f6ccbbfa" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>cy_rslt_t</type>
        <definition>cy_rslt_t cybsp_init</definition>
        <argsstring>(void)</argsstring>
        <name>cybsp_init</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
<para>Initialize all hardware on the board. </para>
        </briefdescription>
        <detaileddescription>
<para><simplesect kind="return"><para>CY_RSLT_SUCCESS if the board is successfully initialized, if there is a problem initializing any hardware it returns an error code specific to the hardware module that had a problem. </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
<para>defined(CYBSP_DISABLE_SRF_INIT)</para>
        </inbodydescription>
        <location file="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" line="295" column="11" bodyfile="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c" bodystart="295" bodyend="398"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>Description: Provides initialization code for starting up the hardware contained on the Infineon board. </para>
    </briefdescription>
    <detaileddescription>
<para><simplesect kind="copyright"><para>Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation</para>
</simplesect>
SPDX-License-Identifier: Apache-2.0</para>
<para>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at <verbatim>http://www.apache.org/licenses/LICENSE-2.0
</verbatim> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/***************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdlib.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;cy_syspm.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;cy_sysclk.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;cybsp.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;cycfg.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>((CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_NON_SECURE_DEVICE))<sp/>||<sp/>(CY_SYSTEM_CPU_M55)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;cycfg_protection.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>CYBSP_DISABLE_SRF_INIT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mtb_srf.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mtb_srf_pool_init.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_MW_MTB_IPC)<sp/>&amp;&amp;<sp/>defined(COMPONENT_MW_MTB_SRF)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mtb_ipc.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mtb_srf_ipc_init.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;partition_ARMCM33.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(__cplusplus)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;C&quot;</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(CYBSP_POST_CFG_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>BSP<sp/>requires<sp/>a<sp/>step<sp/>immediately<sp/>after<sp/>init_cycfg_all,<sp/>declare<sp/>it<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal">cy_rslt_t<sp/>cybsp_post_cfg_init();</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>defined(CYBSP_POST_CFG_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="comment">//<sp/>The<sp/>sysclk<sp/>deep<sp/>sleep<sp/>callback<sp/>is<sp/>recommended<sp/>to<sp/>be<sp/>the<sp/>last<sp/>callback<sp/>that<sp/>is<sp/>executed<sp/>before</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="comment">//<sp/>entry<sp/>into<sp/>deep<sp/>sleep<sp/>mode<sp/>and<sp/>the<sp/>first<sp/>one<sp/>upon<sp/>exit<sp/>the<sp/>deep<sp/>sleep<sp/>mode.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Doing<sp/>so<sp/>minimizes<sp/>the<sp/>time<sp/>spent<sp/>on<sp/>low<sp/>power<sp/>mode<sp/>entry<sp/>and<sp/>exit.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>CYBSP_SYSCLK_PM_CALLBACK_ORDER</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#define<sp/>CYBSP_SYSCLK_PM_CALLBACK_ORDER<sp/><sp/>(255u)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!defined(COMPONENT_MW_MTB_SRF)<sp/>||<sp/>defined(CY_SRF_DISABLE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>If<sp/>the<sp/>MTB-SRF<sp/>library<sp/>isn&apos;t<sp/>present,<sp/>disable<sp/>its<sp/>initialization<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>CYBSP_DISABLE_SRF_INIT<sp/><sp/><sp/><sp/><sp/>(1)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>CYBSP_DISABLE_SRF_INIT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Secure<sp/>context<sp/>and<sp/>pool<sp/>for<sp/>use<sp/>with<sp/>the<sp/>Secure<sp/>Request<sp/>Framework</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!defined(MTB_SRF_SECURE_CONTEXT_SECTION)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Optional<sp/>macro<sp/>to<sp/>specify<sp/>the<sp/>linker<sp/>section<sp/>for<sp/>the<sp/>secure<sp/>context</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_SRF_SECURE_CONTEXT_SECTION</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal">MTB_SRF_SECURE_CONTEXT_SECTION<sp/>mtb_srf_context_s_t<sp/>cybsp_srf_context;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal">mtb_srf_pool_t<sp/>cy_pdl_srf_default_pool;</highlight></codeline>
<codeline lineno="82"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>_MTB_SRF_DATA_ALIGN<sp/>uint32_t<sp/>cy_pdl_srf_default_pool_memory[(MTB_SRF_POOL_ENTRY_SIZE(</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__group__mtb__srf__config_1ga864b2d587f63354c174102937f1c4e36" kindref="member">MTB_SRF_MAX_ARG_IN_SIZE</ref>,</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__group__mtb__srf__config_1ga68ee7633d8162c1f31896810f563e206" kindref="member">MTB_SRF_MAX_ARG_OUT_SIZE</ref>)</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>)<sp/>/</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(uint32_t)];</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_MW_MTB_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_SRF_IPC_SEMA_COUNT<sp/>(MTB_IPC_SEMA_NUM_SRF_REQ_END<sp/>-<sp/>MTB_IPC_SEMA_NUM_SRF_REQ_START<sp/>+<sp/>1)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Error<sp/>if<sp/>the<sp/>inclusive<sp/>semaphore<sp/>range<sp/>defined<sp/>in<sp/>IPC<sp/>does<sp/>not<sp/>match<sp/>the<sp/>semaphore<sp/>number<sp/>from<sp/>SRF<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>(MTB_SRF_IPC_SEMA_COUNT<sp/>&lt;<sp/>MTB_SRF_POOL_SIZE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight><highlight class="preprocessor">#error<sp/>&quot;Semaphore<sp/>region<sp/>defined<sp/>by<sp/>mtb_ipc_config.h<sp/>(MTB_IPC_SEMA_NUM_SRF_REQ_START<sp/>to<sp/>MTB_IPC_SEMA_NUM_SRF_REQ_END<sp/>inclusive)<sp/>is<sp/>less<sp/>than<sp/>MTB_SRF_POOL_SIZE.<sp/>\</highlight></codeline>
<codeline lineno="93"><highlight class="preprocessor">Please<sp/>adjust<sp/>MTB_IPC_SEMA_NUM_SRF_REQ_END&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal">mtb_srf_ipc_client_context_t<sp/>cybsp_mtb_srf_client_context;</highlight></codeline>
<codeline lineno="99"><highlight class="normal">mtb_ipc_t<sp/>cybsp_cm55_ipc_instance;</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Define<sp/>variables<sp/>for<sp/>SRF<sp/>IPC<sp/>init.<sp/>Shared<sp/>memory<sp/>variables<sp/>must<sp/>not<sp/>be<sp/>static<sp/>otherwise<sp/>the<sp/>compiler</highlight></codeline>
<codeline lineno="101"><highlight class="comment">may<sp/>store<sp/>them<sp/>incorrectly*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>_MTB_SRF_DATA_ALIGN<sp/>mtb_srf_ipc_packet_t<sp/>cybsp_srf_ipc_requests[<ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>];</highlight></codeline>
<codeline lineno="103"><highlight class="normal">mtb_ipc_semaphore_t<sp/>cybsp_cm55_srf_ipc_semaphores[MTB_SRF_IPC_SEMA_COUNT];</highlight></codeline>
<codeline lineno="104"><highlight class="normal">mtb_ipc_mbox_sender_t<sp/>cybsp_srf_ipc_sender;</highlight></codeline>
<codeline lineno="105"><highlight class="normal">mtb_srf_ipc_pool_t<sp/>cybsp_srf_ipc_pool;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_IPC_IRQ_SEMA_SRF<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(MTB_IPC_IRQ_SEMA_SRF_CLIENT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_IPC_IRQ_QUEUE_SRF<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(MTB_IPC_IRQ_QUEUE_SRF_CLIENT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal">mtb_srf_ipc_relay_context_t<sp/>cybsp_mtb_srf_relay_context;</highlight></codeline>
<codeline lineno="113"><highlight class="normal">mtb_ipc_t<sp/>cybsp_cm33_ipc_instance;</highlight></codeline>
<codeline lineno="114"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>mtb_ipc_shared_t<sp/>cybsp_srf_ipc_shared_data<sp/>_MTB_IPC_DATA_ALIGN;</highlight></codeline>
<codeline lineno="115"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>mtb_ipc_mbox_data_t<sp/>cybsp_srf_ipc_mbox_data<sp/>_MTB_IPC_DATA_ALIGN;</highlight></codeline>
<codeline lineno="116"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>mtb_ipc_semaphore_data_t<sp/>cybsp_ipc_sem_data[MTB_SRF_IPC_SEMA_COUNT]<sp/>_MTB_IPC_DATA_ALIGN;</highlight></codeline>
<codeline lineno="117"><highlight class="normal">mtb_ipc_semaphore_t<sp/>cybsp_cm33_srf_ipc_semaphores[MTB_SRF_IPC_SEMA_COUNT];</highlight></codeline>
<codeline lineno="118"><highlight class="normal">mtb_ipc_mbox_receiver_t<sp/>cybsp_srf_ipc_receiver;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_IPC_IRQ_SEMA_SRF<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(MTB_IPC_IRQ_SEMA_SRF_RELAY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MTB_IPC_IRQ_QUEUE_SRF<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(MTB_IPC_IRQ_QUEUE_SRF_RELAY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>(defined(CY_RTOS_AWARE)<sp/>||<sp/>defined(COMPONENT_RTOS_AWARE))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal">cy_queue_t<sp/>cybsp_srf_request_queue;</highlight></codeline>
<codeline lineno="123"><highlight class="normal">cy_thread_t<sp/>cybsp_srf_receive;</highlight></codeline>
<codeline lineno="124"><highlight class="normal">cy_thread_t<sp/>cybsp_srf_process;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>uint64_t<sp/>cybsp_srf_thread_stack_receive[500];</highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>uint64_t<sp/>cybsp_srf_thread_stack_process[500];</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal">mtb_srf_ipc_packet_t*<sp/>cybsp_srf_ring_buffer[<ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>];</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>defined(COMPONENT_MW_MTB_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>ifndef<sp/>CYBSP_DISABLE_SRF_INIT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>!defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>uint32_t<sp/>cybsp_ipc_sema_array[CY_IPC_SEMA_COUNT<sp/>/</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CY_IPC_SEMA_PER_WORD];</highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>IPC<sp/>semaphore<sp/>structure<sp/>placed<sp/>in<sp/>normal<sp/>shared<sp/>memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal">CY_SECTION_SHAREDMEM<sp/>cy_stc_ipc_sema_t<sp/>cybsp_ipc_sema;</highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_MW_MTB_IPC)<sp/>&amp;&amp;<sp/>!defined(COMPONENT_SECURE_DEVICE)<sp/>&amp;&amp;<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cybsp_srf_ipc_semaphore_interrupt_handler(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="148"><highlight class="normal">{</highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_ipc_semaphore_process_interrupt(&amp;cybsp_cm55_ipc_instance);</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_ipc_semaphore_process_interrupt(&amp;cybsp_cm33_ipc_instance);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal">}</highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>cybsp_srf_ipc_queue_interrupt_handler(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="156"><highlight class="normal">{</highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_ipc_queue_process_interrupt(&amp;cybsp_cm55_ipc_instance);</highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_ipc_queue_process_interrupt(&amp;cybsp_cm33_ipc_instance);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal">}</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal">cy_rslt_t<sp/>_cybsp_ipc_srf_init()</highlight></codeline>
<codeline lineno="165"><highlight class="normal">{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>cy_rslt_t<sp/>result<sp/>=<sp/>CY_RSLT_SUCCESS;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_ipc_config_t<sp/>ipc_config<sp/>=</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.internal_channel_index<sp/>=<sp/><ref refid="group__group__mtb__ipc__config_1ga67317da3e1f854f37f7c53775af2b62f" kindref="member">MTB_IPC_CHANNEL_SRF</ref>,</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.semaphore_irq<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_IRQ_SEMA_SRF,</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.queue_irq<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_IRQ_QUEUE_SRF,</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.semaphore_num<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="group__group__mtb__ipc__config_1ga8ded834ac1aaa7426402c9cddabe892c" kindref="member">MTB_IPC_SEMA_NUM_SRF</ref></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/>cy_stc_sysint_t<sp/>intr_cfg_sema<sp/>=<sp/>{.intrSrc<sp/>=<sp/>(IRQn_Type)CY_IPC_INTR_MUX(ipc_config.semaphore_irq),<sp/>.intrPriority<sp/>=<sp/>7u};</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>Cy_SysInt_Init(&amp;intr_cfg_sema,<sp/>cybsp_srf_ipc_semaphore_interrupt_handler);</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/>cy_stc_sysint_t<sp/>intr_cfg_queue<sp/>=<sp/>{.intrSrc<sp/>=<sp/>(IRQn_Type)CY_IPC_INTR_MUX(ipc_config.queue_irq),<sp/>.intrPriority<sp/>=<sp/>7u};</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/>Cy_SysInt_Init(&amp;intr_cfg_queue,<sp/>cybsp_srf_ipc_queue_interrupt_handler);</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/>NVIC_EnableIRQ((IRQn_Type)CY_IPC_INTR_MUX(ipc_config.semaphore_irq));</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/>NVIC_EnableIRQ((IRQn_Type)CY_IPC_INTR_MUX(ipc_config.queue_irq));</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>uint32_t<sp/>mtb_srf_ipc_semaphore_idx_list[MTB_SRF_IPC_SEMA_COUNT];</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>semaphore<sp/>index<sp/>list<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(uint32_t<sp/>idx<sp/>=<sp/>0;<sp/>idx<sp/>&lt;<sp/>MTB_SRF_IPC_SEMA_COUNT;<sp/>idx++)</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mtb_srf_ipc_semaphore_idx_list[idx]<sp/>=<sp/>idx<sp/>+<sp/>MTB_IPC_SEMA_NUM_SRF_REQ_START;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>(CY_SYSTEM_CPU_M33)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>(defined(CY_RTOS_AWARE)<sp/>||<sp/>defined(COMPONENT_RTOS_AWARE))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cy_rtos_queue_init(&amp;cybsp_srf_request_queue,<sp/><ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*));</highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(CY_RSLT_SUCCESS<sp/>==<sp/>result)</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_ipc_init(&amp;cybsp_cm33_ipc_instance,<sp/>&amp;cybsp_srf_ipc_shared_data,<sp/>&amp;ipc_config);</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>==<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mtb_srf_ipc_relay_init_cfg_t<sp/>relay_init_cfg<sp/>=</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.ipc_instance<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_cm33_ipc_instance,</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mailbox_handle<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_srf_ipc_receiver,</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.ipc_sem_indexes<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>mtb_srf_ipc_semaphore_idx_list,</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mailbox_data<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_srf_ipc_mbox_data,</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.semaphore_data<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>cybsp_ipc_sem_data,</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.semaphore_handles<sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>cybsp_cm33_srf_ipc_semaphores,</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mbox_idx<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_MBOX_IDX_SRF,</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mbox_read_sema_idx<sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_SEMA_NUM_SRF_MBOX_READ,</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mbox_write_sema_idx<sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_SEMA_NUM_SRF_MBOX_WRITE,</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.num_semaphores<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_SRF_IPC_SEMA_COUNT,</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.num_requests<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>,</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#if<sp/>(defined(CY_RTOS_AWARE)<sp/>||<sp/>defined(COMPONENT_RTOS_AWARE))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.ipc_req_queue<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_srf_request_queue</highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.buffer<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>cybsp_srf_ring_buffer</highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_srf_ipc_relay_init(&amp;cybsp_mtb_srf_relay_context,<sp/>&amp;relay_init_cfg);</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#if<sp/>(defined(CY_RTOS_AWARE)<sp/>||<sp/>defined(COMPONENT_RTOS_AWARE))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(CY_RSLT_SUCCESS<sp/>==<sp/>result)</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(CY_RSLT_SUCCESS<sp/>==<sp/>result)</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cy_rtos_thread_create(&amp;cybsp_srf_receive,<sp/>&amp;mtb_srf_ipc_receive_thread,</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;Receive<sp/>Thread&quot;</highlight><highlight class="normal">,<sp/>&amp;cybsp_srf_thread_stack_receive,</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(cybsp_srf_thread_stack_receive),</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CY_RTOS_PRIORITY_NORMAL,<sp/>(cy_thread_arg_t)&amp;cybsp_mtb_srf_relay_context);</highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(CY_RSLT_SUCCESS<sp/>==<sp/>result)</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cy_rtos_thread_create(&amp;cybsp_srf_process,<sp/>&amp;mtb_srf_ipc_process_thread,</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;Process<sp/>Thread&quot;</highlight><highlight class="normal">,<sp/>&amp;cybsp_srf_thread_stack_process,</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(cybsp_srf_thread_stack_process),</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CY_RTOS_PRIORITY_NORMAL,<sp/>(cy_thread_arg_t)&amp;cybsp_mtb_srf_relay_context);</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="239"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#elif<sp/>(CY_SYSTEM_CPU_M55)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_ipc_get_handle(&amp;cybsp_cm55_ipc_instance,<sp/>&amp;ipc_config,<sp/>1000UL);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>==<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mtb_srf_ipc_client_init_cfg_t<sp/>client_init_cfg<sp/>=</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.ipc_instance<sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_cm55_ipc_instance,</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mailbox_handle<sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_srf_ipc_sender,</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.ipc_sem_indexes<sp/><sp/><sp/><sp/>=<sp/>mtb_srf_ipc_semaphore_idx_list,</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.srf_ipc_requests<sp/><sp/><sp/>=<sp/>cybsp_srf_ipc_requests,</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.srf_ipc_pool<sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>&amp;cybsp_srf_ipc_pool,</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.semaphore_handles<sp/><sp/>=<sp/>cybsp_cm55_srf_ipc_semaphores,</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.mbox_idx<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_IPC_MBOX_IDX_SRF,</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.num_semaphores<sp/><sp/><sp/><sp/><sp/>=<sp/>MTB_SRF_IPC_SEMA_COUNT,</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>.num_requests<sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_srf_ipc_client_init(&amp;cybsp_mtb_srf_client_context,<sp/>&amp;client_init_cfg);</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>(CY_SYSTEM_CPU_M33)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="259"><highlight class="normal">}</highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>defined(COMPONENT_MW_MTB_IPC)<sp/>&amp;&amp;<sp/>!defined(COMPONENT_SECURE_DEVICE)<sp/>&amp;&amp;<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************</highlight></codeline>
<codeline lineno="263"><highlight class="comment">*<sp/>Function<sp/>Name:<sp/>_mtb_global_sema_init</highlight></codeline>
<codeline lineno="264"><highlight class="comment">******************************************************************************</highlight></codeline>
<codeline lineno="265"><highlight class="comment">*<sp/>Summary:</highlight></codeline>
<codeline lineno="266"><highlight class="comment">*<sp/>Initialize<sp/>global<sp/>semaphores<sp/>for<sp/>IPC<sp/>usage<sp/>in<sp/>application</highlight></codeline>
<codeline lineno="267"><highlight class="comment">*<sp/>Only<sp/>called<sp/>from<sp/>secure-application<sp/>setup,<sp/>as<sp/>it<sp/>will<sp/>take<sp/>care</highlight></codeline>
<codeline lineno="268"><highlight class="comment">*<sp/>of<sp/>the<sp/>semaphore<sp/>setup<sp/>for<sp/>all<sp/>of<sp/>the<sp/>cores<sp/>to<sp/>utilize</highlight></codeline>
<codeline lineno="269"><highlight class="comment">*</highlight></codeline>
<codeline lineno="270"><highlight class="comment">*<sp/>Parameters:</highlight></codeline>
<codeline lineno="271"><highlight class="comment">*<sp/>None</highlight></codeline>
<codeline lineno="272"><highlight class="comment">*</highlight></codeline>
<codeline lineno="273"><highlight class="comment">*<sp/>Return:</highlight></codeline>
<codeline lineno="274"><highlight class="comment">*<sp/>void</highlight></codeline>
<codeline lineno="275"><highlight class="comment">*****************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>_cybsp_global_sema_init(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="277"><highlight class="normal">{</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>the<sp/>global<sp/>semaphore<sp/>data<sp/>for<sp/>the<sp/>non-secure<sp/>world<sp/>CM33_NS.<sp/>If<sp/>needed<sp/>on<sp/>the<sp/>CM33_S,<sp/>this<sp/>pointer<sp/>must</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>be<sp/>passed<sp/>to<sp/>CM33_S<sp/>to<sp/>initialize<sp/>the<sp/>IPC<sp/>in<sp/>the<sp/>secure<sp/>world.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>!defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/>cybsp_ipc_sema.maxSema<sp/>=<sp/>CY_IPC_SEMA_COUNT;</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/>cybsp_ipc_sema.arrayPtr<sp/>=<sp/>cybsp_ipc_sema_array;</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/>cybsp_ipc_sema.arrayPtr_sec<sp/>=<sp/>NULL;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"></highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>Cy_IPC_Sema_InitExt(IPC0_SEMA_CH_NUM,<sp/>&amp;cybsp_ipc_sema);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#elif<sp/>(CY_SYSTEM_CPU_M55)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>the<sp/>global<sp/>semaphore<sp/>in<sp/>the<sp/>non-secure<sp/>context</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/>Cy_IPC_Sema_Init(IPC0_SEMA_CH_NUM,<sp/>0,<sp/>NULL);</highlight></codeline>
<codeline lineno="289"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="290"><highlight class="normal">}</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"></highlight><highlight class="comment">//<sp/>cybsp_init</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="295"><highlight class="normal">cy_rslt_t<sp/><ref refid="group__group__bsp__functions_1gab989986b285e127f78f61c29f6ccbbfa" kindref="member">cybsp_init</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="296"><highlight class="normal">{</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>hardware<sp/>manager<sp/>to<sp/>track<sp/>resource<sp/>usage<sp/>then<sp/>initialize<sp/>all<sp/>system<sp/>(clock/power)<sp/>board</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>configuration</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/>cy_rslt_t<sp/>result<sp/>=<sp/>CY_RSLT_SUCCESS;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Configure<sp/>semaphore<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/>_cybsp_global_sema_init();</highlight></codeline>
<codeline lineno="303"><highlight class="normal"></highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>CM33<sp/>secure<sp/>is<sp/>the<sp/>first<sp/>to<sp/>boot.<sp/>Initialize<sp/>peripherals,<sp/>SAU,<sp/>any<sp/>enabled<sp/>MPCs,<sp/>and<sp/>the<sp/>MPU</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>for<sp/>this<sp/>core</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"></highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>System<sp/>Control<sp/>Block</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/>SysCtrlBlk_Setup();</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>NS<sp/>NVIC<sp/>interrupts</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/>NVIC_NS_Setup();</highlight></codeline>
<codeline lineno="312"><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined<sp/>(__FPU_USED)<sp/>&amp;&amp;<sp/>(__FPU_USED<sp/>==<sp/>1U)<sp/>&amp;&amp;<sp/>\</highlight></codeline>
<codeline lineno="314"><highlight class="preprocessor"><sp/><sp/><sp/><sp/>defined<sp/>(TZ_FPU_NS_USAGE)<sp/>&amp;&amp;<sp/>(TZ_FPU_NS_USAGE<sp/>==<sp/>1U)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*FPU<sp/>initialization*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/>initFPU();</highlight></codeline>
<codeline lineno="317"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>system<sp/>clocks,<sp/>peripheral<sp/>clock<sp/>dividers,<sp/>pin<sp/>configurations,<sp/>routing,<sp/>SAU,<sp/>MPCs</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>and<sp/>MPU<sp/>for<sp/>the<sp/>core</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/>init_cycfg_all();</highlight></codeline>
<codeline lineno="322"><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(CYBSP_POST_CFG_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>custom<sp/>initialization<sp/>step<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cybsp_post_cfg_init();</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="330"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="331"><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Set<sp/>up<sp/>the<sp/>SRF<sp/>and<sp/>register<sp/>the<sp/>PDL<sp/>module</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_srf_init(&amp;cybsp_srf_context);</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="340"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(CY_PDL_ENABLE_SECURE_AWARE)<sp/>&amp;&amp;<sp/>(CY_PDL_ENABLE_SECURE_AWARE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cy_pdl_srf_module_register(&amp;cybsp_srf_context);</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="346"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>defined(CY_PDL_ENABLE_SECURE_AWARE)<sp/>&amp;&amp;<sp/>(CY_PDL_ENABLE_SECURE_AWARE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#else<sp/></highlight><highlight class="comment">//<sp/>CM33<sp/>non-secure<sp/>or<sp/>CM55</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>mtb_srf_pool_init(&amp;cy_pdl_srf_default_pool,</highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&amp;cy_pdl_srf_default_pool_memory[0],<sp/><ref refid="group__group__mtb__srf__config_1ga589067eb1e3af68adab2b2caaf8435d5" kindref="member">MTB_SRF_POOL_SIZE</ref>,</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__group__mtb__srf__config_1ga864b2d587f63354c174102937f1c4e36" kindref="member">MTB_SRF_MAX_ARG_IN_SIZE</ref>,<sp/><ref refid="group__group__mtb__srf__config_1ga68ee7633d8162c1f31896810f563e206" kindref="member">MTB_SRF_MAX_ARG_OUT_SIZE</ref>);</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="359"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(COMPONENT_MW_MTB_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>IPC<sp/>must<sp/>be<sp/>initialized<sp/>after<sp/>peripheral<sp/>clocks*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>_cybsp_ipc_srf_init();</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="366"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>defined(COMPONENT_MW_MTB_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>the<sp/>peripheral-related<sp/>data<sp/>structures<sp/>(but<sp/>do<sp/>not</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>re-initialize<sp/>the<sp/>peripherals<sp/>themselves)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/>init_cycfg_ns_clocks();</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/>init_cycfg_ns_power();</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/>cycfg_config_reservations();</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Needs<sp/>to<sp/>happen<sp/>on<sp/>every<sp/>core<sp/>because<sp/>MPU<sp/>can<sp/>only<sp/>be</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>initialized<sp/>from<sp/>the<sp/>core<sp/>to<sp/>which<sp/>it<sp/>applies</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/>init_cycfg_protection();</highlight></codeline>
<codeline lineno="377"><highlight class="normal"></highlight></codeline>
<codeline lineno="378"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(CYBSP_POST_CFG_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Perform<sp/>custom<sp/>initialization<sp/>step<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cybsp_post_cfg_init();</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(result<sp/>!=<sp/>CY_RSLT_SUCCESS)</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="385"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="386"><highlight class="normal"></highlight></codeline>
<codeline lineno="387"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">//<sp/>(CY_SYSTEM_CPU_M33)<sp/>&amp;&amp;<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Always<sp/>initialize<sp/>peripheral-related<sp/>data<sp/>structures</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="389"><highlight class="normal"></highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(CY_RSLT_SUCCESS<sp/>==<sp/>result)</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="392"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#if<sp/>defined(CYBSP_CUSTOM_SYSCLK_PM_CALLBACK)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>=<sp/>cybsp_register_custom_sysclk_pm_callback();</highlight></codeline>
<codeline lineno="394"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="398"><highlight class="normal">}</highlight></codeline>
<codeline lineno="399"><highlight class="normal"></highlight></codeline>
<codeline lineno="400"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_MW_MTB_SRF)<sp/>&amp;&amp;<sp/>!defined(MTB_SRF_CUSTOM_REQUEST_SUBMIT)<sp/>&amp;&amp;<sp/>!defined(CYBSP_DISABLE_SRF_INIT)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="401"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Cores<sp/>with<sp/>TrustZone<sp/>enabled<sp/>will<sp/>use<sp/>the<sp/>NSC<sp/>mtb_srf_request_submit.<sp/><sp/>Other<sp/>cores<sp/>must<sp/>use<sp/>the</highlight></codeline>
<codeline lineno="402"><highlight class="comment"><sp/>*<sp/>IPC-based<sp/>mtb_srf_request_submit<sp/>to<sp/>pass<sp/>the<sp/>request<sp/>to<sp/>the<sp/>NonSecure<sp/>TrustZone<sp/>core,<sp/>whcih<sp/>will</highlight></codeline>
<codeline lineno="403"><highlight class="comment"><sp/>*<sp/>then<sp/>submit<sp/>the<sp/>request<sp/>through<sp/>the<sp/>NSC.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="404"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_SECURE_DEVICE)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="405"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="406"><highlight class="normal"></highlight><highlight class="comment">//<sp/>mtb_srf_request_submit</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="407"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="408"><highlight class="normal">cy_rslt_t<sp/>__attribute__((cmse_nonsecure_entry))<sp/>mtb_srf_request_submit(</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_srf_invec_ns_t*<sp/>inVec_ns,<sp/>uint8_t<sp/>inVec_cnt_ns,</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_srf_outvec_ns_t*<sp/>outVec_ns,<sp/>uint8_t<sp/>outVec_cnt_ns)</highlight></codeline>
<codeline lineno="411"><highlight class="normal">{</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>mtb_srf_request_execute(&amp;cybsp_srf_context,<sp/>inVec_ns,<sp/>inVec_cnt_ns,<sp/>outVec_ns,</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>outVec_cnt_ns);</highlight></codeline>
<codeline lineno="414"><highlight class="normal">}</highlight></codeline>
<codeline lineno="415"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>defined(COMPONENT_SECURE_DEVICE)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(COMPONENT_NON_SECURE_DEVICE)<sp/>&amp;&amp;<sp/>(CY_SYSTEM_CPU_M55)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="418"><highlight class="normal"></highlight><highlight class="comment">//<sp/>mtb_srf_request_submit</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"></highlight><highlight class="comment">//--------------------------------------------------------------------------------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="420"><highlight class="normal">cy_rslt_t<sp/>mtb_srf_request_submit(</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_srf_invec_ns_t*<sp/>inVec_ns,<sp/>uint8_t<sp/>inVec_cnt_ns,</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/>mtb_srf_outvec_ns_t*<sp/>outVec_ns,<sp/>uint8_t<sp/>outVec_cnt_ns)</highlight></codeline>
<codeline lineno="423"><highlight class="normal">{</highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#if<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)<sp/>&amp;&amp;<sp/>defined(COMPONENT_MW_MTB_IPC)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>mtb_srf_ipc_request_submit(&amp;cybsp_mtb_srf_client_context,<sp/>inVec_ns,<sp/>inVec_cnt_ns,<sp/>outVec_ns,<sp/>outVec_cnt_ns);</highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#else<sp/></highlight><highlight class="comment">/*<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)<sp/>&amp;&amp;<sp/>defined(COMPONENT_MW_MTB_IPC)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/>CY_UNUSED_PARAMETER(inVec_ns);</highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/>CY_UNUSED_PARAMETER(inVec_cnt_ns);</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/>CY_UNUSED_PARAMETER(outVec_ns);</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/>CY_UNUSED_PARAMETER(outVec_cnt_ns);</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/>CY_ASSERT(</highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>MTB_SRF_ERR_UNKNOWN_OPERATION;</highlight></codeline>
<codeline lineno="433"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/><sp/><sp/>#endif<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>defined(MTB_SRF_SUBMIT_USE_IPC)<sp/>&amp;&amp;<sp/>defined(COMPONENT_MW_MTB_IPC)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="434"><highlight class="normal">}</highlight></codeline>
<codeline lineno="435"><highlight class="normal"></highlight></codeline>
<codeline lineno="436"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">//<sp/>if<sp/>defined(COMPONENT_NON_SECURE_DEVICE)<sp/>&amp;&amp;<sp/>(CY_SYSTEM_CPU_M55)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="437"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>defined(COMPONENT_MW_MTB_SRF)<sp/>&amp;&amp;<sp/>!defined(MTB_SRF_CUSTOM_REQUEST_SUBMIT)<sp/>&amp;&amp;<sp/>!defined(CYBSP_DISABLE_SRF_INIT)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="438"><highlight class="normal"></highlight></codeline>
<codeline lineno="439"><highlight class="normal"></highlight></codeline>
<codeline lineno="440"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>defined(__cplusplus)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="441"><highlight class="normal">}</highlight></codeline>
<codeline lineno="442"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
    </programlisting>
    <location file="output/bsps/TARGET_KIT_PSE84_AI/cybsp.c"/>
  </compounddef>
</doxygen>
