2022-08-23 15:00:33 +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" / >
2023-08-31 15:30:31 +00:00
< title > MCUXpresso SDK API Reference Manual: Shell< / title >
2022-08-23 15:00:33 +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-03-15 14:23:36 +00:00
  < span id = "projectnumber" > Rev 2.15.000< / span >
2022-08-23 15:00:33 +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('a00071.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" >
< a href = "#nested-classes" > Data Structures< / a > |
< a href = "#define-members" > Macros< / a > |
< a href = "#typedef-members" > Typedefs< / a > |
< a href = "#enum-members" > Enumerations< / a > < / div >
< div class = "headertitle" >
2023-08-31 15:30:31 +00:00
< div class = "title" > Shell< / div > < / div >
2022-08-23 15:00:33 +00:00
< / div > <!-- header -->
< div class = "contents" >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Overview< / h2 >
2023-08-31 15:30:31 +00:00
< p > This section describes the programming interface of the Shell middleware.< / p >
< p > Shell controls MCUs by commands via the specified communication peripheral based on the debug console driver.< / p >
< h1 > < a class = "anchor" id = "ShellFunGrps" > < / a >
Function groups< / h1 >
< h2 > < a class = "anchor" id = "ShellInit" > < / a >
Initialization< / h2 >
< p > To initialize the Shell middleware, call the < span style = "color:red" > < a class = "el" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" title = "Initializes the shell module. " > SHELL_Init()< / a > < / span > function with these parameters. This function automatically enables the middleware.< / p >
2024-03-15 14:23:36 +00:00
< div class = "fragment" > < div class = "line" > < a class = "code" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > < a class = "code" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" > SHELL_Init< / a > (< a class = "code" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, < a class = "code" href = "a00067.html#gaba1cc3859c4f829ee0bc6091184d4b08" > serial_handle_t< / a > serialHandle, < span class = "keywordtype" > char< / span > *prompt);< / div >
2023-08-31 15:30:31 +00:00
< / div > <!-- fragment --> < p > Then, after the initialization was successful, call a command to control MCUs.< / p >
< p > This example shows how to call the < a class = "el" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" title = "Initializes the shell module. " > SHELL_Init()< / a > given the user configuration structure.< / p >
< div class = "fragment" > < div class = "line" > < a class = "code" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" > SHELL_Init< / a > (s_shellHandle, s_serialHandle, < span class = "stringliteral" > " Test@SHELL> " < / span > );< / div >
< / div > <!-- fragment --> < h2 > < a class = "anchor" id = "ShellAdvFeature" > < / a >
Advanced Feature< / h2 >
< ul >
2024-03-15 14:23:36 +00:00
< li > Support to get a character from standard input devices. < div class = "fragment" > < div class = "line" > < span class = "keyword" > static< / span > < a class = "code" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_GetChar(shell_context_handle_t *shellContextHandle, uint8_t *ch);< / div >
2023-08-31 15:30:31 +00:00
< / div > <!-- fragment --> < / li >
< / ul >
< div style = "width:800px;" > < table class = "doxtable" >
< tr >
< th > Commands < / th > < th > Description < / th > < / tr >
< tr >
< td > help < / td > < td > List all the registered commands. < / td > < / tr >
< tr >
< td > exit < / td > < td > Exit program. < / td > < / tr >
< / table >
< / div > < h2 > < a class = "anchor" id = "SHELLOper" > < / a >
Shell Operation< / h2 >
< div class = "fragment" > < div class = "line" > < a class = "code" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" > SHELL_Init< / a > (s_shellHandle, s_serialHandle, < span class = "stringliteral" > " Test@SHELL> " < / span > );< / div >
< div class = "line" > < a class = "code" href = "a00071.html#ga44e3087a3cdea9b62f159e2585dfcd8d" > SHELL_Task< / a > ((s_shellHandle);< / div >
< / div > <!-- fragment --> < table class = "memberdecls" >
2022-08-23 15:00:33 +00:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Data Structures< / h2 > < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:a00494" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#a00494" > _shell_command< / a > < / td > < / tr >
< tr class = "memdesc:a00494" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > User command data configuration structure. < a href = "a00071.html#a00494" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a00494" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "define-members" > < / a >
Macros< / h2 > < / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memitem:ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > SHELL_NON_BLOCKING_MODE< / a >       < a class = "el" href = "a00067.html#gabf238ccb327fd5316f765109d1235ae3" > SERIAL_MANAGER_NON_BLOCKING_MODE< / a > < / td > < / tr >
< tr class = "memdesc:ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Whether use non-blocking mode. < a href = "#ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga30882f4b5fc99cbc21459cc960ef9ffe" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga30882f4b5fc99cbc21459cc960ef9ffe" > SHELL_AUTO_COMPLETE< / a >       (1U)< / td > < / tr >
< tr class = "memdesc:ga30882f4b5fc99cbc21459cc960ef9ffe" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set on/off auto-complete feature. < a href = "#ga30882f4b5fc99cbc21459cc960ef9ffe" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga30882f4b5fc99cbc21459cc960ef9ffe" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaf98219b0fb886040896b83966903a135" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gaf98219b0fb886040896b83966903a135" > SHELL_BUFFER_SIZE< / a >       (64U)< / td > < / tr >
< tr class = "memdesc:gaf98219b0fb886040896b83966903a135" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set console buffer size. < a href = "#gaf98219b0fb886040896b83966903a135" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gaf98219b0fb886040896b83966903a135" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga0800d9fb741c785d0601f0c3d7125f40" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga0800d9fb741c785d0601f0c3d7125f40" > SHELL_MAX_ARGS< / a >       (8U)< / td > < / tr >
< tr class = "memdesc:ga0800d9fb741c785d0601f0c3d7125f40" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set maximum arguments in command. < a href = "#ga0800d9fb741c785d0601f0c3d7125f40" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga0800d9fb741c785d0601f0c3d7125f40" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga4362aa35752c9abf77387a237faaaea5" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga4362aa35752c9abf77387a237faaaea5" > SHELL_HISTORY_COUNT< / a >       (3U)< / td > < / tr >
< tr class = "memdesc:ga4362aa35752c9abf77387a237faaaea5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set maximum count of history commands. < a href = "#ga4362aa35752c9abf77387a237faaaea5" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga4362aa35752c9abf77387a237faaaea5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga8c32b818330b7a6b62a5b819703e5e8f" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ga8c32b818330b7a6b62a5b819703e5e8f" > < / a >
#define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga8c32b818330b7a6b62a5b819703e5e8f" > SHELL_IGNORE_PARAMETER_COUNT< / a >       (0xFF)< / td > < / tr >
< tr class = "memdesc:ga8c32b818330b7a6b62a5b819703e5e8f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to bypass arguments check. < br / > < / td > < / tr >
< tr class = "separator:ga8c32b818330b7a6b62a5b819703e5e8f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaa4c15d7595f7cf7ee5f837a02cbdf574" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gaa4c15d7595f7cf7ee5f837a02cbdf574" > SHELL_HANDLE_SIZE< / a > < / td > < / tr >
< tr class = "memdesc:gaa4c15d7595f7cf7ee5f837a02cbdf574" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The handle size of the shell module. < a href = "#gaa4c15d7595f7cf7ee5f837a02cbdf574" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gaa4c15d7595f7cf7ee5f837a02cbdf574" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga100ef8e4a639c03682d84fb981ba235b" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga100ef8e4a639c03682d84fb981ba235b" > SHELL_USE_COMMON_TASK< / a >       (0U)< / td > < / tr >
< tr class = "memdesc:ga100ef8e4a639c03682d84fb981ba235b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to determine whether use common task. < a href = "#ga100ef8e4a639c03682d84fb981ba235b" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga100ef8e4a639c03682d84fb981ba235b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga5b98f71ea7bd89ef344cac14aa79a1e3" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga5b98f71ea7bd89ef344cac14aa79a1e3" > SHELL_TASK_PRIORITY< / a >       (2U)< / td > < / tr >
< tr class = "memdesc:ga5b98f71ea7bd89ef344cac14aa79a1e3" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set shell task priority. < a href = "#ga5b98f71ea7bd89ef344cac14aa79a1e3" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga5b98f71ea7bd89ef344cac14aa79a1e3" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga416667c8e6b960d2c1ec518b41a06d62" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga416667c8e6b960d2c1ec518b41a06d62" > SHELL_TASK_STACK_SIZE< / a >       (1000U)< / td > < / tr >
< tr class = "memdesc:ga416667c8e6b960d2c1ec518b41a06d62" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Macro to set shell task stack size. < a href = "#ga416667c8e6b960d2c1ec518b41a06d62" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga416667c8e6b960d2c1ec518b41a06d62" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gafdb2c68b2d83d459fc196ab0f58d7ab3" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gafdb2c68b2d83d459fc196ab0f58d7ab3" > SHELL_HANDLE_DEFINE< / a > (name)      uint32_t name[((< a class = "el" href = "a00071.html#gaa4c15d7595f7cf7ee5f837a02cbdf574" > SHELL_HANDLE_SIZE< / a > + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]< / td > < / tr >
< tr class = "memdesc:gafdb2c68b2d83d459fc196ab0f58d7ab3" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Defines the shell handle. < a href = "#gafdb2c68b2d83d459fc196ab0f58d7ab3" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gafdb2c68b2d83d459fc196ab0f58d7ab3" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gacd1f7ee25cd791efee6a45e753ec9824" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gacd1f7ee25cd791efee6a45e753ec9824" > SHELL_COMMAND_DEFINE< / a > (command, descriptor, callback, paramCount)< / td > < / tr >
< tr class = "memdesc:gacd1f7ee25cd791efee6a45e753ec9824" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Defines the shell command structure. < a href = "#gacd1f7ee25cd791efee6a45e753ec9824" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gacd1f7ee25cd791efee6a45e753ec9824" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga16dd6cfbd9db7dafdaa802eda58564b5" > < td class = "memItemLeft" align = "right" valign = "top" > #define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga16dd6cfbd9db7dafdaa802eda58564b5" > SHELL_COMMAND< / a > (command)      & g_shellCommand##command< / td > < / tr >
< tr class = "memdesc:ga16dd6cfbd9db7dafdaa802eda58564b5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Gets the shell command pointer. < a href = "#ga16dd6cfbd9db7dafdaa802eda58564b5" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga16dd6cfbd9db7dafdaa802eda58564b5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "typedef-members" > < / a >
Typedefs< / h2 > < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga404a8f9575fa7e73f64e24e4a1876195" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ga404a8f9575fa7e73f64e24e4a1876195" > < / a >
typedef enum < a class = "el" href = "a00071.html#gaefa59271a266a79694a5c9574f1db8b5" > _shell_status< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > < / td > < / tr >
< tr class = "memdesc:ga404a8f9575fa7e73f64e24e4a1876195" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Shell status. < br / > < / td > < / tr >
< tr class = "separator:ga404a8f9575fa7e73f64e24e4a1876195" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memitem:ga818c3ca274bd83d1dc870a5618eb21f2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ga818c3ca274bd83d1dc870a5618eb21f2" > < / a >
typedef void *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > < / td > < / tr >
< tr class = "memdesc:ga818c3ca274bd83d1dc870a5618eb21f2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The handle of the shell module. < br / > < / td > < / tr >
< tr class = "separator:ga818c3ca274bd83d1dc870a5618eb21f2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga7ace1ddfb1e83ac1516ac44be90cf822" > < td class = "memItemLeft" align = "right" valign = "top" > typedef < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > (*  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga7ace1ddfb1e83ac1516ac44be90cf822" > cmd_function_t< / a > )(< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, int32_t argc, char **argv)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:ga7ace1ddfb1e83ac1516ac44be90cf822" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > User command function prototype. < a href = "#ga7ace1ddfb1e83ac1516ac44be90cf822" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga7ace1ddfb1e83ac1516ac44be90cf822" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga408f7fb32b47f13f37eb195eb51074fe" > < td class = "memItemLeft" align = "right" valign = "top" > typedef struct < a class = "el" href = "a00071.html#a00494" > _shell_command< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > < / td > < / tr >
< tr class = "memdesc:ga408f7fb32b47f13f37eb195eb51074fe" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > User command data configuration structure. < a href = "#ga408f7fb32b47f13f37eb195eb51074fe" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga408f7fb32b47f13f37eb195eb51074fe" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "enum-members" > < / a >
Enumerations< / h2 > < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:gaefa59271a266a79694a5c9574f1db8b5" > < td class = "memItemLeft" align = "right" valign = "top" > enum   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gaefa59271a266a79694a5c9574f1db8b5" > _shell_status< / a > { < br / >
    < a class = "el" href = "a00071.html#ggaefa59271a266a79694a5c9574f1db8b5aeb6cf57843c8b47b87ae07417d53df3e" > kStatus_SHELL_Success< / a > = kStatus_Success,
2022-08-23 15:00:33 +00:00
< br / >
2024-03-15 14:23:36 +00:00
    < a class = "el" href = "a00071.html#ggaefa59271a266a79694a5c9574f1db8b5ae1a9ae61e350888892f4cde21f8dd7f9" > kStatus_SHELL_Error< / a > = MAKE_STATUS(kStatusGroup_SHELL, 1),
2022-08-23 15:00:33 +00:00
< br / >
2024-03-15 14:23:36 +00:00
    < a class = "el" href = "a00071.html#ggaefa59271a266a79694a5c9574f1db8b5a25ff80ec847b1028041ae913beec2b5b" > kStatus_SHELL_OpenWriteHandleFailed< / a > = MAKE_STATUS(kStatusGroup_SHELL, 2),
2022-08-23 15:00:33 +00:00
< br / >
2024-03-15 14:23:36 +00:00
    < a class = "el" href = "a00071.html#ggaefa59271a266a79694a5c9574f1db8b5a14f89a732b5c11a35e8c9b91d4e22ad8" > kStatus_SHELL_OpenReadHandleFailed< / a > = MAKE_STATUS(kStatusGroup_SHELL, 3),
2022-08-23 15:00:33 +00:00
< br / >
2024-03-15 14:23:36 +00:00
    < a class = "el" href = "a00071.html#ggaefa59271a266a79694a5c9574f1db8b5ad139f389943f49d948bbff024d6c5a26" > kStatus_SHELL_RetUsage< / a > = MAKE_STATUS(kStatusGroup_SHELL, 4)
2022-08-23 15:00:33 +00:00
< br / >
}< / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memdesc:gaefa59271a266a79694a5c9574f1db8b5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Shell status. < a href = "a00071.html#gaefa59271a266a79694a5c9574f1db8b5" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gaefa59271a266a79694a5c9574f1db8b5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "member-group" > < / a >
2023-08-31 15:30:31 +00:00
Shell functional operation< / h2 > < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga7961e946400cd244c315cfbbd36ae5d1" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" > SHELL_Init< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, < a class = "el" href = "a00067.html#gaba1cc3859c4f829ee0bc6091184d4b08" > serial_handle_t< / a > serialHandle, char *prompt)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:ga7961e946400cd244c315cfbbd36ae5d1" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Initializes the shell module. < a href = "#ga7961e946400cd244c315cfbbd36ae5d1" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga7961e946400cd244c315cfbbd36ae5d1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:gab5f85f3ba2cc7dd58bc85076c19c5177" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gab5f85f3ba2cc7dd58bc85076c19c5177" > SHELL_RegisterCommand< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > *shellCommand)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:gab5f85f3ba2cc7dd58bc85076c19c5177" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Registers the shell command. < a href = "#gab5f85f3ba2cc7dd58bc85076c19c5177" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gab5f85f3ba2cc7dd58bc85076c19c5177" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga53355638d856258b0bcb76e308803dab" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga53355638d856258b0bcb76e308803dab" > SHELL_UnregisterCommand< / a > (< a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > *shellCommand)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:ga53355638d856258b0bcb76e308803dab" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Unregisters the shell command. < a href = "#ga53355638d856258b0bcb76e308803dab" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga53355638d856258b0bcb76e308803dab" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga9f182608b5a6107757be5bb8a90ad74c" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga9f182608b5a6107757be5bb8a90ad74c" > SHELL_Write< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, const char *buffer, uint32_t length)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:ga9f182608b5a6107757be5bb8a90ad74c" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sends data to the shell output stream. < a href = "#ga9f182608b5a6107757be5bb8a90ad74c" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga9f182608b5a6107757be5bb8a90ad74c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaade5449d8cbfc3cd026667b40c35d29f" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gaade5449d8cbfc3cd026667b40c35d29f" > SHELL_Printf< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, const char *formatString,...)< / td > < / tr >
< tr class = "memdesc:gaade5449d8cbfc3cd026667b40c35d29f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Writes formatted output to the shell output stream. < a href = "#gaade5449d8cbfc3cd026667b40c35d29f" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gaade5449d8cbfc3cd026667b40c35d29f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:ga6466b141fd4f94e78636e4a15c302dda" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga6466b141fd4f94e78636e4a15c302dda" > SHELL_WriteSynchronization< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, const char *buffer, uint32_t length)< / td > < / tr >
2023-08-31 15:30:31 +00:00
< tr class = "memdesc:ga6466b141fd4f94e78636e4a15c302dda" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Sends data to the shell output stream with OS synchronization. < a href = "#ga6466b141fd4f94e78636e4a15c302dda" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga6466b141fd4f94e78636e4a15c302dda" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga56c78f6217a822015a9369bf3e52e92a" > < td class = "memItemLeft" align = "right" valign = "top" > int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga56c78f6217a822015a9369bf3e52e92a" > SHELL_PrintfSynchronization< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, const char *formatString,...)< / td > < / tr >
< tr class = "memdesc:ga56c78f6217a822015a9369bf3e52e92a" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Writes formatted output to the shell output stream with OS synchronization. < a href = "#ga56c78f6217a822015a9369bf3e52e92a" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga56c78f6217a822015a9369bf3e52e92a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaca4540dc42f8892cb276691644a247e2" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gaca4540dc42f8892cb276691644a247e2" > SHELL_ChangePrompt< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, char *prompt)< / td > < / tr >
< tr class = "memdesc:gaca4540dc42f8892cb276691644a247e2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Change shell prompt. < a href = "#gaca4540dc42f8892cb276691644a247e2" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gaca4540dc42f8892cb276691644a247e2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gad2a840776dee8490d482a0692fbf2d7e" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#gad2a840776dee8490d482a0692fbf2d7e" > SHELL_PrintPrompt< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle)< / td > < / tr >
< tr class = "memdesc:gad2a840776dee8490d482a0692fbf2d7e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Print shell prompt. < a href = "#gad2a840776dee8490d482a0692fbf2d7e" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:gad2a840776dee8490d482a0692fbf2d7e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga44e3087a3cdea9b62f159e2585dfcd8d" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga44e3087a3cdea9b62f159e2585dfcd8d" > SHELL_Task< / a > (< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle)< / td > < / tr >
< tr class = "memdesc:ga44e3087a3cdea9b62f159e2585dfcd8d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The task function for Shell. < a href = "#ga44e3087a3cdea9b62f159e2585dfcd8d" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga44e3087a3cdea9b62f159e2585dfcd8d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga4eeb17b16773359c132f1d40478938ec" > < td class = "memItemLeft" align = "right" valign = "top" > static bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ga4eeb17b16773359c132f1d40478938ec" > SHELL_checkRunningInIsr< / a > (void)< / td > < / tr >
< tr class = "memdesc:ga4eeb17b16773359c132f1d40478938ec" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Check if code is running in ISR. < a href = "#ga4eeb17b16773359c132f1d40478938ec" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ga4eeb17b16773359c132f1d40478938ec" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< hr / > < h2 class = "groupheader" > Data Structure Documentation< / h2 >
2024-03-15 14:23:36 +00:00
< a name = "a00494" id = "a00494" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > struct _shell_command< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< div class = "textblock" > < / div > < table class = "memberdecls" >
< tr > < td colspan = "2" > < h3 > Data Fields< / h3 > < / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr class = "memitem:a02e67ebfd942afb269dbfa8906dabb4a" > < td class = "memItemLeft" align = "right" valign = "top" > const char *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#a02e67ebfd942afb269dbfa8906dabb4a" > pcCommand< / a > < / td > < / tr >
< tr class = "memdesc:a02e67ebfd942afb269dbfa8906dabb4a" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The command that is executed. < a href = "#a02e67ebfd942afb269dbfa8906dabb4a" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a02e67ebfd942afb269dbfa8906dabb4a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:acce9b1b9a25275d44a705457522151b6" > < td class = "memItemLeft" align = "right" valign = "top" > char *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#acce9b1b9a25275d44a705457522151b6" > pcHelpString< / a > < / td > < / tr >
< tr class = "memdesc:acce9b1b9a25275d44a705457522151b6" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > String that describes how to use the command. < a href = "#acce9b1b9a25275d44a705457522151b6" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:acce9b1b9a25275d44a705457522151b6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab6ae0c867566014c33620c413c568a68" > < td class = "memItemLeft" align = "right" valign = "top" > const < a class = "el" href = "a00071.html#ga7ace1ddfb1e83ac1516ac44be90cf822" > cmd_function_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ab6ae0c867566014c33620c413c568a68" > pFuncCallBack< / a > < / td > < / tr >
< tr class = "memdesc:ab6ae0c867566014c33620c413c568a68" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > A pointer to the callback function that returns the output generated by the command. < a href = "#ab6ae0c867566014c33620c413c568a68" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ab6ae0c867566014c33620c413c568a68" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9304a184b0817140b357805e4e324f58" > < td class = "memItemLeft" align = "right" valign = "top" > uint8_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#a9304a184b0817140b357805e4e324f58" > cExpectedNumberOfParameters< / a > < / td > < / tr >
< tr class = "memdesc:a9304a184b0817140b357805e4e324f58" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Commands expect a fixed number of parameters, which may be zero. < a href = "#a9304a184b0817140b357805e4e324f58" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a9304a184b0817140b357805e4e324f58" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab656143c38d8fc0338aa2e58e76d73a2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ab656143c38d8fc0338aa2e58e76d73a2" > < / a >
list_element_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "a00071.html#ab656143c38d8fc0338aa2e58e76d73a2" > link< / a > < / td > < / tr >
< tr class = "memdesc:ab656143c38d8fc0338aa2e58e76d73a2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > link of the element < br / > < / td > < / tr >
< tr class = "separator:ab656143c38d8fc0338aa2e58e76d73a2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< h4 class = "groupheader" > Field Documentation< / h4 >
2024-03-15 14:23:36 +00:00
< a class = "anchor" id = "a02e67ebfd942afb269dbfa8906dabb4a" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > const char* _shell_command::pcCommand< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > For example "help". It must be all lower case. < / p >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2024-03-15 14:23:36 +00:00
< a class = "anchor" id = "acce9b1b9a25275d44a705457522151b6" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > char* _shell_command::pcHelpString< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > It should start with the command itself, and end with "\r\n". For example "help: Returns a list of all the commands\r\n". < / p >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2024-03-15 14:23:36 +00:00
< a class = "anchor" id = "ab6ae0c867566014c33620c413c568a68" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > const < a class = "el" href = "a00071.html#ga7ace1ddfb1e83ac1516ac44be90cf822" > cmd_function_t< / a > _shell_command::pFuncCallBack< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2024-03-15 14:23:36 +00:00
< a class = "anchor" id = "a9304a184b0817140b357805e4e324f58" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > uint8_t _shell_command::cExpectedNumberOfParameters< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< h2 class = "groupheader" > Macro Definition Documentation< / h2 >
< a class = "anchor" id = "ga30f0f53e0fd0ab3f7f4696f8f8e3e8ab" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_NON_BLOCKING_MODE      < a class = "el" href = "a00067.html#gabf238ccb327fd5316f765109d1235ae3" > SERIAL_MANAGER_NON_BLOCKING_MODE< / a > < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga30882f4b5fc99cbc21459cc960ef9ffe" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_AUTO_COMPLETE      (1U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gaf98219b0fb886040896b83966903a135" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_BUFFER_SIZE      (64U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga0800d9fb741c785d0601f0c3d7125f40" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_MAX_ARGS      (8U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga4362aa35752c9abf77387a237faaaea5" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_HISTORY_COUNT      (3U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
2023-08-31 15:30:31 +00:00
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a class = "anchor" id = "gaa4c15d7595f7cf7ee5f837a02cbdf574" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2022-08-23 15:00:33 +00:00
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_HANDLE_SIZE< / td >
2022-08-23 15:00:33 +00:00
< / tr >
2023-08-31 15:30:31 +00:00
< / table >
< / div > < div class = "memdoc" >
< b > Value:< / b > < div class = "fragment" > < div class = "line" > (160U + < a class = "code" href = "a00071.html#ga4362aa35752c9abf77387a237faaaea5" > SHELL_HISTORY_COUNT< / a > * < a class = "code" href = "a00071.html#gaf98219b0fb886040896b83966903a135" > SHELL_BUFFER_SIZE< / a > + < a class = "code" href = "a00071.html#gaf98219b0fb886040896b83966903a135" > SHELL_BUFFER_SIZE< / a > + SERIAL_MANAGER_READ_HANDLE_SIZE + < a class = "code" href = "a00067.html#gac278be51c3508495c1be1a4cff566f3f" > \< / a > < / div >
< div class = "line" > < a class = "code" href = "a00067.html#gac278be51c3508495c1be1a4cff566f3f" > SERIAL_MANAGER_WRITE_HANDLE_SIZE< / a > )< / div >
< div class = "ttc" id = "a00071_html_gaf98219b0fb886040896b83966903a135" > < div class = "ttname" > < a href = "a00071.html#gaf98219b0fb886040896b83966903a135" > SHELL_BUFFER_SIZE< / a > < / div > < div class = "ttdeci" > #define SHELL_BUFFER_SIZE< / div > < div class = "ttdoc" > Macro to set console buffer size. < / div > < div class = "ttdef" > < b > Definition:< / b > fsl_shell.h:35< / div > < / div >
2024-03-15 14:23:36 +00:00
< div class = "ttc" id = "a00067_html_gac278be51c3508495c1be1a4cff566f3f" > < div class = "ttname" > < a href = "a00067.html#gac278be51c3508495c1be1a4cff566f3f" > SERIAL_MANAGER_WRITE_HANDLE_SIZE< / a > < / div > < div class = "ttdeci" > #define SERIAL_MANAGER_WRITE_HANDLE_SIZE< / div > < div class = "ttdoc" > Set serial manager write handle size. < / div > < div class = "ttdef" > < b > Definition:< / b > fsl_component_serial_manager.h:114< / div > < / div >
2023-08-31 15:30:31 +00:00
< div class = "ttc" id = "a00071_html_ga4362aa35752c9abf77387a237faaaea5" > < div class = "ttname" > < a href = "a00071.html#ga4362aa35752c9abf77387a237faaaea5" > SHELL_HISTORY_COUNT< / a > < / div > < div class = "ttdeci" > #define SHELL_HISTORY_COUNT< / div > < div class = "ttdoc" > Macro to set maximum count of history commands. < / div > < div class = "ttdef" > < b > Definition:< / b > fsl_shell.h:43< / div > < / div >
< / div > <!-- fragment --> < p > It is the sum of the SHELL_HISTORY_COUNT * SHELL_BUFFER_SIZE + SHELL_BUFFER_SIZE + SERIAL_MANAGER_READ_HANDLE_SIZE + SERIAL_MANAGER_WRITE_HANDLE_SIZE < / p >
< / div >
< / div >
< a class = "anchor" id = "ga100ef8e4a639c03682d84fb981ba235b" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2022-08-23 15:00:33 +00:00
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_USE_COMMON_TASK      (0U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
2023-08-31 15:30:31 +00:00
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a class = "anchor" id = "ga5b98f71ea7bd89ef344cac14aa79a1e3" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
2022-08-23 15:00:33 +00:00
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_TASK_PRIORITY      (2U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga416667c8e6b960d2c1ec518b41a06d62" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_TASK_STACK_SIZE      (1000U)< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gafdb2c68b2d83d459fc196ab0f58d7ab3" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_HANDLE_DEFINE< / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > name< / td > < td > )< / td >
< td >       uint32_t name[((< a class = "el" href = "a00071.html#gaa4c15d7595f7cf7ee5f837a02cbdf574" > SHELL_HANDLE_SIZE< / a > + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This macro is used to define a 4 byte aligned shell handle. Then use "(shell_handle_t)name" to get the shell handle.< / p >
< p > The macro should be global and could be optional. You could also define shell handle by yourself.< / p >
< p > This is an example, < / p >
< div class = "fragment" > < div class = "line" > * < a class = "code" href = "a00071.html#gafdb2c68b2d83d459fc196ab0f58d7ab3" > SHELL_HANDLE_DEFINE< / a > (shellHandle);< / div >
< div class = "line" > * < / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
2022-08-23 15:00:33 +00:00
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > name< / td > < td > The name string of the shell handle. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gacd1f7ee25cd791efee6a45e753ec9824" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_COMMAND_DEFINE< / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > command, < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" >   < / td >
< td class = "paramname" > descriptor, < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
2022-08-23 15:00:33 +00:00
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > callback, < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" >   < / td >
< td class = "paramname" > paramCount  < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-03-15 14:23:36 +00:00
< b > Value:< / b > < div class = "fragment" > < div class = "line" > < a class = "code" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > \< / a > < / div >
< div class = "line" > < a class = "code" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > g_shellCommand##command = { \< / div >
2023-08-31 15:30:31 +00:00
< div class = "line" > (#command), (descriptor), (callback), (paramCount), {0}, \< / div >
< div class = "line" > }< / div >
2024-03-15 14:23:36 +00:00
< div class = "ttc" id = "a00071_html_ga408f7fb32b47f13f37eb195eb51074fe" > < div class = "ttname" > < a href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > < / div > < div class = "ttdeci" > struct _shell_command shell_command_t< / div > < div class = "ttdoc" > User command data configuration structure. < / div > < / div >
< / div > <!-- fragment --> < p > This macro is used to define the shell command structure < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" title = "User command data configuration structure. " > shell_command_t< / a > . And then uses the macro SHELL_COMMAND to get the command structure pointer. The macro should not be used in any function.< / p >
2023-08-31 15:30:31 +00:00
< p > This is a example, < / p >
< div class = "fragment" > < div class = "line" > * < a class = "code" href = "a00071.html#gacd1f7ee25cd791efee6a45e753ec9824" > SHELL_COMMAND_DEFINE< / a > (exit, < span class = "stringliteral" > " \r\n\" exit\" : Exit program\r\n" < / span > , SHELL_ExitCommand, 0);< / div >
< div class = "line" > * < a class = "code" href = "a00071.html#gab5f85f3ba2cc7dd58bc85076c19c5177" > SHELL_RegisterCommand< / a > (s_shellHandle, < a class = "code" href = "a00071.html#ga16dd6cfbd9db7dafdaa802eda58564b5" > SHELL_COMMAND< / a > (exit));< / div >
< div class = "line" > * < / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
2022-08-23 15:00:33 +00:00
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > command< / td > < td > The command string of the command. The double quotes do not need. Such as exit for "exit", help for "Help", read for "read". < / td > < / tr >
< tr > < td class = "paramname" > descriptor< / td > < td > The description of the command is used for showing the command usage when "help" is typing. < / td > < / tr >
< tr > < td class = "paramname" > callback< / td > < td > The callback of the command is used to handle the command line when the input command is matched. < / td > < / tr >
< tr > < td class = "paramname" > paramCount< / td > < td > The max parameter count of the current command. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga16dd6cfbd9db7dafdaa802eda58564b5" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > #define SHELL_COMMAND< / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > command< / td > < td > )< / td >
< td >       & g_shellCommand##command< / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This macro is used to get the shell command pointer. The macro should not be used before the macro SHELL_COMMAND_DEFINE is used.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > command< / td > < td > The command string of the command. The double quotes do not need. Such as exit for "exit", help for "Help", read for "read". < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< h2 class = "groupheader" > Typedef Documentation< / h2 >
< a class = "anchor" id = "ga7ace1ddfb1e83ac1516ac44be90cf822" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > typedef < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > (* cmd_function_t)(< a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > shellHandle, int32_t argc, char **argv)< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a class = "anchor" id = "ga408f7fb32b47f13f37eb195eb51074fe" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > typedef struct < a class = "el" href = "a00071.html#a00494" > _shell_command< / a > < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< h2 class = "groupheader" > Enumeration Type Documentation< / h2 >
2024-03-15 14:23:36 +00:00
< a class = "anchor" id = "gaefa59271a266a79694a5c9574f1db8b5" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > enum < a class = "el" href = "a00071.html#gaefa59271a266a79694a5c9574f1db8b5" > _shell_status< / a > < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< table class = "fieldtable" >
2024-03-15 14:23:36 +00:00
< tr > < th colspan = "2" > Enumerator< / th > < / tr > < tr > < td class = "fieldname" > < em > < a class = "anchor" id = "ggaefa59271a266a79694a5c9574f1db8b5aeb6cf57843c8b47b87ae07417d53df3e" > < / a > kStatus_SHELL_Success< / em > < / td > < td class = "fielddoc" >
2023-08-31 15:30:31 +00:00
< p > Success. < / p >
< / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr > < td class = "fieldname" > < em > < a class = "anchor" id = "ggaefa59271a266a79694a5c9574f1db8b5ae1a9ae61e350888892f4cde21f8dd7f9" > < / a > kStatus_SHELL_Error< / em > < / td > < td class = "fielddoc" >
2023-08-31 15:30:31 +00:00
< p > Failed. < / p >
< / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr > < td class = "fieldname" > < em > < a class = "anchor" id = "ggaefa59271a266a79694a5c9574f1db8b5a25ff80ec847b1028041ae913beec2b5b" > < / a > kStatus_SHELL_OpenWriteHandleFailed< / em > < / td > < td class = "fielddoc" >
2023-08-31 15:30:31 +00:00
< p > Open write handle failed. < / p >
< / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr > < td class = "fieldname" > < em > < a class = "anchor" id = "ggaefa59271a266a79694a5c9574f1db8b5a14f89a732b5c11a35e8c9b91d4e22ad8" > < / a > kStatus_SHELL_OpenReadHandleFailed< / em > < / td > < td class = "fielddoc" >
2023-08-31 15:30:31 +00:00
< p > Open read handle failed. < / p >
< / td > < / tr >
2024-03-15 14:23:36 +00:00
< tr > < td class = "fieldname" > < em > < a class = "anchor" id = "ggaefa59271a266a79694a5c9574f1db8b5ad139f389943f49d948bbff024d6c5a26" > < / a > kStatus_SHELL_RetUsage< / em > < / td > < td class = "fielddoc" >
2023-08-31 15:30:31 +00:00
< p > RetUsage for print cmd usage. < / p >
< / td > < / tr >
< / table >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< h2 class = "groupheader" > Function Documentation< / h2 >
< a class = "anchor" id = "ga7961e946400cd244c315cfbbd36ae5d1" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_Init < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00067.html#gaba1cc3859c4f829ee0bc6091184d4b08" > serial_handle_t< / a >   < / td >
< td class = "paramname" > < em > serialHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > char *  < / td >
< td class = "paramname" > < em > prompt< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function must be called before calling all other Shell functions. Call operation the Shell commands with user-defined settings. The example below shows how to set up the Shell and how to call the SHELL_Init function by passing in these parameters. This is an example. < / p >
< div class = "fragment" > < div class = "line" > * < span class = "keyword" > static< / span > < a class = "code" href = "a00071.html#gafdb2c68b2d83d459fc196ab0f58d7ab3" > SHELL_HANDLE_DEFINE< / a > (s_shellHandle);< / div >
< div class = "line" > * < a class = "code" href = "a00071.html#ga7961e946400cd244c315cfbbd36ae5d1" > SHELL_Init< / a > ((< a class = "code" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a > )s_shellHandle, (< a class = "code" href = "a00067.html#gaba1cc3859c4f829ee0bc6091184d4b08" > serial_handle_t< / a > )s_serialHandle, < span class = "stringliteral" > " Test@SHELL> " < / span > );< / div >
< div class = "line" > * < / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
2022-08-23 15:00:33 +00:00
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > Pointer to point to a memory space of size < a class = "el" href = "a00071.html#gaa4c15d7595f7cf7ee5f837a02cbdf574" title = "The handle size of the shell module. " > SHELL_HANDLE_SIZE< / a > allocated by the caller. The handle should be 4 byte aligned, because unaligned access doesn't be supported on some devices. You can define the handle in the following two ways: < a class = "el" href = "a00071.html#gafdb2c68b2d83d459fc196ab0f58d7ab3" title = "Defines the shell handle. " > SHELL_HANDLE_DEFINE(shellHandle)< / a > ; or uint32_t shellHandle[((SHELL_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]; < / td > < / tr >
< tr > < td class = "paramname" > serialHandle< / td > < td > The serial manager module handle pointer. < / td > < / tr >
< tr > < td class = "paramname" > prompt< / td > < td > The string prompt pointer of Shell. Only the global variable can be passed. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
< tr > < td class = "paramname" > kStatus_SHELL_Success< / td > < td > The shell initialization succeed. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_Error< / td > < td > An error occurred when the shell is initialized. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_OpenWriteHandleFailed< / td > < td > Open the write handle failed. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_OpenReadHandleFailed< / td > < td > Open the read handle failed. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gab5f85f3ba2cc7dd58bc85076c19c5177" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_RegisterCommand < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2024-03-15 14:23:36 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > *  < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramname" > < em > shellCommand< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function is used to register the shell command by using the command configuration shell_command_config_t. This is a example, < / p >
< div class = "fragment" > < div class = "line" > * < a class = "code" href = "a00071.html#gacd1f7ee25cd791efee6a45e753ec9824" > SHELL_COMMAND_DEFINE< / a > (exit, < span class = "stringliteral" > " \r\n\" exit\" : Exit program\r\n" < / span > , SHELL_ExitCommand, 0);< / div >
< div class = "line" > * < a class = "code" href = "a00071.html#gab5f85f3ba2cc7dd58bc85076c19c5177" > SHELL_RegisterCommand< / a > (s_shellHandle, < a class = "code" href = "a00071.html#ga16dd6cfbd9db7dafdaa802eda58564b5" > SHELL_COMMAND< / a > (exit));< / div >
< div class = "line" > * < / div >
< / div > <!-- fragment --> < dl class = "params" > < dt > Parameters< / dt > < dd >
2022-08-23 15:00:33 +00:00
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer. < / td > < / tr >
< tr > < td class = "paramname" > shellCommand< / td > < td > The command element. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
< tr > < td class = "paramname" > kStatus_SHELL_Success< / td > < td > Successfully register the command. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_Error< / td > < td > An error occurred. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga53355638d856258b0bcb76e308803dab" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_UnregisterCommand < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2024-03-15 14:23:36 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga408f7fb32b47f13f37eb195eb51074fe" > shell_command_t< / a > *  < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramname" > < em > shellCommand< / em > < / td > < td > )< / td >
2022-08-23 15:00:33 +00:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function is used to unregister the shell command.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellCommand< / td > < td > The command element. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > kStatus_SHELL_Success< / td > < td > Successfully unregister the command. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga9f182608b5a6107757be5bb8a90ad74c" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_Write < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > length< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function is used to send data to the shell output stream.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer. < / td > < / tr >
< tr > < td class = "paramname" > buffer< / td > < td > Start address of the data to write. < / td > < / tr >
< tr > < td class = "paramname" > length< / td > < td > Length of the data to write. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > kStatus_SHELL_Success< / td > < td > Successfully send data. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_Error< / td > < td > An error occurred. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gaade5449d8cbfc3cd026667b40c35d29f" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > int SHELL_Printf < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > formatString< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > < em > ...< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > Call this function to write a formatted output to the shell output stream.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer.< / td > < / tr >
< tr > < td class = "paramname" > formatString< / td > < td > Format string. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
2023-08-31 15:30:31 +00:00
< dl class = "section return" > < dt > Returns< / dt > < dd > Returns the number of characters printed or a negative value if an error occurs. < / dd > < / dl >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga6466b141fd4f94e78636e4a15c302dda" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-03-15 14:23:36 +00:00
< td class = "memname" > < a class = "el" href = "a00071.html#ga404a8f9575fa7e73f64e24e4a1876195" > shell_status_t< / a > SHELL_WriteSynchronization < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > buffer< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > length< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function is used to send data to the shell output stream with OS synchronization, note the function could not be called in ISR.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer. < / td > < / tr >
< tr > < td class = "paramname" > buffer< / td > < td > Start address of the data to write. < / td > < / tr >
< tr > < td class = "paramname" > length< / td > < td > Length of the data to write. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > kStatus_SHELL_Success< / td > < td > Successfully send data. < / td > < / tr >
< tr > < td class = "paramname" > kStatus_SHELL_Error< / td > < td > An error occurred. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga56c78f6217a822015a9369bf3e52e92a" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > int SHELL_PrintfSynchronization < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > formatString< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" >   < / td >
< td class = "paramname" > < em > ...< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > Call this function to write a formatted output to the shell output stream with OS synchronization, note the function could not be called in ISR.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer.< / td > < / tr >
< tr > < td class = "paramname" > formatString< / td > < td > Format string. < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
2023-08-31 15:30:31 +00:00
< dl class = "section return" > < dt > Returns< / dt > < dd > Returns the number of characters printed or a negative value if an error occurs. < / dd > < / dl >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gaca4540dc42f8892cb276691644a247e2" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > void SHELL_ChangePrompt < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > , < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > char *  < / td >
< td class = "paramname" > < em > prompt< / em >   < / td >
2022-08-23 15:00:33 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > Call this function to change shell prompt.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer.< / td > < / tr >
< tr > < td class = "paramname" > prompt< / td > < td > The string which will be used for command prompt < / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
2023-08-31 15:30:31 +00:00
< dl class = "section return" > < dt > Returns< / dt > < dd > NULL. < / dd > < / dl >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "gad2a840776dee8490d482a0692fbf2d7e" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > void SHELL_PrintPrompt < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > < / td > < td > )< / td >
2022-08-23 15:00:33 +00:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > Call this function to print shell prompt.< / p >
2022-08-23 15:00:33 +00:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2023-08-31 15:30:31 +00:00
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer.< / td > < / tr >
2022-08-23 15:00:33 +00:00
< / table >
< / dd >
< / dl >
2023-08-31 15:30:31 +00:00
< dl class = "section return" > < dt > Returns< / dt > < dd > NULL. < / dd > < / dl >
2022-08-23 15:00:33 +00:00
< / div >
< / div >
2023-08-31 15:30:31 +00:00
< a class = "anchor" id = "ga44e3087a3cdea9b62f159e2585dfcd8d" > < / a >
2022-08-23 15:00:33 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > void SHELL_Task < / td >
2022-08-23 15:00:33 +00:00
< td > (< / td >
2023-08-31 15:30:31 +00:00
< td class = "paramtype" > < a class = "el" href = "a00071.html#ga818c3ca274bd83d1dc870a5618eb21f2" > shell_handle_t< / a >   < / td >
< td class = "paramname" > < em > shellHandle< / em > < / td > < td > )< / td >
2022-08-23 15:00:33 +00:00
< td > < / td >
< / tr >
2023-08-31 15:30:31 +00:00
< / table >
< / div > < div class = "memdoc" >
< p > The task function for Shell; The function should be polled by upper layer. This function does not return until Shell command exit was called.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > shellHandle< / td > < td > The shell module handle pointer. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
< a class = "anchor" id = "ga4eeb17b16773359c132f1d40478938ec" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
2022-08-23 15:00:33 +00:00
< tr >
2023-08-31 15:30:31 +00:00
< td class = "memname" > static bool SHELL_checkRunningInIsr < / td >
< td > (< / td >
< td class = "paramtype" > void  < / td >
< td class = "paramname" > < / td > < td > )< / td >
2022-08-23 15:00:33 +00:00
< td > < / td >
< / tr >
< / table >
2023-08-31 15:30:31 +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-08-23 15:00:33 +00:00
< / div > < div class = "memdoc" >
2023-08-31 15:30:31 +00:00
< p > This function is used to check if code running in ISR.< / p >
< dl class = "retval" > < dt > Return values< / dt > < dd >
< table class = "retval" >
< tr > < td class = "paramname" > TRUE< / td > < td > if code runing in ISR. < / td > < / tr >
2022-08-23 15:00:33 +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 >