<?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>i.MX RT Crossover MCUsのトピックRe: Retrieving a GPIO's direction (input/output)</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531724#M21870</link>
    <description>&lt;P&gt;Currently there is no API function that specifically reads the direction from a GPIO pin;&lt;/P&gt;
&lt;P&gt;The GDIR register functions as direction control when the IOMUXC is in GPIO mode. Each bit specifies the direction of a one-bit signal.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1664814421548.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195607iDA692DF7787B9DEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1664814421548.png" alt="Julin_AragnM_0-1664814421548.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Julin_AragnM_0-1664814421548.png&lt;/span&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_1-1664814421549.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195608iEF768AACF27B3312/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_1-1664814421549.png" alt="Julin_AragnM_1-1664814421549.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Julin_AragnM_1-1664814421549.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The GDIR register is a read/write register which you can read during run-time to store or obtain the direction (input/output) of a GPIO pin.&amp;nbsp; The example you provided (gpio_pin_direction_t F(GPIO_Type *base, uint32_t port)) is a good way of implementing this function.&lt;/P&gt;
&lt;P&gt;I hope you find this helpful! If you have any doubts about the register do not hesitate to ask.&lt;/P&gt;
&lt;P&gt;Best regards, Julian&lt;/P&gt;</description>
    <pubDate>Mon, 03 Oct 2022 16:27:27 GMT</pubDate>
    <dc:creator>Julián_AragónM</dc:creator>
    <dc:date>2022-10-03T16:27:27Z</dc:date>
    <item>
      <title>Retrieving a GPIO's direction (input/output)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531368#M21862</link>
      <description>&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;During run-time, I want to get the direction (input/output) of a GPIO pin.&lt;/P&gt;&lt;P&gt;I was expecting something like: &lt;FONT face="courier new,courier"&gt;gpio_pin_direction_t F(GPIO_Type *base, uint32_t port)&lt;FONT face="arial,helvetica,sans-serif"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Was searching &lt;FONT face="courier new,courier"&gt;fsl_gpio.h&lt;/FONT&gt; &amp;amp;&amp;nbsp;&lt;A href="https://mcuxpresso.nxp.com/api_doc/dev/116/group__lpc__gpio.html" target="_blank"&gt;Reference Manual: GPIO.&lt;/A&gt; No such method is found :[&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there any way to&amp;nbsp;retrieve a GPIO pin direction&amp;nbsp;during run-time?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2022 05:43:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531368#M21862</guid>
      <dc:creator>nadavintel</dc:creator>
      <dc:date>2022-10-02T05:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a GPIO's direction (input/output)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531381#M21863</link>
      <description>&lt;P&gt;Look in the users manual for the chip or look in the fsl_gpio.c file ? There is no guarantee that there is a function in the SDK for every single use of the registers.&lt;BR /&gt;Hint: look at&amp;nbsp;GDIR register for the specific port.....&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2022 12:59:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531381#M21863</guid>
      <dc:creator>carstengroen</dc:creator>
      <dc:date>2022-10-02T12:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a GPIO's direction (input/output)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531724#M21870</link>
      <description>&lt;P&gt;Currently there is no API function that specifically reads the direction from a GPIO pin;&lt;/P&gt;
&lt;P&gt;The GDIR register functions as direction control when the IOMUXC is in GPIO mode. Each bit specifies the direction of a one-bit signal.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1664814421548.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195607iDA692DF7787B9DEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1664814421548.png" alt="Julin_AragnM_0-1664814421548.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Julin_AragnM_0-1664814421548.png&lt;/span&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_1-1664814421549.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195608iEF768AACF27B3312/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_1-1664814421549.png" alt="Julin_AragnM_1-1664814421549.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Julin_AragnM_1-1664814421549.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The GDIR register is a read/write register which you can read during run-time to store or obtain the direction (input/output) of a GPIO pin.&amp;nbsp; The example you provided (gpio_pin_direction_t F(GPIO_Type *base, uint32_t port)) is a good way of implementing this function.&lt;/P&gt;
&lt;P&gt;I hope you find this helpful! If you have any doubts about the register do not hesitate to ask.&lt;/P&gt;
&lt;P&gt;Best regards, Julian&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 16:27:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Retrieving-a-GPIO-s-direction-input-output/m-p/1531724#M21870</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2022-10-03T16:27:27Z</dc:date>
    </item>
  </channel>
</rss>

