2022-04-08 14:42:47 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< meta name = "generator" content = "Doxygen 1.8.5" / >
2024-04-12 13:21:49 +00:00
< title > MCUXpresso SDK API Reference Manual: GPIO: General Purpose I/O< / title >
2022-04-08 14:42:47 +00:00
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< script type = "text/javascript" >
$(document).ready(initResizable);
$(window).load(resizeHeight);
< / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/search.js" > < / script >
< script type = "text/javascript" >
$(document).ready(function() { searchBox.OnSelectItem(0); });
< / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< link href = "customdoxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectlogo" > < img alt = "Logo" src = "fs_logo.gif" / > < / td >
< td style = "padding-left: 0.5em;" >
< div id = "projectname" > MCUXpresso SDK API Reference Manual
2024-04-12 13:21:49 +00:00
  < span id = "projectnumber" > Rev 2.15.000< / span >
2022-04-08 14:42:47 +00:00
< / div >
< div id = "projectbrief" > NXP Semiconductors< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "search",false,'Search');
< / script >
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< li > < a href = "index.html" > < span > Main  Page< / span > < / a > < / li >
< li > < a href = "pages.html" > < span > Related  Pages< / span > < / a > < / li >
< li > < a href = "modules.html" > < span > API  Reference< / span > < / a > < / li >
< li >
< div id = "MSearchBox" class = "MSearchBoxInactive" >
< span class = "left" >
< img id = "MSearchSelect" src = "search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
< input type = "text" id = "MSearchField" value = "Search" accesskey = "S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
< / span > < span class = "right" >
< a id = "MSearchClose" href = "javascript:searchBox.CloseResultsWindow()" > < img id = "MSearchCloseImg" border = "0" src = "search/close.png" alt = "" / > < / a >
< / span >
< / div >
< / li >
< / ul >
< / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
$(document).ready(function(){initNavTree('a00020.html','');});
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(0)" > < span class = "SelectionMark" >   < / span > All< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(1)" > < span class = "SelectionMark" >   < / span > Data Structures< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(2)" > < span class = "SelectionMark" >   < / span > Functions< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(3)" > < span class = "SelectionMark" >   < / span > Variables< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(4)" > < span class = "SelectionMark" >   < / span > Typedefs< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(5)" > < span class = "SelectionMark" >   < / span > Enumerations< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(6)" > < span class = "SelectionMark" >   < / span > Enumerator< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(7)" > < span class = "SelectionMark" >   < / span > Groups< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(8)" > < span class = "SelectionMark" >   < / span > Pages< / a > < / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "summary" >
2024-04-12 13:21:49 +00:00
< a href = "#files" > Files< / a > |
2022-04-08 14:42:47 +00:00
< a href = "#nested-classes" > Data Structures< / a > |
< a href = "#typedef-members" > Typedefs< / a > |
2024-04-12 13:21:49 +00:00
< a href = "#enum-members" > Enumerations< / a > |
< a href = "#func-members" > Functions< / a > < / div >
2022-04-08 14:42:47 +00:00
< div class = "headertitle" >
2024-04-12 13:21:49 +00:00
< div class = "title" > GPIO: General Purpose I/O< / div > < / div >
2022-04-08 14:42:47 +00:00
< / div > <!-- header -->
< div class = "contents" >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Overview< / h2 >
2024-04-12 13:21:49 +00:00
< p > The MCUXpresso SDK provides a peripheral driver for the General Purpose I/O (GPIO) module of MCUXpresso SDK devices.< / p >
< h1 > < a class = "anchor" id = "GPIOFuncGrps" > < / a >
Function groups< / h1 >
< h2 > < a class = "anchor" id = "GPIOInit" > < / a >
Initialization and deinitialization< / h2 >
< p > The function < a class = "el" href = "a00020.html#ga9b8fa194d8fa5a1bf933a709d4dde014" title = "Initializes a GPIO pin used by the board. " > GPIO_PinInit()< / a > initializes the GPIO with specified configuration.< / p >
< h2 > < a class = "anchor" id = "GPIOPinManipulation" > < / a >
Pin manipulation< / h2 >
< p > The function < a class = "el" href = "a00020.html#ga2a1113d96cdf973bb5b1eade3521adf8" title = "Sets the output level of the one GPIO pin to the logic 1 or 0. " > GPIO_PinWrite()< / a > set output state of selected GPIO pin. The function < a class = "el" href = "a00020.html#gabad8dfa62a3e414cc23ff8b32eea81d0" title = "Reads the current input value of the GPIO PIN. " > GPIO_PinRead()< / a > read input value of selected GPIO pin.< / p >
< h2 > < a class = "anchor" id = "GPIOPortManipulation" > < / a >
Port manipulation< / h2 >
< p > The function < a class = "el" href = "a00020.html#ga7206f7b805b8a3c68044345dbbba0a41" title = "Sets the output level of the multiple GPIO pins to the logic 1. " > GPIO_PortSet()< / a > sets the output level of selected GPIO pins to the logic 1. The function < a class = "el" href = "a00020.html#ga185ddb6848a644b40e0620ef6b4ce2cf" title = "Sets the output level of the multiple GPIO pins to the logic 0. " > GPIO_PortClear()< / a > sets the output level of selected GPIO pins to the logic 0. The function < a class = "el" href = "a00020.html#ga07e3b8c21dad1debec7986f214a70975" title = "Reverses current output logic of the multiple GPIO pins. " > GPIO_PortToggle()< / a > reverse the output level of selected GPIO pins. The function GPIO_PortRead() read input value of selected port.< / p >
< h2 > < a class = "anchor" id = "GPIOPortMasking" > < / a >
Port masking< / h2 >
< p > The function GPIO_PortMaskedSet() set port mask, only pins masked by 0 will be enabled in following functions. The function GPIO_PortMaskedWrite() sets the state of selected GPIO port, only pins masked by 0 will be affected. The function GPIO_PortMaskedRead() reads the state of selected GPIO port, only pins masked by 0 are enabled for read, pins masked by 1 are read as 0.< / p >
< h1 > < a class = "anchor" id = "GPIOTpyUC" > < / a >
Typical use case< / h1 >
< p > Example use of GPIO API. Refer to the driver examples codes located at < SDK_ROOT> /boards/< BOARD> /driver_examples/gpio < / p >
2022-04-08 14:42:47 +00:00
< table class = "memberdecls" >
2024-04-12 13:21:49 +00:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "files" > < / a >
Files< / h2 > < / td > < / tr >
< tr class = "memitem:a00195" > < td class = "memItemLeft" align = "right" valign = "top" > file   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00195.html" > fsl_gpio.h< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Data Structures< / h2 > < / td > < / tr >
< tr class = "memitem:a00327" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#a00327" > _gpio_pin_config< / a > < / td > < / tr >
< tr class = "memdesc:a00327" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The GPIO pin configuration structure. < a href = "a00020.html#a00327" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a00327" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "typedef-members" > < / a >
Typedefs< / h2 > < / td > < / tr >
< tr class = "memitem:gaf7d75755774a0f20385fbdda546f1f1d" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "gaf7d75755774a0f20385fbdda546f1f1d" > < / a >
typedef enum < a class = "el" href = "a00020.html#ga0df4be96fa56f3bdd7bfa048fdaacd6b" > _gpio_pin_direction< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#gaf7d75755774a0f20385fbdda546f1f1d" > gpio_pin_direction_t< / a > < / td > < / tr >
< tr class = "memdesc:gaf7d75755774a0f20385fbdda546f1f1d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > LPC GPIO direction definition. < br / > < / td > < / tr >
< tr class = "separator:gaf7d75755774a0f20385fbdda546f1f1d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga9279df0a87f2432dc3c5d596028223b7" > < td class = "memItemLeft" align = "right" valign = "top" > typedef struct < a class = "el" href = "a00020.html#a00327" > _gpio_pin_config< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga9279df0a87f2432dc3c5d596028223b7" > gpio_pin_config_t< / a > < / td > < / tr >
< tr class = "memdesc:ga9279df0a87f2432dc3c5d596028223b7" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The GPIO pin configuration structure. < a href = "#ga9279df0a87f2432dc3c5d596028223b7" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga9279df0a87f2432dc3c5d596028223b7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "enum-members" > < / a >
Enumerations< / h2 > < / td > < / tr >
< tr class = "memitem:ga0df4be96fa56f3bdd7bfa048fdaacd6b" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga0df4be96fa56f3bdd7bfa048fdaacd6b" > _gpio_pin_direction< / a > { < br / >
    < a class = "el" href = "a00020.html#gga0df4be96fa56f3bdd7bfa048fdaacd6babacf19933be1940ab40c83535e6a46d4" > kGPIO_DigitalInput< / a > = 0U,
