<?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___d_f_u___i_n_i_t___p_a_r_a_m___t" kind="struct" language="C++" prot="public">
    <compoundname>USBD_DFU_INIT_PARAM_T</compoundname>
    <includes refid="mw__usbd__dfuuser_8h" local="no">mw_usbd/mw_usbd_dfuuser.h</includes>
      <sectiondef kind="public-attrib">
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a492c4cb17874d0c51ed7c7c0d01d05c7" prot="public" static="no" mutable="no">
        <type>uint32_t</type>
        <definition>uint32_t USBD_DFU_INIT_PARAM_T::mem_base</definition>
        <argsstring></argsstring>
        <name>mem_base</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Base memory location from where the stack can allocate data and buffers. <simplesect kind="note"><para>The memory address set in this field should be accessible by USB DMA controller. Also this value should be aligned on 4 byte boundary. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="63" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="63" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1ad80d6de873114d4cf494c7e542d37cd6" prot="public" static="no" mutable="no">
        <type>uint32_t</type>
        <definition>uint32_t USBD_DFU_INIT_PARAM_T::mem_size</definition>
        <argsstring></argsstring>
        <name>mem_size</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>The size of memory buffer which stack can use. <simplesect kind="note"><para>The <emphasis>mem_size</emphasis> should be greater than the size returned by USBD_DFU_API::GetMemSize() routine. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="68" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="68" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a13622f03c7523aa22d65e52d1606757b" prot="public" static="no" mutable="no">
        <type>uint16_t</type>
        <definition>uint16_t USBD_DFU_INIT_PARAM_T::wTransferSize</definition>
        <argsstring></argsstring>
        <name>wTransferSize</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>DFU transfer block size in number of bytes. This value should match the value set in DFU descriptor provided as part of the descriptor array (<emphasis>high_speed_desc</emphasis>) passed to Init() through <ref refid="struct_u_s_b___c_o_r_e___d_e_s_c_s___t" kindref="compound">USB_CORE_DESCS_T</ref> structure. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="72" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="72" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a4c9ac57ce8fe7033b86f201de0c62ae1" prot="public" static="no" mutable="no">
        <type>uint16_t</type>
        <definition>uint16_t USBD_DFU_INIT_PARAM_T::pad</definition>
        <argsstring></argsstring>
        <name>pad</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="78" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="78" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a2e5f31b4c872dad5f481796b42755330" prot="public" static="no" mutable="no">
        <type>uint8_t *</type>
        <definition>uint8_t* USBD_DFU_INIT_PARAM_T::intf_desc</definition>
        <argsstring></argsstring>
        <name>intf_desc</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Pointer to the DFU interface descriptor within the descriptor array (<emphasis>high_speed_desc</emphasis>) passed to Init() through <ref refid="struct_u_s_b___c_o_r_e___d_e_s_c_s___t" kindref="compound">USB_CORE_DESCS_T</ref> structure. </para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="83" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="83" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a88a170153b9d3d186a7fe4d4106eacc4" prot="public" static="no" mutable="no">
        <type>uint8_t(*</type>
        <definition>uint8_t(* USBD_DFU_INIT_PARAM_T::DFU_Write) (uint32_t block_num, uint8_t **src, uint32_t length, uint8_t *bwPollTimeout)</definition>
        <argsstring>)(uint32_t block_num, uint8_t **src, uint32_t length, uint8_t *bwPollTimeout)</argsstring>
        <name>DFU_Write</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>DFU Write callback function.</para><para>This function is provided by the application software. This function gets called when host sends a write command. For application using zero-copy buffer scheme this function is called for the first time with <emphasis>length</emphasis> parameter set to 0. The application code should update the buffer pointer.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">block_num</parametername>
