<?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>MQX Software SolutionsのトピックSerial Port with Timeout using Timer Event</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-Port-with-Timeout-using-Timer-Event/m-p/407287#M13659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many people have asked about solutions for adding timeouts to the fgetc() blocking function. How about using a timer event to restart the task that called fgetc()? I don't know how to do it, but I think it might have something to do with _taskq_resume().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone used task queues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wayne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2015 02:47:26 GMT</pubDate>
    <dc:creator>waynetaylor</dc:creator>
    <dc:date>2015-06-17T02:47:26Z</dc:date>
    <item>
      <title>Serial Port with Timeout using Timer Event</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-Port-with-Timeout-using-Timer-Event/m-p/407287#M13659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many people have asked about solutions for adding timeouts to the fgetc() blocking function. How about using a timer event to restart the task that called fgetc()? I don't know how to do it, but I think it might have something to do with _taskq_resume().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone used task queues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wayne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 02:47:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-Port-with-Timeout-using-Timer-Event/m-p/407287#M13659</guid>
      <dc:creator>waynetaylor</dc:creator>
      <dc:date>2015-06-17T02:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Port with Timeout using Timer Event</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-Port-with-Timeout-using-Timer-Event/m-p/407288#M13660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wayne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want the task to exit form fgetc() and continue you would need to modify the bsp. But if you dont have problem on restarting the task you may use a timer as you say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MQX installation you can find hwtimer and timer examples. C:\Freescale\Freescale_MQX_4_2\mqx\examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use lwtimer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For restarting the task you need _task_restart()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_task_id uart_task_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uart_task_id = _task_create(0, UART_TASK, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_task_restart(uart_task_id, NULL, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 16:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-Port-with-Timeout-using-Timer-Event/m-p/407288#M13660</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2015-06-23T16:49:07Z</dc:date>
    </item>
  </channel>
</rss>

