mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
430 lines
25 KiB
HTML
430 lines
25 KiB
HTML
<!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.6"/>
|
|
<title>tinyusb: Assertion</title>
|
|
<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="doxygen.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 style="padding-left: 0.5em;">
|
|
<div id="projectname">tinyusb
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<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>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></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('group__group__assertion.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#define-members">Macros</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Assertion<div class="ingroups"><a class="el" href="group___group___common.html">Common Files</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
|
Macros</h2></td></tr>
|
|
<tr class="memitem:gaf71e197a4d5c1137fdca6be3595fdc8a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf71e197a4d5c1137fdca6be3595fdc8a"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>VOID_RETURN</b></td></tr>
|
|
<tr class="separator:gaf71e197a4d5c1137fdca6be3595fdc8a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga92a12aae1e6c91e160e9551967d4669c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga92a12aae1e6c91e160e9551967d4669c"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>_ASSERT_COUNTER</b>   __LINE__</td></tr>
|
|
<tr class="separator:ga92a12aae1e6c91e160e9551967d4669c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaf9891ec23caf8b33d632a8674b302714"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf9891ec23caf8b33d632a8674b302714"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>STATIC_ASSERT</b>(const_expr, message)   enum { <a class="el" href="group___group___common_h.html#gaec46ed8b9b375c8c2a7d916d4517cc9e">XSTRING_CONCAT_</a>(static_assert_, _ASSERT_COUNTER) = 1/(!!(const_expr)) }</td></tr>
|
|
<tr class="separator:gaf9891ec23caf8b33d632a8674b302714"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad33429682dabff3fd90527fb341d1396"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad33429682dabff3fd90527fb341d1396"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>_PRINTF</b>(...)</td></tr>
|
|
<tr class="separator:gad33429682dabff3fd90527fb341d1396"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gacb004fe30c6aa19b05ba4e9005d6df57"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacb004fe30c6aa19b05ba4e9005d6df57"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_MESSAGE</b>(format,...)   _PRINTF("Assert at %s: %s: %d: " format "\n", __BASE_FILE__, __func__ , __LINE__, __VA_ARGS__)</td></tr>
|
|
<tr class="separator:gacb004fe30c6aa19b05ba4e9005d6df57"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaafb881da44cbd649168d840f6433aab5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaafb881da44cbd649168d840f6433aab5"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_ERROR_HANDLER</b>(x, para)   return x</td></tr>
|
|
<tr class="separator:gaafb881da44cbd649168d840f6433aab5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9afe523d462c0489f0f982adb3759265"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_DEFINE_WITH_HANDLER</b>(error_handler, handler_para, setup_statement, condition, error, format,...)</td></tr>
|
|
<tr class="separator:ga9afe523d462c0489f0f982adb3759265"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gafa856a0d0609e8d40c86a92d769b8b21"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafa856a0d0609e8d40c86a92d769b8b21"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_DEFINE</b>(...)   ASSERT_DEFINE_WITH_HANDLER(ASSERT_ERROR_HANDLER, NULL, __VA_ARGS__)</td></tr>
|
|
<tr class="separator:gafa856a0d0609e8d40c86a92d769b8b21"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa1195f1c97f77162651138d8647d768e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_STATUS_MESSAGE</b>(sts, message)</td></tr>
|
|
<tr class="separator:gaa1195f1c97f77162651138d8647d768e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad4b7a594fd2b383429f6a50aef979ed6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_STATUS</b>(sts)</td></tr>
|
|
<tr class="separator:gad4b7a594fd2b383429f6a50aef979ed6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga821326052e3e2bf1fb2d678e9e9a6004"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga821326052e3e2bf1fb2d678e9e9a6004"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT</b>(...)   ASSERT_TRUE(__VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga821326052e3e2bf1fb2d678e9e9a6004"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga5a1b7514f504981d7eb5d9bc5b31106c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5a1b7514f504981d7eb5d9bc5b31106c"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_TRUE</b>(condition, error)   ASSERT_DEFINE( , (condition), error, "%s", "evaluated to false")</td></tr>
|
|
<tr class="separator:ga5a1b7514f504981d7eb5d9bc5b31106c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaf59809cd601a5bdf5441cba9f3d6f624"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf59809cd601a5bdf5441cba9f3d6f624"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_FALSE</b>(condition, error)   ASSERT_DEFINE( ,!(condition), error, "%s", "evaluated to true")</td></tr>
|
|
<tr class="separator:gaf59809cd601a5bdf5441cba9f3d6f624"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga348cd92b31108861c99fc9f6120e30e7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga348cd92b31108861c99fc9f6120e30e7"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_PTR</b>(...)   ASSERT_PTR_NOT_NULL(__VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga348cd92b31108861c99fc9f6120e30e7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9f120d7bff5e24e1b40288449fe00af1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f120d7bff5e24e1b40288449fe00af1"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_PTR_NOT_NULL</b>(pointer, error)   ASSERT_DEFINE( , NULL != (pointer), error, "%s", "pointer is NULL")</td></tr>
|
|
<tr class="separator:ga9f120d7bff5e24e1b40288449fe00af1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae4eedf3c2434cf13da4afe44114ff5a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae4eedf3c2434cf13da4afe44114ff5a8"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_PTR_NULL</b>(pointer, error)   ASSERT_DEFINE( , NULL == (pointer), error, "%s", "pointer is not NULL")</td></tr>
|
|
<tr class="separator:gae4eedf3c2434cf13da4afe44114ff5a8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga844f77f9f6deaea65fe0b47d924135a6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_XXX_EQUAL</b>(type_format, expected, actual, error)</td></tr>
|
|
<tr class="separator:ga844f77f9f6deaea65fe0b47d924135a6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gabeba34f583b04be992b6fc3a165c0d1a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_XXX_WITHIN</b>(type_format, lower, upper, actual, error)</td></tr>
|
|
<tr class="separator:gabeba34f583b04be992b6fc3a165c0d1a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga3a357bf5aee8cfef26c42d0defd99c3b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3a357bf5aee8cfef26c42d0defd99c3b"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_INT</b>(...)   ASSERT_INT_EQUAL(__VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga3a357bf5aee8cfef26c42d0defd99c3b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4ac97cbe8f713d04b9ac62da790c7d67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4ac97cbe8f713d04b9ac62da790c7d67"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_INT_EQUAL</b>(...)   ASSERT_XXX_EQUAL("%d", __VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga4ac97cbe8f713d04b9ac62da790c7d67"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga463aefefc57eb1b98044ad4c36c3f48f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga463aefefc57eb1b98044ad4c36c3f48f"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_INT_WITHIN</b>(...)   ASSERT_XXX_WITHIN("%d", __VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga463aefefc57eb1b98044ad4c36c3f48f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae9f8b1096f14969128c12d2178704554"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae9f8b1096f14969128c12d2178704554"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_HEX</b>(...)   ASSERT_HEX_EQUAL(__VA_ARGS__)</td></tr>
|
|
<tr class="separator:gae9f8b1096f14969128c12d2178704554"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaed10c4a109dcb83778cfbd595a89fa7e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaed10c4a109dcb83778cfbd595a89fa7e"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_HEX_EQUAL</b>(...)   ASSERT_XXX_EQUAL("0x%x", __VA_ARGS__)</td></tr>
|
|
<tr class="separator:gaed10c4a109dcb83778cfbd595a89fa7e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga05a7fb3a098fcc884bebeb681bc82059"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga05a7fb3a098fcc884bebeb681bc82059"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_HEX_WITHIN</b>(...)   ASSERT_XXX_WITHIN("0x%x", __VA_ARGS__)</td></tr>
|
|
<tr class="separator:ga05a7fb3a098fcc884bebeb681bc82059"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga36864269139d62cfa393e5092d64af1b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga36864269139d62cfa393e5092d64af1b"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>BIN8_PRINTF_PATTERN</b>   "%d%d%d%d%d%d%d%d"</td></tr>
|
|
<tr class="separator:ga36864269139d62cfa393e5092d64af1b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga82edfdfa321ac2a1e7fa4c6ff19a7424"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>BIN8_PRINTF_CONVERT</b>(byte)</td></tr>
|
|
<tr class="separator:ga82edfdfa321ac2a1e7fa4c6ff19a7424"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gac3fb74150c6826df3d156ce44ced198e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac3fb74150c6826df3d156ce44ced198e"></a>
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_BIN8</b>(...)   ASSERT_BIN8_EQUAL(__VA_ARGS__)</td></tr>
|
|
<tr class="separator:gac3fb74150c6826df3d156ce44ced198e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga54832d4e78922be018b7b271ca96d880"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>ASSERT_BIN8_EQUAL</b>(expected, actual, error)</td></tr>
|
|
<tr class="separator:ga54832d4e78922be018b7b271ca96d880"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<h2 class="groupheader">Macro Definition Documentation</h2>
|
|
<a class="anchor" id="ga54832d4e78922be018b7b271ca96d880"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_BIN8_EQUAL</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">expected, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">actual, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">error </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">ASSERT_DEFINE(\</div>
|
|
<div class="line"> uint8_t exp = (expected); uint8_t act = (actual),\</div>
|
|
<div class="line"> exp==act,\</div>
|
|
<div class="line"> error,\</div>
|
|
<div class="line"> <span class="stringliteral">"expected "</span> BIN8_PRINTF_PATTERN <span class="stringliteral">", actual "</span> BIN8_PRINTF_PATTERN, BIN8_PRINTF_CONVERT(exp), BIN8_PRINTF_CONVERT(act) )</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga9afe523d462c0489f0f982adb3759265"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_DEFINE_WITH_HANDLER</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">error_handler, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">handler_para, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">setup_statement, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">condition, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">error, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">format, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>...</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span>{\</div>
|
|
<div class="line"> setup_statement;\</div>
|
|
<div class="line"> if (!(condition)) {\</div>
|
|
<div class="line"> if (hal_debugger_is_attached()){\</div>
|
|
<div class="line"> hal_debugger_breakpoint();\</div>
|
|
<div class="line"> }<span class="keywordflow">else</span>{\</div>
|
|
<div class="line"> ASSERT_MESSAGE(format, __VA_ARGS__);\</div>
|
|
<div class="line"> }\</div>
|
|
<div class="line"> error_handler(error, handler_para);\</div>
|
|
<div class="line"> }\</div>
|
|
<div class="line"> }<span class="keywordflow">while</span>(0)</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gad4b7a594fd2b383429f6a50aef979ed6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_STATUS</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">sts</td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">ASSERT_DEFINE(<a class="code" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a> status = (<a class="code" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a>)(sts),\</div>
|
|
<div class="line"> TUSB_ERROR_NONE == status, status, <span class="stringliteral">"%s"</span>, TUSB_ErrorStr[status])</div>
|
|
<div class="ttc" id="group___group___error_html_ga225612897c510054ef4026586562f716"><div class="ttname"><a href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a></div><div class="ttdeci">tusb_error_t</div><div class="ttdoc">Error Code returned. </div><div class="ttdef"><b>Definition:</b> tusb_errors.h:100</div></div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaa1195f1c97f77162651138d8647d768e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_STATUS_MESSAGE</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">sts, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">message </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">ASSERT_DEFINE(<a class="code" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a> status = (<a class="code" href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a>)(sts),\</div>
|
|
<div class="line"> TUSB_ERROR_NONE == status, status, <span class="stringliteral">"%s: %s"</span>, TUSB_ErrorStr[status], message)</div>
|
|
<div class="ttc" id="group___group___error_html_ga225612897c510054ef4026586562f716"><div class="ttname"><a href="group___group___error.html#ga225612897c510054ef4026586562f716">tusb_error_t</a></div><div class="ttdeci">tusb_error_t</div><div class="ttdoc">Error Code returned. </div><div class="ttdef"><b>Definition:</b> tusb_errors.h:100</div></div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga844f77f9f6deaea65fe0b47d924135a6"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_XXX_EQUAL</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">type_format, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">expected, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">actual, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">error </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">ASSERT_DEFINE(\</div>
|
|
<div class="line"> uint32_t exp = (expected); uint32_t act = (actual),\</div>
|
|
<div class="line"> exp==act,\</div>
|
|
<div class="line"> error,\</div>
|
|
<div class="line"> <span class="stringliteral">"expected "</span> type_format <span class="stringliteral">", actual "</span> type_format, exp, act)</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gabeba34f583b04be992b6fc3a165c0d1a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ASSERT_XXX_WITHIN</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">type_format, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">lower, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">upper, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">actual, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">error </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">ASSERT_DEFINE(\</div>
|
|
<div class="line"> uint32_t low = (lower); uint32_t up = (upper); uint32_t act = (actual),\</div>
|
|
<div class="line"> (low <= act) && (act <= up),\</div>
|
|
<div class="line"> error,\</div>
|
|
<div class="line"> <span class="stringliteral">"expected within "</span> type_format <span class="stringliteral">" - "</span> type_format <span class="stringliteral">", actual "</span> type_format, low, up, act)</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga82edfdfa321ac2a1e7fa4c6ff19a7424"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define BIN8_PRINTF_CONVERT</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">byte</td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Value:</b><div class="fragment"><div class="line">((byte) & 0x80 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x40 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x20 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x10 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x08 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x04 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x02 ? 1 : 0), \</div>
|
|
<div class="line"> ((byte) & 0x01 ? 1 : 0)</div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated on Wed Mar 26 2014 16:23:18 for tinyusb by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|