<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックGetMemSize(USBD_CDC_INIT_PARAM_T* param) - where is result used?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/GetMemSize-USBD-CDC-INIT-PARAM-T-param-where-is-result-used/m-p/524432#M7068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larsen on Sun Dec 30 16:11:54 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In the virtual com example for nxpUSBlib, both the structures: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(1) USBD_API_INIT_PARAM_T.. mem_size;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(2) USBD_CDC_INIT_PARAM_T.. mem_size;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;have a mem_size parameter and a corresponding mem_base.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code it says: The call to 'GetMemSize(USBD_CDC_INIT_PARAM_T* param)' returns the required ram size. I suppose it is for (2) the USBD_CDC_INIT_PARAM_T mem_size parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A) Is that correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It says in the notes in USBD_CDC_INIT_PARAM_T struct: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;".. mem_size should be _greater_ than the size returned by USBD_CDC_API::GetMemSize() routine". &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B) Is one byte more than GetMemSize() returns sufficient or should more be reserved? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C) How much more then? Why does the function not simply return the _required_ ram size. No more no less. Would be more clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E) How to determine the mem_size required in the other structure USBD_API_INIT_PARAM_T? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course I could just copy the hardcoded values from the cdc example, but I would like to make it according to the "books" to improve reliability and conserve precious ram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any advice you have.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:48:40 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:48:40Z</dc:date>
    <item>
      <title>GetMemSize(USBD_CDC_INIT_PARAM_T* param) - where is result used?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/GetMemSize-USBD-CDC-INIT-PARAM-T-param-where-is-result-used/m-p/524432#M7068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larsen on Sun Dec 30 16:11:54 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In the virtual com example for nxpUSBlib, both the structures: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(1) USBD_API_INIT_PARAM_T.. mem_size;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(2) USBD_CDC_INIT_PARAM_T.. mem_size;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;have a mem_size parameter and a corresponding mem_base.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code it says: The call to 'GetMemSize(USBD_CDC_INIT_PARAM_T* param)' returns the required ram size. I suppose it is for (2) the USBD_CDC_INIT_PARAM_T mem_size parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A) Is that correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It says in the notes in USBD_CDC_INIT_PARAM_T struct: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;".. mem_size should be _greater_ than the size returned by USBD_CDC_API::GetMemSize() routine". &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;B) Is one byte more than GetMemSize() returns sufficient or should more be reserved? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C) How much more then? Why does the function not simply return the _required_ ram size. No more no less. Would be more clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E) How to determine the mem_size required in the other structure USBD_API_INIT_PARAM_T? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course I could just copy the hardcoded values from the cdc example, but I would like to make it according to the "books" to improve reliability and conserve precious ram.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any advice you have.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:48:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/GetMemSize-USBD-CDC-INIT-PARAM-T-param-where-is-result-used/m-p/524432#M7068</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:48:40Z</dc:date>
    </item>
  </channel>
</rss>