</parameternamelist>
<parameterdescription>
<para>Destination start address. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="inout">src</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to a pointer to the source of data. Pointer-to-pointer is used to implement zero-copy buffers. See <ref refid="index_1USBD_ZeroCopy" kindref="member">Zero-Copy Data Transfer model</ref> for more details on zero-copy concept. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">bwPollTimeout</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to a 3 byte buffer which the callback implementer should fill with the amount of minimum time, in milliseconds, that the host should wait before sending a subsequent DFU_GETSTATUS request. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">length</parametername>
</parameternamelist>
<parameterdescription>
<para>Number of bytes to be written. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Returns DFU_STATUS_ values defined in <ref refid="mw__usbd__dfu_8h" kindref="compound">mw_usbd_dfu.h</ref>. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="105" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="105" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a33adee815e7a4730394519a93879c68a" prot="public" static="no" mutable="no">
        <type>uint32_t(*</type>
        <definition>uint32_t(* USBD_DFU_INIT_PARAM_T::DFU_Read) (uint32_t block_num, uint8_t **dst, uint32_t length)</definition>
        <argsstring>)(uint32_t block_num, uint8_t **dst, uint32_t length)</argsstring>
        <name>DFU_Read</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>DFU Read callback function.</para><para>This function is provided by the application software. This function gets called when host sends a read command.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">block_num</parametername>
</parameternamelist>
<parameterdescription>
<para>Destination start address. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="inout">dst</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to a pointer to the source of data. Pointer-to-pointer is used to implement zero-copy buffers. See <ref refid="index_1USBD_ZeroCopy" kindref="member">Zero-Copy Data Transfer model</ref> for more details on zero-copy concept. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">length</parametername>
</parameternamelist>
<parameterdescription>
<para>Amount of data copied to destination buffer. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Returns<itemizedlist>
<listitem><para>DFU_STATUS_ values defined in <ref refid="mw__usbd__dfu_8h" kindref="compound">mw_usbd_dfu.h</ref> to return error conditions.</para></listitem><listitem><para>0 if there is no more data to be read. Stack will send EOF frame and set DFU state-machine to dfuIdle state.</para></listitem><listitem><para>length of the data copied, should be greater than or equal to 16. If the data copied is less than DFU <emphasis>wTransferSize</emphasis> the stack will send EOF frame and goes to dfuIdle state. </para></listitem></itemizedlist>
</para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="127" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="127" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a589965bd4374a35f7b33c0319d638bf7" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void(* USBD_DFU_INIT_PARAM_T::DFU_Done) (void)</definition>
        <argsstring>)(void)</argsstring>
        <name>DFU_Done</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>DFU done callback function.</para><para>This function is provided by the application software. This function gets called after firmware download completes.</para><para><simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="138" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="138" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a809a176d5e6c34a9e5fdcf0d0edc7eb5" prot="public" static="no" mutable="no">
        <type>void(*</type>
        <definition>void(* USBD_DFU_INIT_PARAM_T::DFU_Detach) (USBD_HANDLE_T hUsb)</definition>
        <argsstring>)(USBD_HANDLE_T hUsb)</argsstring>
        <name>DFU_Detach</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>DFU detach callback function.</para><para>This function is provided by the application software. This function gets called after USB_REQ_DFU_DETACH is received. Applications which set USB_DFU_WILL_DETACH bit in DFU descriptor should define this function. As part of this function application can call Connect() routine to disconnect and then connect back with host. For application which rely on WinUSB based host application should use this feature since USB reset can be invoked only by kernel drivers on Windows host. By implementing this feature host doen&apos;t have to issue reset instead the device has to do it automatically by disconnect and connect procedure.</para><para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="in">hUsb</parametername>
</parameternamelist>
<parameterdescription>
<para>Handle DFU control structure. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Nothing. </para></simplesect>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="156" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="156" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a01ce4afe40d26e751e0833da395d5a8b" prot="public" static="no" mutable="no">
        <type><ref refid="error_8h_1a905255056c349318139d94aa4523d516" kindref="member">ErrorCode_t</ref>(*</type>
        <definition>ErrorCode_t(* USBD_DFU_INIT_PARAM_T::DFU_Ep0_Hdlr) (USBD_HANDLE_T hUsb, void *data, uint32_t event)</definition>
        <argsstring>)(USBD_HANDLE_T hUsb, void *data, uint32_t event)</argsstring>
        <name>DFU_Ep0_Hdlr</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Optional user override-able function to replace the default DFU class handler.</para><para>The application software could override the default EP0 class handler with their own by providing the handler function address as this data member of the parameter structure. Application which like the default handler should set this data member to zero before calling the USBD_DFU_API::Init(). <linebreak/>
