<?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.8.13">
  <compounddef id="struct_u_s_b_d___c_o_r_e___a_p_i___t" kind="struct" language="C++" prot="public">
    <compoundname>USBD_CORE_API_T</compoundname>
    <includes refid="mw__usbd__core_8h" local="no">mw_usbd/mw_usbd_core.h</includes>
      <sectiondef kind="public-attrib">
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a651891ae3d6612f6f566384b3d681e36" prot="public" static="no" mutable="no">
        <type><ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref>(*</type>
        <definition>ErrorCode_t USBD_CORE_API_T::RegisterClassHandler</definition>
        <argsstring>)(USBD_HANDLE_T hUsb, USB_EP_HANDLER_T pfn, void *data)</argsstring>
        <name>RegisterClassHandler</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to register class specific EP0 event handler with USB device stack.</para><para>The application layer uses this function when it has to register the custom class&apos;s EP0 handler. The stack calls all the registered class handlers on any EP0 event before going through default handling of the event. This gives the class handlers to implement class specific request handlers and also to override the default stack handling for a particular event targeted to the interface. Check <ref refid="group___u_s_b_d___core_1gaa578d29a85226108ef62c6d5c325b742" kindref="member">USB_EP_HANDLER_T</ref> for more details on how the callback function should be implemented. Also application layer could use this function to register EP0 handler which responds to vendor specific requests.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">pfn</parametername>
</parameternamelist>
<parameterdescription>
<para>Class specific EP0 handler function. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">data</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to the data which will be passed when callback function is called by the stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Returns <ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref> type to indicate success or error condition. </para></simplesect>
<parameterlist kind="retval"><parameteritem>
<parameternamelist>
<parametername>LPC_OK</parametername>
</parameternamelist>
<parameterdescription>
<para>On success </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>ERR_USBD_TOO_MANY_CLASS_HDLR(0x0004000c)</parametername>
</parameternamelist>
<parameterdescription>
<para>The number of class handlers registered is greater than the number of handlers allowed by the stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="341" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="341" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a305d05fbc2d0c748b87edcd986bfb767" prot="public" static="no" mutable="no">
        <type><ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref>(*</type>
        <definition>ErrorCode_t USBD_CORE_API_T::RegisterEpHandler</definition>
        <argsstring>)(USBD_HANDLE_T hUsb, uint32_t ep_index, USB_EP_HANDLER_T pfn, void *data)</argsstring>
        <name>RegisterEpHandler</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to register interrupt/event handler for the requested endpoint with USB device stack.</para><para>The application layer uses this function to register the endpoint event handler. The stack calls all the registered endpoint handlers when<itemizedlist>
<listitem><para>USB_EVT_OUT or USB_EVT_OUT_NAK events happen for OUT endpoint.</para></listitem><listitem><para>USB_EVT_IN or USB_EVT_IN_NAK events happen for IN endpoint. Check USB_EP_HANDLER_T for more details on how the callback function should be implemented. <simplesect kind="note"><para>By default endpoint _NAK events are not enabled. Application should call <ref refid="struct_u_s_b_d___h_w___a_p_i___t_1ac8ba5c7f74d1861430a067375b4af885" kindref="member">USBD_HW_API_T::EnableEvent</ref> for the corresponding endpoint.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ep_index</parametername>
</parameternamelist>
<parameterdescription>
<para>Endpoint index. Computed as<itemizedlist>
<listitem><para>For OUT endpoints = 2 * endpoint number eg. for EP2_OUT it is 4.</para></listitem><listitem><para>For IN endopoints = (2 * endpoint number) + 1 eg. for EP2_IN it is 5. </para></listitem></itemizedlist>
</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">pfn</parametername>
</parameternamelist>
<parameterdescription>
<para>Endpoint event handler function. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">data</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to the data which will be passed when callback function is called by the stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Returns <ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref> type to indicate success or error condition. </para></simplesect>
<parameterlist kind="retval"><parameteritem>
<parameternamelist>
<parametername>LPC_OK</parametername>
</parameternamelist>
<parameterdescription>
<para>On success </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>ERR_API_INVALID_PARAM2</parametername>
</parameternamelist>
<parameterdescription>
<para>ep_index is outside the boundary ( &lt; 2 * <ref refid="struct_u_s_b_d___a_p_i___i_n_i_t___p_a_r_a_m___t_1af9eae0114be0454c4cce831715faf585" kindref="member">USBD_API_INIT_PARAM_T::max_num_ep</ref>). </para></parameterdescription>
</parameteritem>
</parameterlist>
</para></listitem></itemizedlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="365" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="365" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a373376ee1855114095288c907687b421" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::SetupStage</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>SetupStage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in setup state.</para><para>This function is called by USB stack and the application layer to set the EP0 state machine in setup state. This function will read the setup packet received from USB host into stack&apos;s buffer. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="383" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="383" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1ab1e05c41e0070d3e706ae98e048e4384" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::DataInStage</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>DataInStage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in data_in state.</para><para>This function is called by USB stack and the application layer to set the EP0 state machine in data_in state. This function will write the data present in EP0Data buffer to EP0 FIFO for transmission to host. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="401" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="401" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1aff6e7a43f616cdcbf9e193da25df684a" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::DataOutStage</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>DataOutStage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in data_out state.</para><para>This function is called by USB stack and the application layer to set the EP0 state machine in data_out state. This function will read the control data (EP0 out packets) received from USB host into EP0Data buffer. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="419" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="419" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a714fc392b856668bf6422cfb1ef1d74c" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::StatusInStage</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>StatusInStage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in status_in state.</para><para>This function is called by USB stack and the application layer to set the EP0 state machine in status_in state. This function will send zero length IN packet on EP0 to host, indicating positive status. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="437" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="437" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a3c49c88a0f39ad432b7ddd03ae449403" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::StatusOutStage</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>StatusOutStage</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in status_out state.</para><para>This function is called by USB stack and the application layer to set the EP0 state machine in status_out state. This function will read the zero length OUT packet received from USB host on EP0. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="454" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="454" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1adbfe3149090b63dd0334634f5f08b002" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void USBD_CORE_API_T::StallEp0</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>StallEp0</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to set EP0 state machine in stall state.</para><para>This function is called by USB stack and the application layer to generate STALL signaling on EP0 endpoint. This function will also reset the EP0Data buffer. <linebreak/>
<simplesect kind="note"><para>This interface is provided to users to invoke this function in other scenarios which are not handle by current stack. In most user applications this function is not called directly.Also this function can be used by users who are selectively modifying the USB device stack&apos;s standard handlers through callback interface exposed by the stack.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="472" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="472" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a48c164125955a57eacb5e463a566e39e" prot="public" static="no" mutable="no">
        <type><ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref>(*</type>
        <definition>ErrorCode_t USBD_CORE_API_T::GetEpHandler</definition>
        <argsstring>)(USBD_HANDLE_T hUsb, uint32_t ep_index, USB_EP_HANDLER_T *ep_handler, void **data)</argsstring>
        <name>GetEpHandler</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Function to get default EP handler and its parameter for a particular endpoint.</para><para>This function is called by the application layer to retrieve the default Endpoint Handler and its data parameter for a particular endpoint. <linebreak/>
