<?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>topic Reading GPIO output state in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reading-GPIO-output-state/m-p/172446#M2035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does MQX support reading the the state of an ouput GPIO pin? Of course I can keep track manually which pins are set or not, but I find it surprising that there's not a method to do this through the GPIO driver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I'm missing something? I tried&amp;nbsp;GPIO_IOCTL_READ, but that command is only valid for input pins.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Jun 2012 01:00:17 GMT</pubDate>
    <dc:creator>dan_quist</dc:creator>
    <dc:date>2012-06-16T01:00:17Z</dc:date>
    <item>
      <title>Reading GPIO output state</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reading-GPIO-output-state/m-p/172446#M2035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does MQX support reading the the state of an ouput GPIO pin? Of course I can keep track manually which pins are set or not, but I find it surprising that there's not a method to do this through the GPIO driver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I'm missing something? I tried&amp;nbsp;GPIO_IOCTL_READ, but that command is only valid for input pins.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2012 01:00:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Reading-GPIO-output-state/m-p/172446#M2035</guid>
      <dc:creator>dan_quist</dc:creator>
      <dc:date>2012-06-16T01:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reading GPIO output state</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Reading-GPIO-output-state/m-p/172447#M2036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;BR /&gt;What I did on the K60 tower system to read a button I used&amp;nbsp;&lt;SPAN&gt;lwgpio_get_value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Setup the button&lt;BR /&gt;if (!lwgpio_init(&amp;amp;btn1, BSP_BUTTON1, LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE))&lt;BR /&gt;{&lt;BR /&gt;DEBUG_OUT("Initializing button GPIO as input failed.\n");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;lwgpio_set_functionality(&amp;amp;btn1, BSP_BUTTON1_MUX_GPIO);&lt;BR /&gt;lwgpio_set_attribute(&amp;amp;btn1, LWGPIO_ATTR_PULL_UP, LWGPIO_AVAL_ENABLE);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Then some where else you can now read the state of the button&lt;/P&gt;&lt;P&gt;/************************************************************************/&lt;BR /&gt;/* Read Switch */&lt;BR /&gt;/************************************************************************/&lt;BR /&gt;int_16 Read ()&lt;BR /&gt;{&lt;BR /&gt;int_16 result=-1;&lt;/P&gt;&lt;P&gt;if (LWGPIO_VALUE_HIGH == lwgpio_get_value(&amp;amp;btn1))&lt;BR /&gt;{&lt;BR /&gt;DEBUG_OUT("Button IDLE");&lt;BR /&gt;result = 1;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;DEBUG_OUT("Button PRESSED");&lt;BR /&gt;result = 0;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 14:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Reading-GPIO-output-state/m-p/172447#M2036</guid>
      <dc:creator>KJFPE</dc:creator>
      <dc:date>2012-06-18T14:48:21Z</dc:date>
    </item>
  </channel>
</rss>