<simplesect kind="note"><para></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">data</parametername>
</parameternamelist>
<parameterdescription>
<para>Pointer to the data which will be passed when callback function is called by the stack. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">event</parametername>
</parameternamelist>
<parameterdescription>
<para>Type of endpoint event. See <ref refid="group___u_s_b_d___h_w_1ga61dde6aa35d2912927ef1b185eedaa13" kindref="member">USBD_EVENT_T</ref> for more details. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The call back should 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_UNHANDLED</parametername>
</parameternamelist>
<parameterdescription>
<para>Event is not handled hence pass the event to next in line. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>ERR_USBD_xxx</parametername>
</parameternamelist>
<parameterdescription>
<para>For other error conditions. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="177" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="177" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a06e3f8330acfd6995861809671e21b06" prot="public" static="no" mutable="no">
        <type>uint32_t(*</type>
        <definition>uint32_t(* USBD_DFU_INIT_PARAM_T::DFU_GetStatus) (uint32_t *timeout, int32_t last)</definition>
        <argsstring>)(uint32_t *timeout, int32_t last)</argsstring>
        <name>DFU_GetStatus</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>Optional callback function to get the status of the previous write(download) transfer.</para><para>This function will be called when the stack needs to know the status of the current transfer. the <emphasis>last</emphasis> param when 1 it indicates that the transfer on going is the last download packet.</para><para><linebreak/>
 <simplesect kind="note"><para>This function will not be called when <bold>USB_REQ_DFU_GETSTATE</bold> requests from Host. </para></simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername direction="out">timeout</parametername>
</parameternamelist>
<parameterdescription>
<para>: If non zero then DFU device will send dfuDNBUSY status when <emphasis>last</emphasis> = 0 or will send dfuMANIFEST when last = 1. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">last</parametername>
</parameternamelist>
<parameterdescription>
<para>: When 1 indicates that the download is complete, 0 otherwise. </para></parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Should return the &apos;bstatus&apos; value to be sent to host as part DFU_GETSTATUS request. </para></simplesect>
<parameterlist kind="retval"><parameteritem>
<parameternamelist>
<parametername>DFU_STATUS_OK</parametername>
</parameternamelist>
<parameterdescription>
<para>on Success. </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>DFU_STATUS_errXXXXXX</parametername>
</parameternamelist>
<parameterdescription>
<para>on DFU standard error (example: #DFU_STATUS_errTARGET) </para></parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>DFU_STATUS_errVENDOR</parametername>
</parameternamelist>
<parameterdescription>
<para>on Vendor specific error (lower 8 bits Bit0-7), set the upper 8 bits (bit15:bit8) with corresponding index to descriptive string supported by the application. </para></parameterdescription>
</parameteritem>
</parameterlist>
</para>        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="mw_usbd/mw_usbd_dfuuser.h" line="199" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="199" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>USB descriptors data 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_dfuuser.h" line="61" column="1" bodyfile="mw_usbd/mw_usbd_dfuuser.h" bodystart="61" bodyend="201"/>
    <listofallmembers>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a809a176d5e6c34a9e5fdcf0d0edc7eb5" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_Detach</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a589965bd4374a35f7b33c0319d638bf7" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_Done</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a01ce4afe40d26e751e0833da395d5a8b" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_Ep0_Hdlr</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a06e3f8330acfd6995861809671e21b06" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_GetStatus</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a33adee815e7a4730394519a93879c68a" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_Read</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a88a170153b9d3d186a7fe4d4106eacc4" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>DFU_Write</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a2e5f31b4c872dad5f481796b42755330" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>intf_desc</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a492c4cb17874d0c51ed7c7c0d01d05c7" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>mem_base</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1ad80d6de873114d4cf494c7e542d37cd6" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>mem_size</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a4c9ac57ce8fe7033b86f201de0c62ae1" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>pad</name></member>
      <member refid="struct_u_s_b_d___d_f_u___i_n_i_t___p_a_r_a_m___t_1a13622f03c7523aa22d65e52d1606757b" prot="public" virt="non-virtual"><scope>USBD_DFU_INIT_PARAM_T</scope><name>wTransferSize</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>