<simplesect kind="note"><para>This interface is provided so that the application could get the default handler, then register their own endpoint handler to do some special handling and then call the default handler.</para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle to the USB device stack. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">ep_index</parametername>
</parameternamelist>
<parameterdescription>
<para>Endpoint index. Computed as<itemizedlist>
<listitem><para>For OUT endpoints = 2 * endpoint number eg. for EP2_OUT it is 4.</para></listitem><listitem><para>For IN endopoints = (2 * endpoint number) + 1 eg. for EP2_IN it is 5. </para></listitem></itemizedlist>
</para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="inout">ep_handler</parametername>
</parameternamelist>
<parameterdescription>
<para>Double Pointer to Endpoint event handler function which is updated in the function. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="inout">data</parametername>
</parameternamelist>
<parameterdescription>
<para>Double Pointer to the data parameter that needs to be passed when calling the event handler. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Returns <ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref> type to indicate success or error condition. </para></simplesect>
<parameterlist kind="retval"><parameteritem>
<parameternamelist>
<parametername>LPC_OK</parametername>
</parameternamelist>
<parameterdescription>
<para>On success </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>ERR_API_INVALID_PARAM2</parametername>
</parameternamelist>
<parameterdescription>
<para>ep_index is outside the boundary ( &lt; 2 * <ref refid="struct_u_s_b_d___a_p_i___i_n_i_t___p_a_r_a_m___t_1af9eae0114be0454c4cce831715faf585" kindref="member">USBD_API_INIT_PARAM_T::max_num_ep</ref>). </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_core.h" line="493" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="493" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>USBD stack Core API functions structure. </para>    </briefdescription>
    <detaileddescription>
<para>This module exposes functions which interact directly with USB device stack&apos;s core layer. The application layer uses this component when it has to implement custom class function driver or standard class function driver which is not part of the current USB device stack. The functions exposed by this interface are to register class specific EP0 handlers and corresponding utility functions to manipulate EP0 state machine of the stack. This interface also exposes function to register custom endpoint interrupt handler. </para>    </detaileddescription>
    <location file="mw_usbd/mw_usbd_core.h" line="320" column="1" bodyfile="mw_usbd/mw_usbd_core.h" bodystart="320" bodyend="495"/>
    <listofallmembers>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1ab1e05c41e0070d3e706ae98e048e4384" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>DataInStage</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1aff6e7a43f616cdcbf9e193da25df684a" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>DataOutStage</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a48c164125955a57eacb5e463a566e39e" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>GetEpHandler</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a651891ae3d6612f6f566384b3d681e36" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>RegisterClassHandler</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a305d05fbc2d0c748b87edcd986bfb767" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>RegisterEpHandler</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a373376ee1855114095288c907687b421" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>SetupStage</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1adbfe3149090b63dd0334634f5f08b002" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>StallEp0</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a714fc392b856668bf6422cfb1ef1d74c" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>StatusInStage</name></member>
      <member refid="struct_u_s_b_d___c_o_r_e___a_p_i___t_1a3c49c88a0f39ad432b7ddd03ae449403" prot="public" virt="non-virtual"><scope>USBD_CORE_API_T</scope><name>StatusOutStage</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>