< br / >
    < a class = "el" href = "a00020.html#gga0df4be96fa56f3bdd7bfa048fdaacd6ba509ebcd228fc813cf4afcacd258680f9" > kGPIO_DigitalOutput< / a > = 1U
< br / >
}< / td > < / tr >
< tr class = "memdesc:ga0df4be96fa56f3bdd7bfa048fdaacd6b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > LPC GPIO direction definition. < a href = "a00020.html#ga0df4be96fa56f3bdd7bfa048fdaacd6b" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga0df4be96fa56f3bdd7bfa048fdaacd6b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:ga7206f7b805b8a3c68044345dbbba0a41" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga7206f7b805b8a3c68044345dbbba0a41" > GPIO_PortSet< / a > (GPIO_Type *base, uint32_t port, uint32_t mask)< / td > < / tr >
< tr class = "memdesc:ga7206f7b805b8a3c68044345dbbba0a41" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets the output level of the multiple GPIO pins to the logic 1. < a href = "#ga7206f7b805b8a3c68044345dbbba0a41" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga7206f7b805b8a3c68044345dbbba0a41" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga185ddb6848a644b40e0620ef6b4ce2cf" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga185ddb6848a644b40e0620ef6b4ce2cf" > GPIO_PortClear< / a > (GPIO_Type *base, uint32_t port, uint32_t mask)< / td > < / tr >
< tr class = "memdesc:ga185ddb6848a644b40e0620ef6b4ce2cf" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets the output level of the multiple GPIO pins to the logic 0. < a href = "#ga185ddb6848a644b40e0620ef6b4ce2cf" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga185ddb6848a644b40e0620ef6b4ce2cf" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga07e3b8c21dad1debec7986f214a70975" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga07e3b8c21dad1debec7986f214a70975" > GPIO_PortToggle< / a > (GPIO_Type *base, uint32_t port, uint32_t mask)< / td > < / tr >
< tr class = "memdesc:ga07e3b8c21dad1debec7986f214a70975" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Reverses current output logic of the multiple GPIO pins. < a href = "#ga07e3b8c21dad1debec7986f214a70975" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga07e3b8c21dad1debec7986f214a70975" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "member-group" > < / a >
Driver version< / h2 > < / td > < / tr >
< tr class = "memitem:ga5aa5229cbd041b11bcf8417ba12896b2" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga5aa5229cbd041b11bcf8417ba12896b2" > FSL_GPIO_DRIVER_VERSION< / a >       (< a class = "el" href = "a00242.html#ga812138aa3315b0c6953c1a26130bcc37" > MAKE_VERSION< / a > (2, 1, 7))< / td > < / tr >
< tr class = "memdesc:ga5aa5229cbd041b11bcf8417ba12896b2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > LPC GPIO driver version. < a href = "#ga5aa5229cbd041b11bcf8417ba12896b2" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga5aa5229cbd041b11bcf8417ba12896b2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "member-group" > < / a >
GPIO Configuration< / h2 > < / td > < / tr >
< tr class = "memitem:ga6fabd21856d350fc0b60ffea3bbca200" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga6fabd21856d350fc0b60ffea3bbca200" > GPIO_PortInit< / a > (GPIO_Type *base, uint32_t port)< / td > < / tr >
< tr class = "memdesc:ga6fabd21856d350fc0b60ffea3bbca200" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Initializes the GPIO peripheral. < a href = "#ga6fabd21856d350fc0b60ffea3bbca200" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga6fabd21856d350fc0b60ffea3bbca200" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga9b8fa194d8fa5a1bf933a709d4dde014" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga9b8fa194d8fa5a1bf933a709d4dde014" > GPIO_PinInit< / a > (GPIO_Type *base, uint32_t port, uint32_t pin, const < a class = "el" href = "a00020.html#ga9279df0a87f2432dc3c5d596028223b7" > gpio_pin_config_t< / a > *config)< / td > < / tr >
< tr class = "memdesc:ga9b8fa194d8fa5a1bf933a709d4dde014" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Initializes a GPIO pin used by the board. < a href = "#ga9b8fa194d8fa5a1bf933a709d4dde014" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga9b8fa194d8fa5a1bf933a709d4dde014" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "member-group" > < / a >
GPIO Output Operations< / h2 > < / td > < / tr >
< tr class = "memitem:ga2a1113d96cdf973bb5b1eade3521adf8" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ga2a1113d96cdf973bb5b1eade3521adf8" > GPIO_PinWrite< / a > (GPIO_Type *base, uint32_t port, uint32_t pin, uint8_t output)< / td > < / tr >
< tr class = "memdesc:ga2a1113d96cdf973bb5b1eade3521adf8" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sets the output level of the one GPIO pin to the logic 1 or 0. < a href = "#ga2a1113d96cdf973bb5b1eade3521adf8" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga2a1113d96cdf973bb5b1eade3521adf8" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "member-group" > < / a >
GPIO Input Operations< / h2 > < / td > < / tr >
< tr class = "memitem:gabad8dfa62a3e414cc23ff8b32eea81d0" > < td class = "memItemLeft" align = "right" valign = "top" > static uint32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#gabad8dfa62a3e414cc23ff8b32eea81d0" > GPIO_PinRead< / a > (GPIO_Type *base, uint32_t port, uint32_t pin)< / td > < / tr >
< tr class = "memdesc:gabad8dfa62a3e414cc23ff8b32eea81d0" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Reads the current input value of the GPIO PIN. < a href = "#gabad8dfa62a3e414cc23ff8b32eea81d0" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gabad8dfa62a3e414cc23ff8b32eea81d0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
2024-04-12 13:21:49 +00:00
< hr / > < h2 class = "groupheader" > Data Structure Documentation< / h2 >
< a name = "a00327" id = "a00327" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > struct _gpio_pin_config< / td >
2023-01-26 02:53:53 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-04-12 13:21:49 +00:00
< div class = "textblock" > < p > Every pin can only be configured as either output pin or input pin at a time. If configured as a input pin, then leave the outputConfig unused. < / p >
< / div > < table class = "memberdecls" >
< tr > < td colspan = "2" > < h3 > Data Fields< / h3 > < / td > < / tr >
< tr class = "memitem:ae01198d65e4be510c4468dce75b6d779" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae01198d65e4be510c4468dce75b6d779" > < / a >
< a class = "el" href = "a00020.html#gaf7d75755774a0f20385fbdda546f1f1d" > gpio_pin_direction_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#ae01198d65e4be510c4468dce75b6d779" > pinDirection< / a > < / td > < / tr >
< tr class = "memdesc:ae01198d65e4be510c4468dce75b6d779" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > GPIO direction, input or output. < br / > < / td > < / tr >
< tr class = "separator:ae01198d65e4be510c4468dce75b6d779" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a70ede6dc868ff6dd15987ba62c5d574b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a70ede6dc868ff6dd15987ba62c5d574b" > < / a >
uint8_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00020.html#a70ede6dc868ff6dd15987ba62c5d574b" > outputLogic< / a > < / td > < / tr >
< tr class = "memdesc:a70ede6dc868ff6dd15987ba62c5d574b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Set default output logic, no use in input. < br / > < / td > < / tr >
< tr class = "separator:a70ede6dc868ff6dd15987ba62c5d574b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< h2 class = "groupheader" > Macro Definition Documentation< / h2 >
< a class = "anchor" id = "ga5aa5229cbd041b11bcf8417ba12896b2" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > #define FSL_GPIO_DRIVER_VERSION      (< a class = "el" href = "a00242.html#ga812138aa3315b0c6953c1a26130bcc37" > MAKE_VERSION< / a > (2, 1, 7))< / td >
2023-01-26 02:53:53 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< h2 class = "groupheader" > Typedef Documentation< / h2 >
< a class = "anchor" id = "ga9279df0a87f2432dc3c5d596028223b7" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > typedef struct < a class = "el" href = "a00020.html#a00327" > _gpio_pin_config< / a > < a class = "el" href = "a00020.html#ga9279df0a87f2432dc3c5d596028223b7" > gpio_pin_config_t< / a > < / td >
2023-01-26 02:53:53 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-04-12 13:21:49 +00:00
< p > Every pin can only be configured as either output pin or input pin at a time. If configured as a input pin, then leave the outputConfig unused. < / p >
2023-01-26 02:53:53 +00:00
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< h2 class = "groupheader" > Enumeration Type Documentation< / h2 >
< a class = "anchor" id = "ga0df4be96fa56f3bdd7bfa048fdaacd6b" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > enum < a class = "el" href = "a00020.html#ga0df4be96fa56f3bdd7bfa048fdaacd6b" > _gpio_pin_direction< / a > < / td >
2023-01-26 02:53:53 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< table class = "fieldtable" >
2024-04-12 13:21:49 +00:00
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < em > < a class = "anchor" id = "gga0df4be96fa56f3bdd7bfa048fdaacd6babacf19933be1940ab40c83535e6a46d4" > < / a > kGPIO_DigitalInput< / em > < / td > < td class = "fielddoc" >
< p > Set current pin as digital input. < / p >
2023-01-26 02:53:53 +00:00
< / td > < / tr >
2024-04-12 13:21:49 +00:00
< tr > < td class = "fieldname" > < em > < a class = "anchor" id = "gga0df4be96fa56f3bdd7bfa048fdaacd6ba509ebcd228fc813cf4afcacd258680f9" > < / a > kGPIO_DigitalOutput< / em > < / td > < td class = "fielddoc" >
< p > Set current pin as digital output. < / p >
2023-01-26 02:53:53 +00:00
< / td > < / tr >
< / table >
2022-04-08 14:42:47 +00:00
< / div >
< / div >
< h2 class = "groupheader" > Function Documentation< / h2 >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga6fabd21856d350fc0b60ffea3bbca200" > < / a >
2022-04-08 14:42:47 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > void GPIO_PortInit < / td >
2022-04-08 14:42:47 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
2023-01-26 02:53:53 +00:00
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-04-12 13:21:49 +00:00
< p > This function ungates the GPIO clock.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
2023-01-26 02:53:53 +00:00
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer. < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number. < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga9b8fa194d8fa5a1bf933a709d4dde014" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > void GPIO_PinInit < / td >
2023-01-26 02:53:53 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > pin< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const < a class = "el" href = "a00020.html#ga9279df0a87f2432dc3c5d596028223b7" > gpio_pin_config_t< / a > *  < / td >
2023-01-26 02:53:53 +00:00
< td class = "paramname" > < em > config< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-04-12 13:21:49 +00:00
< p > To initialize the GPIO, define a pin configuration, either input or output, in the user file. Then, call the < a class = "el" href = "a00020.html#ga9b8fa194d8fa5a1bf933a709d4dde014" title = "Initializes a GPIO pin used by the board. " > GPIO_PinInit()< / a > function.< / p >
< p > This is an example to define an input pin or output pin configuration: < / p >
< div class = "fragment" > < div class = "line" > * Define a digital input pin configuration,< / div >
< div class = "line" > * < a class = "code" href = "a00020.html#a00327" > gpio_pin_config_t< / a > config =< / div >
< div class = "line" > * {< / div >
< div class = "line" > * < a class = "code" href = "a00020.html#gga0df4be96fa56f3bdd7bfa048fdaacd6babacf19933be1940ab40c83535e6a46d4" > kGPIO_DigitalInput< / a > ,< / div >
< div class = "line" > * 0,< / div >
< div class = "line" > * }< / div >
< div class = "line" > * Define a digital output pin configuration,< / div >
< div class = "line" > * < a class = "code" href = "a00020.html#a00327" > gpio_pin_config_t< / a > config =< / div >
< div class = "line" > * {< / div >
< div class = "line" > * < a class = "code" href = "a00020.html#gga0df4be96fa56f3bdd7bfa048fdaacd6ba509ebcd228fc813cf4afcacd258680f9" > kGPIO_DigitalOutput< / a > ,< / div >
< div class = "line" > * 0,< / div >
< div class = "line" > * }< / div >
2023-01-26 02:53:53 +00:00
< div class = "line" > * < / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > pin< / td > < td > GPIO pin number < / td > < / tr >
< tr > < td class = "paramname" > config< / td > < td > GPIO pin configuration pointer < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga2a1113d96cdf973bb5b1eade3521adf8" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
2024-04-12 13:21:49 +00:00
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
2023-01-26 02:53:53 +00:00
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > static void GPIO_PinWrite < / td >
2023-01-26 02:53:53 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2023-01-26 02:53:53 +00:00
< / tr >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "paramkey" > < / td >
2023-01-26 02:53:53 +00:00
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > pin< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > output< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
2024-04-12 13:21:49 +00:00
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
2022-04-08 14:42:47 +00:00
< / div > < div class = "memdoc" >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > pin< / td > < td > GPIO pin number < / td > < / tr >
< tr > < td class = "paramname" > output< / td > < td > GPIO pin output logic level.< ul >
< li > 0: corresponding pin output low-logic level.< / li >
< li > 1: corresponding pin output high-logic level. < / li >
< / ul >
< / td > < / tr >
2022-04-08 14:42:47 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "gabad8dfa62a3e414cc23ff8b32eea81d0" > < / a >
2022-04-08 14:42:47 +00:00
< div class = "memitem" >
< div class = "memproto" >
2024-04-12 13:21:49 +00:00
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
2022-04-08 14:42:47 +00:00
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > static uint32_t GPIO_PinRead < / td >
2022-04-08 14:42:47 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > pin< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
2024-04-12 13:21:49 +00:00
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
2022-04-08 14:42:47 +00:00
< / div > < div class = "memdoc" >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > pin< / td > < td > GPIO pin number < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > GPIO< / td > < td > port input value< ul >
< li > 0: corresponding pin input low-logic level.< / li >
< li > 1: corresponding pin input high-logic level. < / li >
< / ul >
< / td > < / tr >
2022-04-08 14:42:47 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga7206f7b805b8a3c68044345dbbba0a41" > < / a >
2022-04-08 14:42:47 +00:00
< div class = "memitem" >
< div class = "memproto" >
2024-04-12 13:21:49 +00:00
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
2022-04-08 14:42:47 +00:00
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > static void GPIO_PortSet < / td >
2022-04-08 14:42:47 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > mask< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
2024-04-12 13:21:49 +00:00
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
2022-04-08 14:42:47 +00:00
< / div > < div class = "memdoc" >
2023-01-26 02:53:53 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > mask< / td > < td > GPIO pin number macro < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga185ddb6848a644b40e0620ef6b4ce2cf" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
2024-04-12 13:21:49 +00:00
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
2023-01-26 02:53:53 +00:00
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > static void GPIO_PortClear < / td >
2023-01-26 02:53:53 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
2023-01-26 02:53:53 +00:00
< / tr >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "paramkey" > < / td >
2023-01-26 02:53:53 +00:00
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > mask< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
2023-01-26 02:53:53 +00:00
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
2024-04-12 13:21:49 +00:00
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
2023-01-26 02:53:53 +00:00
< / div > < div class = "memdoc" >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > mask< / td > < td > GPIO pin number macro < / td > < / tr >
2023-01-26 02:53:53 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-04-12 13:21:49 +00:00
< a class = "anchor" id = "ga07e3b8c21dad1debec7986f214a70975" > < / a >
2023-01-26 02:53:53 +00:00
< div class = "memitem" >
< div class = "memproto" >
2024-04-12 13:21:49 +00:00
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
2023-01-26 02:53:53 +00:00
< table class = "memname" >
< tr >
2024-04-12 13:21:49 +00:00
< td class = "memname" > static void GPIO_PortToggle < / td >
2023-01-26 02:53:53 +00:00
< td > (< / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > GPIO_Type *  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > port< / em > , < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-04-12 13:21:49 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > mask< / em >   < / td >
2022-04-08 14:42:47 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
2024-04-12 13:21:49 +00:00
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
2022-04-08 14:42:47 +00:00
< / div > < div class = "memdoc" >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-04-12 13:21:49 +00:00
< tr > < td class = "paramname" > base< / td > < td > GPIO peripheral base pointer(Typically GPIO) < / td > < / tr >
< tr > < td class = "paramname" > port< / td > < td > GPIO port number < / td > < / tr >
< tr > < td class = "paramname" > mask< / td > < td > GPIO pin number macro < / td > < / tr >
2022-04-08 14:42:47 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- HTML footer for doxygen 1.8.5 -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul class = "foot" >
< li class = "footer" > © 2016 NXP Semiconductors. All rights reserved.
< / li >
< / ul >
< / div >
< / body >
< / html >