5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <title>Raspberry Pi Documentation - High Level APIs</title>
8 <meta name="description" content="The official documentation for Raspberry Pi computers and microcontrollers">
9 <meta property="og:title" content="Raspberry Pi Documentation - High Level APIs">
10 <meta property="og:description" content="The official documentation for Raspberry Pi computers and microcontrollers">
11 <meta property="og:url" content="https://www.raspberrypi.com/documentation/pico-sdk/high_level.html">
12 <meta property="og:image" content="https://www.raspberrypi.com/documentation/images/opensocial.png">
13 <meta name="twitter:card" content="summary_large_image">
14 <meta name="twitter:site" content="@Raspberry_Pi">
15 <meta name="twitter:title" content="Raspberry Pi Documentation - High Level APIs">
16 <meta name="twitter:description" content="The official documentation for Raspberry Pi computers and microcontrollers">
17 <link rel="preconnect" href="https://fonts.googleapis.com">
18 <link rel="preconnect" href="https://fonts.gstatic.com">
19 <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,700;1,100;1,300;1,400;1,700&display=swap" rel="stylesheet">
20 <link rel="preconnect" href="https://IHWGNTJ1NP-dsn.algolia.net" crossorigin>
21 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"/>
22 <link rel="stylesheet" href="{{docstyle}}">
25 nav#mobile-contents h3 {
26 display: none !important;
29 display: none !important;
32 display: none !important;
35 display: none !important;
38 display: none !important;
41 display: none !important;
43 #content h1,h2,h3,h4,h5,h6,p,span,li,td,th {
44 color: var(--vscode-editor-foreground) !important;
46 #content .memproto td {
47 color: initial !important;
50 color: initial !important;
53 background-color: var(--vscode-editor-background) !important;
55 nav#contents a, nav#mobile-contents a {
56 color: var(--vscode-editor-foreground) !important;
59 width: 100% !important;
60 min-width: auto !important;
61 margin-left: 0px !important;
64 margin: 50px 50px 0px 50px !important;
66 /* the links currently don't work */
68 display: none !important;
80 font-family: "Roboto", sans-serif;
83 text-rendering: optimizeLegibility;
84 -webkit-text-size-adjust: 100%;
85 -moz-text-size-adjust: 100%;
86 text-size-adjust: 100%;
87 -webkit-font-smoothing: antialiased;
88 -moz-osx-font-smoothing: grayscale;
92 #__rptl-header .__rptl-header-wrapper {
96 box-sizing: border-box;
102 #__rptl-header .__rptl-header-navbar {
106 box-sizing: border-box;
109 background-color: #fff;
110 border-bottom: 1px solid #dedede;
114 @media (min-width: 800px) {
115 #__rptl-header .__rptl-header-navbar {
119 @media (min-width: 1200px) {
120 #__rptl-header .__rptl-header-navbar {
122 border-bottom-style: none;
125 #__rptl-header .__rptl-header-brand {
129 text-decoration: none;
130 box-sizing: border-box;
131 display: inline-block;
132 vertical-align: middle;
134 #__rptl-header .__rptl-header-logo {
138 box-sizing: border-box;
140 vertical-align: middle;
142 #__rptl-header .__rptl-header-burger {
146 box-sizing: border-box;
149 transform: rotate(0deg);
158 @media (min-width: 1200px) {
159 #__rptl-header .__rptl-header-burger {
163 @media (prefers-reduced-motion: no-preference) {
164 #__rptl-header .__rptl-header-burger {
165 transition: 0.5s ease-in-out;
168 #__rptl-header .__rptl-header-burger-stroke {
172 box-sizing: border-box;
179 transform: rotate(0deg);
181 #__rptl-header .__rptl-header-burger-stroke:nth-child(1) {
183 transform-origin: left center;
185 #__rptl-header .__rptl-header-burger-stroke:nth-child(2) {
187 transform-origin: left center;
189 #__rptl-header .__rptl-header-burger-stroke:nth-child(3) {
191 transform-origin: left center;
193 @media (prefers-reduced-motion: no-preference) {
194 #__rptl-header .__rptl-header-burger-stroke {
195 transition: 0.25s ease-in-out;
198 #__rptl-header .__rptl-header-burger-state {
201 #__rptl-header .__rptl-header-burger-state:checked + .__rptl-header-navbar .__rptl-header-burger-stroke:nth-child(1) {
202 transform: rotate(45deg);
206 #__rptl-header .__rptl-header-burger-state:checked + .__rptl-header-navbar .__rptl-header-burger-stroke:nth-child(2) {
210 #__rptl-header .__rptl-header-burger-state:checked + .__rptl-header-navbar .__rptl-header-burger-stroke:nth-child(3) {
211 transform: rotate(-45deg);
215 #__rptl-header .__rptl-header-burger-state:checked ~ .__rptl-header-nav {
216 transform: translateY(100%);
217 transition-duration: 500ms;
218 transition-timing-function: ease-out;
220 #__rptl-header .__rptl-header-nav {
227 box-sizing: border-box;
230 background-color: #fff;
232 border-bottom: 1px solid #dedede;
234 #__rptl-header .__rptl-header-nav:focus-within {
235 transform: translateY(100%);
237 @media (min-width: 1200px) {
238 #__rptl-header .__rptl-header-nav {
241 background-color: #f7f8fa;
242 transform: none !important;
243 transition: none !important;
246 @media (prefers-reduced-motion: no-preference) {
247 #__rptl-header .__rptl-header-nav {
248 transition: transform 0.25s ease-in;
251 #__rptl-header .__rptl-header-nav-inner {
258 box-sizing: border-box;
260 @media (min-width: 1200px) {
261 #__rptl-header .__rptl-header-nav-inner {
263 justify-content: space-between;
267 #__rptl-header .__rptl-header-nav-list {
275 box-sizing: border-box;
277 #__rptl-header .__rptl-header-nav-list:first-child .__rptl-header-nav-list-item:first-child {
280 #__rptl-header .__rptl-header-nav-list-item {
287 box-sizing: border-box;
288 border-top: 1px solid #dedede;
290 @media (min-width: 1200px) {
291 #__rptl-header .__rptl-header-nav-list-item {
292 display: inline-block;
296 #__rptl-header .__rptl-header-nav-link {
302 text-decoration: none;
303 box-sizing: border-box;
308 #__rptl-header .__rptl-header-nav-link:hover {
310 background-color: #333;
312 #__rptl-header .__rptl-header-nav-link--for-home {
316 #__rptl-header .__rptl-header-nav-link--for-home:hover {
317 background-color: #cd2355;
319 #__rptl-header .__rptl-header-nav-link--for-industry {
322 @media (min-width: 800px) {
323 #__rptl-header .__rptl-header-nav-link {
327 @media (min-width: 1200px) {
328 #__rptl-header .__rptl-header-nav-link {
334 <header id="__rptl-header">
335 <input type="checkbox" class="__rptl-header-burger-state" id="__rptl-header-burger-state" />
337 <div class="__rptl-header-navbar">
338 <div class="__rptl-header-wrapper">
339 <a href="/" class="__rptl-header-brand" aria-label="Raspberry Pi">
340 <svg class="__rptl-header-logo" aria-hidden="true" focusable="false" height="44" viewBox="0 0 270 57" xmlns="http://www.w3.org/2000/svg" aria-labelledby="__rptl-header-logo"><title id="__rptl-header-logo">Raspberry Pi</title><g fill-rule="nonzero" fill="none"><path d="M65.275 33.317h-4.477v9.46c0 .29-.235.526-.525.526h-4.57a.525.525 0 0 1-.526-.525V16.55a.525.525 0 0 1 .525-.525h9.61c3.223 0 5.709.718 7.457 2.154a7.437 7.437 0 0 1 2.623 6.09 8.391 8.391 0 0 1-1.208 4.655 8.24 8.24 0 0 1-3.663 2.97l5.635 10.638a.525.525 0 0 1-.464.77h-4.917a.63.63 0 0 1-.56-.342l-4.94-9.643Zm-4.477-4.552h4.534a4.641 4.641 0 0 0 3.278-1.078 3.85 3.85 0 0 0 1.162-2.97 4.122 4.122 0 0 0-1.096-3.034 4.556 4.556 0 0 0-3.363-1.106h-4.515v8.188ZM90.426 42.997a6.562 6.562 0 0 1-.402-1.511 6.551 6.551 0 0 1-5.114 2.192 7.195 7.195 0 0 1-4.937-1.724 5.542 5.542 0 0 1-1.958-4.347 5.73 5.73 0 0 1 2.389-4.946c1.592-1.148 3.894-1.73 6.904-1.742h2.491v-1.162a3.342 3.342 0 0 0-.72-2.248 2.838 2.838 0 0 0-2.277-.843 3.226 3.226 0 0 0-2.145.656 2.13 2.13 0 0 0-.748 1.37.513.513 0 0 1-.513.428h-4.375a.533.533 0 0 1-.524-.596 5.494 5.494 0 0 1 1.054-2.663 7.184 7.184 0 0 1 3.073-2.352 11.2 11.2 0 0 1 4.459-.852 8.848 8.848 0 0 1 5.948 1.883 6.587 6.587 0 0 1 2.202 5.292v8.787a9.948 9.948 0 0 0 .629 3.93.525.525 0 0 1-.47.754h-4.485a.515.515 0 0 1-.48-.306Zm-4.336-3.46c.77.007 1.529-.176 2.21-.534a3.509 3.509 0 0 0 1.5-1.433v-3.485h-2.024c-2.71 0-4.153.937-4.328 2.81l-.019.319a2.166 2.166 0 0 0 .712 1.667 2.764 2.764 0 0 0 1.949.656ZM109.963 37.701a1.745 1.745 0 0 0-.983-1.564 11.18 11.18 0 0 0-3.157-1.021c-4.822-1.012-7.232-3.06-7.232-6.145a5.57 5.57 0 0 1 2.24-4.506 9.031 9.031 0 0 1 5.854-1.808 9.723 9.723 0 0 1 6.173 1.817 5.699 5.699 0 0 1 2.292 4.175.52.52 0 0 1-.525.546h-4.382a.514.514 0 0 1-.514-.435 2.538 2.538 0 0 0-.721-1.485 3.172 3.172 0 0 0-2.342-.759 3.24 3.24 0 0 0-2.117.619c-.483.377-.76.96-.75 1.573.001.603.327 1.158.853 1.452a8.76 8.76 0 0 0 2.876.956 23.54 23.54 0 0 1 3.41.908c2.86 1.05 4.29 2.867 4.29 5.452a5.288 5.288 0 0 1-2.38 4.487 10.264 10.264 0 0 1-6.145 1.715c-1.556.029-3.1-.281-4.524-.91a7.586 7.586 0 0 1-3.1-2.49 5.853 5.853 0 0 1-1.094-2.824.533.533 0 0 1 .523-.596h4.11a.513.513 0 0 1 .513.418c.091.71.46 1.354 1.024 1.793a4.233 4.233 0 0 0 2.66.768c.827.057 1.65-.15 2.352-.59.508-.35.807-.93.796-1.546ZM136.719 33.355a12.159 12.159 0 0 1-2.127 7.503 6.817 6.817 0 0 1-5.742 2.82 6.315 6.315 0 0 1-4.965-2.136v9.03c0 .29-.235.525-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.018c.27 0 .497.206.523.475l.142 1.51a6.363 6.363 0 0 1 5.134-2.36 6.865 6.865 0 0 1 5.826 2.773c1.387 1.848 2.08 4.396 2.08 7.644v.28Zm-5.415-.394a7.982 7.982 0 0 0-1.002-4.365 3.266 3.266 0 0 0-2.913-1.536 3.546 3.546 0 0 0-3.504 1.948v8.3a3.605 3.605 0 0 0 3.541 2.004c2.586 0 3.878-2.117 3.878-6.35ZM158.159 33.355c0 3.247-.694 5.78-2.08 7.597a6.889 6.889 0 0 1-5.808 2.726 6.329 6.329 0 0 1-5.264-2.53l-.191 1.689a.525.525 0 0 1-.522.466h-3.877a.525.525 0 0 1-.525-.525V15.05c0-.29.235-.525.525-.525h4.364a.525.525 0 0 1 .525.525v9.798a6.166 6.166 0 0 1 4.928-2.192 6.945 6.945 0 0 1 5.817 2.726c1.405 1.817 2.108 4.374 2.108 7.672v.3Zm-5.415-.394a8.068 8.068 0 0 0-.974-4.487 3.295 3.295 0 0 0-2.904-1.414 3.572 3.572 0 0 0-3.56 2.117v8a3.62 3.62 0 0 0 3.597 2.135c1.626.093 3.081-.999 3.448-2.585.31-1.23.442-2.498.393-3.766ZM170.555 43.678a9.95 9.95 0 0 1-7.26-2.736 9.722 9.722 0 0 1-2.8-7.288v-.524a12.247 12.247 0 0 1 1.18-5.461 8.666 8.666 0 0 1 3.344-3.71 9.387 9.387 0 0 1 4.936-1.302 8.413 8.413 0 0 1 6.548 2.623c1.593 1.749 2.39 4.228 2.39 7.438v1.685a.525.525 0 0 1-.526.525h-12.383a5.028 5.028 0 0 0 1.583 3.185 4.785 4.785 0 0 0 3.344 1.2 5.886 5.886 0 0 0 4.524-1.837.527.527 0 0 1 .773.026l1.964 2.198c.17.188.182.47.028.672a8.216 8.216 0 0 1-3.036 2.34 10.82 10.82 0 0 1-4.609.966Zm-.618-16.656a3.382 3.382 0 0 0-2.614 1.092 5.65 5.65 0 0 0-1.283 3.124h7.531v-.433a4.034 4.034 0 0 0-.974-2.795 3.492 3.492 0 0 0-2.66-.988ZM193.333 27.525a.523.523 0 0 1-.575.515c-.459-.051-.92-.078-1.382-.081-2.049 0-3.391.693-4.028 2.08v12.739a.525.525 0 0 1-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.096c.277 0 .507.215.524.492l.12 1.924a5.017 5.017 0 0 1 4.514-2.791c.434-.002.867.044 1.29.138a.515.515 0 0 1 .39.515l-.06 4.215ZM207.017 27.525a.523.523 0 0 1-.575.515c-.459-.051-.92-.078-1.382-.081-2.048 0-3.39.693-4.028 2.08v12.739a.525.525 0 0 1-.525.525h-4.364a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.096c.277 0 .507.215.524.492l.12 1.924a5.018 5.018 0 0 1 4.514-2.791c.434-.002.867.044 1.29.138a.515.515 0 0 1 .39.515l-.06 4.215ZM217.934 35.64l3.635-12.233a.525.525 0 0 1 .504-.375h4.677a.525.525 0 0 1 .496.697l-7.907 22.721-.45 1.068a6.18 6.18 0 0 1-5.995 3.972 8.368 8.368 0 0 1-2.003-.25.529.529 0 0 1-.395-.513v-3.15a.525.525 0 0 1 .546-.524l.538.02a3.442 3.442 0 0 0 2.035-.492 3.08 3.08 0 0 0 1.19-1.555l.637-1.667-6.857-19.63a.525.525 0 0 1 .496-.697h4.696c.232 0 .437.152.503.374l3.654 12.234ZM245.156 33.692v9.086c0 .29-.235.525-.525.525h-4.57a.525.525 0 0 1-.526-.525V16.55a.525.525 0 0 1 .525-.525h10.117a12.31 12.31 0 0 1 5.405 1.124 8.284 8.284 0 0 1 3.587 3.194 8.91 8.91 0 0 1 1.256 4.712 7.833 7.833 0 0 1-2.745 6.323c-1.83 1.543-4.362 2.314-7.597 2.314h-4.927Zm0-4.553h5.02a4.934 4.934 0 0 0 3.401-1.049 3.816 3.816 0 0 0 1.171-2.998 4.5 4.5 0 0 0-1.18-3.24 4.41 4.41 0 0 0-3.26-1.275h-5.152v8.562ZM263.081 17.786a2.666 2.666 0 0 1 .815-2.005 3.512 3.512 0 0 1 4.431 0 2.86 2.86 0 0 1-.01 4.028 3.473 3.473 0 0 1-4.402 0 2.66 2.66 0 0 1-.834-2.023Zm5.227 25.517h-4.383a.525.525 0 0 1-.525-.525V23.557a.525.525 0 0 1 .525-.525h4.383a.525.525 0 0 1 .525.525v19.22a.525.525 0 0 1-.525.526ZM45.008 32.949a8.74 8.74 0 0 0-3.104-6.182 7.664 7.664 0 0 0-1.44-2.801 8.594 8.594 0 0 0-3.058-5.777c.284-.244.524-.536.708-.862a6.186 6.186 0 0 0 3.63-4.23 5.558 5.558 0 0 0 1.755-3.64 3.481 3.481 0 0 0-.31-1.638 3.114 3.114 0 0 0 .81-3.215c-.606-1.756-2.73-2.896-5.584-3.017a4.497 4.497 0 0 0-3.11-1.065 7.188 7.188 0 0 0-1.678.207 3.821 3.821 0 0 0-1.65-.334 6.458 6.458 0 0 0-3.148.858 2.894 2.894 0 0 0-.38-.025 6.276 6.276 0 0 0-3.551 1.558 10.765 10.765 0 0 0-1.866 1.944 10.768 10.768 0 0 0-1.867-1.944 6.278 6.278 0 0 0-3.55-1.558c-.127 0-.254.008-.38.025a6.46 6.46 0 0 0-3.148-.858 3.822 3.822 0 0 0-1.65.334 7.188 7.188 0 0 0-1.68-.207 4.498 4.498 0 0 0-3.109 1.065c-2.854.12-4.978 1.261-5.585 3.018a3.114 3.114 0 0 0 .812 3.214 3.482 3.482 0 0 0-.31 1.639 5.557 5.557 0 0 0 1.755 3.64 6.186 6.186 0 0 0 3.63 4.229c.183.326.423.618.707.862A8.594 8.594 0 0 0 5.6 23.966a7.663 7.663 0 0 0-1.44 2.801 8.74 8.74 0 0 0-3.104 6.182 8.424 8.424 0 0 0 1.92 6.578c.26 1.31.8 2.549 1.581 3.632a9.452 9.452 0 0 0 2.386 5.514 9.768 9.768 0 0 0 5.262 3.126 12.74 12.74 0 0 0 4.208 2.605 9.763 9.763 0 0 0 13.24 0c1.559-.585 2.988-1.47 4.207-2.605a9.768 9.768 0 0 0 5.262-3.126 9.452 9.452 0 0 0 2.386-5.514 9.311 9.311 0 0 0 1.582-3.632 8.424 8.424 0 0 0 1.919-6.578Z" fill="#000"/><path d="M28.366 4.192a.225.225 0 0 1 .286.24c-.072.672.335.587.432.468a3.526 3.526 0 0 1 3.188-1.53.225.225 0 0 1 .154.363c-.4.593.03.706.19.6 1.631-1.02 3.187-1.023 3.785-.594a.225.225 0 0 1 .013.349c-.604.514-.266.77-.052.692a5.802 5.802 0 0 1 4.74.607.227.227 0 0 1 .006.343 4.493 4.493 0 0 0-1.73 3.018c-.045.396.614.313.891.241a.225.225 0 0 1 .28.21c.026.954-.876 2.002-2.218 2.898-.18.12-.154.408.256.42a.222.222 0 0 1 .191.334c-.478.888-1.13 1.724-3.345 2.298a.227.227 0 0 0-.032.429.217.217 0 0 1 .071.384c-2.207 1.896-7.8 1.148-8.51-2.043a.224.224 0 0 1 .04-.182 21.262 21.262 0 0 1 9.276-7.058.176.176 0 0 0-.087-.34 15.168 15.168 0 0 0-10.074 6.074.227.227 0 0 1-.289.065c-3.585-1.851-.64-7.317 2.538-8.286ZM7.285 12.85a.222.222 0 0 1 .191-.334c.41-.01.436-.299.256-.419C6.39 11.201 5.49 10.153 5.514 9.2a.225.225 0 0 1 .28-.21c.278.072.936.155.891-.241a4.493 4.493 0 0 0-1.73-3.017.227.227 0 0 1 .006-.344 5.802 5.802 0 0 1 4.74-.607c.214.079.552-.178-.052-.692a.225.225 0 0 1 .014-.35c.597-.428 2.153-.426 3.785.594.159.107.589-.006.19-.599a.225.225 0 0 1 .153-.363A3.526 3.526 0 0 1 16.98 4.9c.096.12.503.204.432-.469a.225.225 0 0 1 .286-.239c3.178.97 6.122 6.435 2.537 8.286a.227.227 0 0 1-.289-.065A15.168 15.168 0 0 0 9.873 6.34a.176.176 0 0 0-.088.34 21.262 21.262 0 0 1 9.276 7.057c.04.052.054.119.04.183-.71 3.19-6.303 3.938-8.51 2.042a.217.217 0 0 1 .071-.384.227.227 0 0 0-.031-.429c-2.216-.574-2.867-1.41-3.346-2.298Z" fill="#46AF4B"/><path d="M37.158 22.605c.92 2.446.203 3.622-1.978 2.377a15.632 15.632 0 0 1-4.58-3.84c-1.644-1.952-.576-2.821 2.012-2.352a6.985 6.985 0 0 1 4.546 3.815ZM27.375 19.853c3.12 2.593-.454 4.428-4.343 4.428-3.89 0-7.463-1.835-4.344-4.428a6.935 6.935 0 0 1 8.687 0ZM8.906 22.605a6.985 6.985 0 0 1 4.545-3.815c2.588-.47 3.656.4 2.013 2.352a15.632 15.632 0 0 1-4.58 3.84c-2.182 1.245-2.898.069-1.978-2.377ZM4.394 36.196a6.983 6.983 0 0 1 .518-5.942c1.153-1.96 2.313-1.883 2.773-.222.585 2.29.373 4.712-.6 6.867-.854 1.696-1.921 1.123-2.691-.703ZM12.704 48.896A6.942 6.942 0 0 1 7.482 42.7c.433-10.066 14.94 7.91 5.222 6.196ZM12.999 36.358c-2.433-1.404-3.077-4.844-1.438-7.682 1.639-2.839 4.94-4 7.372-2.596 2.433 1.404 3.077 4.844 1.438 7.682-1.639 2.839-4.94 4-7.372 2.596ZM27.091 52.737a6.947 6.947 0 0 1-8.119 0c-2.41-1.664.015-3.58 4.06-3.58s6.47 1.916 4.06 3.58Z" fill="#CD2355"/><ellipse fill="#CD2355" cx="23.032" cy="41.795" rx="5.647" ry="4.84"/><path d="M25.692 33.762c-1.639-2.838-.995-6.278 1.438-7.682 2.433-1.405 5.734-.243 7.372 2.596 1.64 2.838.995 6.278-1.438 7.682-2.432 1.405-5.733.243-7.372-2.596ZM33.36 48.896C23.64 50.61 38.149 32.634 38.58 42.7a6.941 6.941 0 0 1-5.221 6.196ZM41.67 36.196c-.77 1.826-1.838 2.399-2.691.703a10.417 10.417 0 0 1-.6-6.867c.46-1.66 1.62-1.739 2.772.222a6.983 6.983 0 0 1 .518 5.942Z" fill="#CD2355"/></g></svg>
343 <label class="__rptl-header-burger" for="__rptl-header-burger-state">
344 <span class="__rptl-header-burger-stroke"></span>
345 <span class="__rptl-header-burger-stroke"></span>
346 <span class="__rptl-header-burger-stroke"></span>
351 <nav class="__rptl-header-nav">
352 <div class="__rptl-header-wrapper">
353 <div class="__rptl-header-nav-inner">
354 <ul class="__rptl-header-nav-list">
355 <li class="__rptl-header-nav-list-item"><a href="/for-home/" class="__rptl-header-nav-link __rptl-header-nav-link--for-home">For home</a>
356 <li class="__rptl-header-nav-list-item"><a href="/for-industry/" class="__rptl-header-nav-link __rptl-header-nav-link--for-industry">For industry</a>
358 <ul class="__rptl-header-nav-list">
359 <li class="__rptl-header-nav-list-item"><a href="/products/" class="__rptl-header-nav-link">Hardware</a>
360 <li class="__rptl-header-nav-list-item"><a href="/software/" class="__rptl-header-nav-link">Software</a>
361 <li class="__rptl-header-nav-list-item"><a href="/documentation/" class="__rptl-header-nav-link">Documentation</a>
362 <li class="__rptl-header-nav-list-item"><a href="/news/" class="__rptl-header-nav-link">News</a>
363 <li class="__rptl-header-nav-list-item"><a href="https://forums.raspberrypi.com/" class="__rptl-header-nav-link">Forums</a>
364 <li class="__rptl-header-nav-list-item"><a href="https://www.raspberrypi.org" class="__rptl-header-nav-link " rel="noopener">Foundation</a>
370 <script nonce="{{nonce}}">
372 var header = document.getElementById("__rptl-header"),
373 burgerState = document.getElementById("__rptl-header-burger-state");
375 document.addEventListener("click", function (e) {
376 if (!header.contains(e.target)) {
377 burgerState.checked = false;
383 <div class="toptitle">
384 <h1><a href="/documentation/"><strong>Raspberry Pi</strong> Documentation</a></h1>
385 <div id="docsearch"></div>
390 <ul id="tab-container">
395 <a href="/documentation/computers/">Computers</a>
401 <a href="/documentation/accessories/">Accessories</a>
407 <a href="/documentation/microcontrollers/">Microcontrollers</a>
413 <a href="/documentation/services/">Services</a>
417 <li class="selected">
419 <a href="/documentation/pico-sdk/">Pico C SDK</a>
426 <p id="release">Release 1.5.1</p>
431 <nav id="mobile-contents">
444 <div class="mobile-contents-menu" onclick="expandAndCollapseMobile(this)">
445 <span class="mobile-contents-line"></span>
446 <span class="mobile-contents-line"></span>
447 <span class="mobile-contents-line"></span>
449 <div class="contents-inner hidden">
451 <h3 class="contentshead">Introduction</h3>
453 <div class="itemcontents">
454 <ul class="sectlevel1">
457 <a href="/documentation/pico-sdk/index_doxygen.html#index">Raspberry Pi Pico SDK</a>
462 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md3">SDK Design</a>
466 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md4">The Build System</a>
470 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md5">Examples</a>
481 <h3 class="contentshead">Hardware APIs</h3>
483 <div class="itemcontents">
484 <ul class="sectlevel1">
487 <a href="/documentation/pico-sdk/hardware.html#hardware_adc">hardware_adc</a>
492 <a href="/documentation/pico-sdk/hardware.html#rpipfbfe5b0fe8af96a15d1f">Functions</a>
496 <a href="/documentation/pico-sdk/hardware.html#rpipe94a81e06ca005c7f718">Detailed Description</a>
500 <a href="/documentation/pico-sdk/hardware.html#adc_example">Example</a>
504 <a href="/documentation/pico-sdk/hardware.html#rpipb170229eb32af8fbb25b">Function Documentation</a>
512 <a href="/documentation/pico-sdk/hardware.html#hardware_base">hardware_base</a>
517 <a href="/documentation/pico-sdk/hardware.html#rpip3926938a4b94e0a060f0">Functions</a>
521 <a href="/documentation/pico-sdk/hardware.html#rpipf51cc1db3990ae8e6192">Detailed Description</a>
525 <a href="/documentation/pico-sdk/hardware.html#rpip2bab066fe2ddd52f73df">Function Documentation</a>
533 <a href="/documentation/pico-sdk/hardware.html#hardware_claim">hardware_claim</a>
538 <a href="/documentation/pico-sdk/hardware.html#rpipdfa7d254a5da841f0df2">Functions</a>
542 <a href="/documentation/pico-sdk/hardware.html#rpipa788812432c842a919d0">Detailed Description</a>
546 <a href="/documentation/pico-sdk/hardware.html#rpipe9940b67cdc9d015deee">Function Documentation</a>
554 <a href="/documentation/pico-sdk/hardware.html#hardware_clocks">hardware_clocks</a>
559 <a href="/documentation/pico-sdk/hardware.html#rpip89c91da66ffde1cc30ac">Typedefs</a>
563 <a href="/documentation/pico-sdk/hardware.html#rpip170d92c7209e76514d2b">Enumerations</a>
567 <a href="/documentation/pico-sdk/hardware.html#rpipa56ad66478ae79ffb588">Functions</a>
571 <a href="/documentation/pico-sdk/hardware.html#rpipe93dd39da7bd5b73a2e7">Detailed Description</a>
575 <a href="/documentation/pico-sdk/hardware.html#clock_example">Example</a>
579 <a href="/documentation/pico-sdk/hardware.html#rpip058d1a37d53125f96927">Typedef Documentation</a>
583 <a href="/documentation/pico-sdk/hardware.html#rpipd0eaba69a740cd911694">Enumeration Type Documentation</a>
587 <a href="/documentation/pico-sdk/hardware.html#rpip6e4e7e64e61a4b43601f">Function Documentation</a>
595 <a href="/documentation/pico-sdk/hardware.html#hardware_divider">hardware_divider</a>
600 <a href="/documentation/pico-sdk/hardware.html#rpip7b4dfc6580b2c53a2f61">Functions</a>
604 <a href="/documentation/pico-sdk/hardware.html#rpip115225b5493e8a07fe97">Detailed Description</a>
608 <a href="/documentation/pico-sdk/hardware.html#divider_example">Example</a>
612 <a href="/documentation/pico-sdk/hardware.html#rpip1078d95ce91b99434197">Function Documentation</a>
620 <a href="/documentation/pico-sdk/hardware.html#hardware_dma">hardware_dma</a>
625 <a href="/documentation/pico-sdk/hardware.html#rpip5fc5374acc78a0097d96">Modules</a>
629 <a href="/documentation/pico-sdk/hardware.html#rpip6d5488060fa28b69a5de">Enumerations</a>
633 <a href="/documentation/pico-sdk/hardware.html#rpipa0fe778975f52970ba61">Functions</a>
637 <a href="/documentation/pico-sdk/hardware.html#rpip7aba53e0335ad830a5b3">Detailed Description</a>
641 <a href="/documentation/pico-sdk/hardware.html#rpipd4ba338c9c4b932eb68f">Enumeration Type Documentation</a>
645 <a href="/documentation/pico-sdk/hardware.html#rpipe2cf7ead0796181b91e4">Function Documentation</a>
649 <a href="/documentation/pico-sdk/hardware.html#channel_config">channel_config</a>
657 <a href="/documentation/pico-sdk/hardware.html#hardware_exception">hardware_exception</a>
662 <a href="/documentation/pico-sdk/hardware.html#rpip18a3627e557367243979">Typedefs</a>
666 <a href="/documentation/pico-sdk/hardware.html#rpip2093d294cba2d1648b91">Enumerations</a>
670 <a href="/documentation/pico-sdk/hardware.html#rpip440d48a43ef52888c7f8">Functions</a>
674 <a href="/documentation/pico-sdk/hardware.html#rpipc1138e9ba5ae1417bab7">Detailed Description</a>
678 <a href="/documentation/pico-sdk/hardware.html#rpipa203a413b041690f5b3a">Typedef Documentation</a>
682 <a href="/documentation/pico-sdk/hardware.html#rpip4b1393aca63cad7ac071">Enumeration Type Documentation</a>
686 <a href="/documentation/pico-sdk/hardware.html#rpip59bacb8331c7305bf23f">Function Documentation</a>
694 <a href="/documentation/pico-sdk/hardware.html#hardware_flash">hardware_flash</a>
699 <a href="/documentation/pico-sdk/hardware.html#rpip9bebeb9fda46d7931f29">Functions</a>
703 <a href="/documentation/pico-sdk/hardware.html#rpip701484253c037df3b8c3">Detailed Description</a>
707 <a href="/documentation/pico-sdk/hardware.html#flash_example">Example</a>
711 <a href="/documentation/pico-sdk/hardware.html#rpip181aaf572db7d81ec48c">Function Documentation</a>
719 <a href="/documentation/pico-sdk/hardware.html#hardware_gpio">hardware_gpio</a>
724 <a href="/documentation/pico-sdk/hardware.html#rpipfad69ce2636c0406f313">Typedefs</a>
728 <a href="/documentation/pico-sdk/hardware.html#rpip3dc9f91b4873d19dd61e">Enumerations</a>
732 <a href="/documentation/pico-sdk/hardware.html#rpipde51588ce1f57a29806f">Functions</a>
736 <a href="/documentation/pico-sdk/hardware.html#rpip2fb6e3f0d25f72b5b750">Detailed Description</a>
740 <a href="/documentation/pico-sdk/hardware.html#rpipa09cc3430089dfa6d35f">Typedef Documentation</a>
744 <a href="/documentation/pico-sdk/hardware.html#rpipc1a3203083c98a8386db">Enumeration Type Documentation</a>
748 <a href="/documentation/pico-sdk/hardware.html#rpip20bab61362be18e88989">Function Documentation</a>
756 <a href="/documentation/pico-sdk/hardware.html#hardware_i2c">hardware_i2c</a>
761 <a href="/documentation/pico-sdk/hardware.html#rpipeb9b68cb7743d9da904d">Functions</a>
765 <a href="/documentation/pico-sdk/hardware.html#rpip1c8da576903f52eac8f5">Detailed Description</a>
769 <a href="/documentation/pico-sdk/hardware.html#i2c_example">Example</a>
773 <a href="/documentation/pico-sdk/hardware.html#rpipe8156bbf78085b8efa90">Function Documentation</a>
777 <a href="/documentation/pico-sdk/hardware.html#rpip762f57c89c87a7230e8a">Variable Documentation</a>
785 <a href="/documentation/pico-sdk/hardware.html#hardware_interp">hardware_interp</a>
790 <a href="/documentation/pico-sdk/hardware.html#rpipc1cdb32b7c7ebdbf8c6d">Modules</a>
794 <a href="/documentation/pico-sdk/hardware.html#rpip5af7eb7aca9e02ea40e0">Functions</a>
798 <a href="/documentation/pico-sdk/hardware.html#rpipecac7251f20e18f482f0">Detailed Description</a>
802 <a href="/documentation/pico-sdk/hardware.html#rpip7f589c9bda3f5c04eaf7">Function Documentation</a>
806 <a href="/documentation/pico-sdk/hardware.html#interp_config">interp_config</a>
814 <a href="/documentation/pico-sdk/hardware.html#hardware_irq">hardware_irq</a>
819 <a href="/documentation/pico-sdk/hardware.html#rpip7d7ce744d18b50aa39e0">Typedefs</a>
823 <a href="/documentation/pico-sdk/hardware.html#rpipabf9dab89d154231fc7c">Functions</a>
827 <a href="/documentation/pico-sdk/hardware.html#rpip8e9db58b4e37e3c6e6f7">Detailed Description</a>
831 <a href="/documentation/pico-sdk/hardware.html#interrupt_nums">Interrupt Numbers</a>
835 <a href="/documentation/pico-sdk/hardware.html#rpip3156275fc0925d498be5">Typedef Documentation</a>
839 <a href="/documentation/pico-sdk/hardware.html#rpip809a516c3fb120805834">Function Documentation</a>
847 <a href="/documentation/pico-sdk/hardware.html#hardware_pio">hardware_pio</a>
852 <a href="/documentation/pico-sdk/hardware.html#rpip6649e09e7b4258dca43b">Modules</a>
856 <a href="/documentation/pico-sdk/hardware.html#rpipef554ed6ff6e2801159c">Macros</a>
860 <a href="/documentation/pico-sdk/hardware.html#rpip09d45f9779a66eef27b9">Enumerations</a>
864 <a href="/documentation/pico-sdk/hardware.html#rpipe4f94cdaa1864d487415">Functions</a>
868 <a href="/documentation/pico-sdk/hardware.html#rpip08092671c649e5a7ed33">Detailed Description</a>
872 <a href="/documentation/pico-sdk/hardware.html#rpip2c90e53db9e0b0eadaf0">Macro Definition Documentation</a>
876 <a href="/documentation/pico-sdk/hardware.html#rpip993ff9b164db3c600f6c">Function Documentation</a>
880 <a href="/documentation/pico-sdk/hardware.html#sm_config">sm_config</a>
884 <a href="/documentation/pico-sdk/hardware.html#pio_instructions">pio_instructions</a>
892 <a href="/documentation/pico-sdk/hardware.html#hardware_pll">hardware_pll</a>
897 <a href="/documentation/pico-sdk/hardware.html#rpip04a79fbadb11764c1347">Functions</a>
901 <a href="/documentation/pico-sdk/hardware.html#rpip60321a9e3dea4db61ac5">Detailed Description</a>
905 <a href="/documentation/pico-sdk/hardware.html#rpip3b39ffd09f4368ca9083">Function Documentation</a>
913 <a href="/documentation/pico-sdk/hardware.html#hardware_pwm">hardware_pwm</a>
918 <a href="/documentation/pico-sdk/hardware.html#rpipb46b1035246cbafd4775">Enumerations</a>
922 <a href="/documentation/pico-sdk/hardware.html#rpip539e288314d1cb6222a6">Functions</a>
926 <a href="/documentation/pico-sdk/hardware.html#rpipa8b59f289fb1cca8b30f">Detailed Description</a>
930 <a href="/documentation/pico-sdk/hardware.html#pwm_example">Example</a>
934 <a href="/documentation/pico-sdk/hardware.html#rpip00ae929b6ad09e4f9f31">Enumeration Type Documentation</a>
938 <a href="/documentation/pico-sdk/hardware.html#rpip596da54088102c730a85">Function Documentation</a>
946 <a href="/documentation/pico-sdk/hardware.html#hardware_resets">hardware_resets</a>
951 <a href="/documentation/pico-sdk/hardware.html#rpip01db3f21293c4654deff">Functions</a>
955 <a href="/documentation/pico-sdk/hardware.html#rpip670536031ba50ccc6589">Detailed Description</a>
959 <a href="/documentation/pico-sdk/hardware.html#reset_example">Example</a>
963 <a href="/documentation/pico-sdk/hardware.html#rpip696191bc283a6c8da6aa">Function Documentation</a>
971 <a href="/documentation/pico-sdk/hardware.html#hardware_rtc">hardware_rtc</a>
976 <a href="/documentation/pico-sdk/hardware.html#rpip517ae21bc4c79589cb63">Typedefs</a>
980 <a href="/documentation/pico-sdk/hardware.html#rpipfc133cc664b9e7da82a0">Functions</a>
984 <a href="/documentation/pico-sdk/hardware.html#rpipfac24067380ecd0bc739">Detailed Description</a>
988 <a href="/documentation/pico-sdk/hardware.html#rtc_example">Example</a>
992 <a href="/documentation/pico-sdk/hardware.html#rpipf2ca5910c33c1f910921">Typedef Documentation</a>
996 <a href="/documentation/pico-sdk/hardware.html#rpip1e2ec04f610bc6e2792d">Function Documentation</a>
1004 <a href="/documentation/pico-sdk/hardware.html#hardware_spi">hardware_spi</a>
1009 <a href="/documentation/pico-sdk/hardware.html#rpip3f5aca6fc7b2f7e386a6">Macros</a>
1013 <a href="/documentation/pico-sdk/hardware.html#rpip9ec490b208c8a7d66ea5">Enumerations</a>
1017 <a href="/documentation/pico-sdk/hardware.html#rpip0e32134afff49352abbf">Functions</a>
1021 <a href="/documentation/pico-sdk/hardware.html#rpip53fbef906bbbb4c86c1b">Detailed Description</a>
1025 <a href="/documentation/pico-sdk/hardware.html#rpipfdd2ef7004f65b7695c8">Macro Definition Documentation</a>
1029 <a href="/documentation/pico-sdk/hardware.html#rpip8eaa5c705b10721fc604">Function Documentation</a>
1037 <a href="/documentation/pico-sdk/hardware.html#hardware_sync">hardware_sync</a>
1042 <a href="/documentation/pico-sdk/hardware.html#rpipaf2c26a82e2081c77391">Typedefs</a>
1046 <a href="/documentation/pico-sdk/hardware.html#rpip75ebd45136c83ea77417">Functions</a>
1050 <a href="/documentation/pico-sdk/hardware.html#rpipffceb67fd927abf19a64">Detailed Description</a>
1054 <a href="/documentation/pico-sdk/hardware.html#autotoc_md1">Spin Locks</a>
1058 <a href="/documentation/pico-sdk/hardware.html#rpipa9c3278cd7f23be6930f">Function Documentation</a>
1066 <a href="/documentation/pico-sdk/hardware.html#hardware_timer">hardware_timer</a>
1071 <a href="/documentation/pico-sdk/hardware.html#rpip54d900e51ca5d5f92dc1">Typedefs</a>
1075 <a href="/documentation/pico-sdk/hardware.html#rpipb47e300854299e8a2d40">Functions</a>
1079 <a href="/documentation/pico-sdk/hardware.html#rpip7ce2cdc1662dce59296b">Detailed Description</a>
1083 <a href="/documentation/pico-sdk/hardware.html#timer_example">Example</a>
1087 <a href="/documentation/pico-sdk/hardware.html#rpip8149d3296f588e1af4fb">Typedef Documentation</a>
1091 <a href="/documentation/pico-sdk/hardware.html#rpipdea6c4945bdc6f6374d4">Function Documentation</a>
1099 <a href="/documentation/pico-sdk/hardware.html#hardware_uart">hardware_uart</a>
1104 <a href="/documentation/pico-sdk/hardware.html#rpipa1024710aeeb196b78bd">Enumerations</a>
1108 <a href="/documentation/pico-sdk/hardware.html#rpipf53ff9493512b6885dbc">Functions</a>
1112 <a href="/documentation/pico-sdk/hardware.html#rpip4d3a4f9268d2ebb2f18f">Detailed Description</a>
1116 <a href="/documentation/pico-sdk/hardware.html#uart_example">Example</a>
1120 <a href="/documentation/pico-sdk/hardware.html#rpipe5889bce3760d2f2abc3">Macro Definition Documentation</a>
1124 <a href="/documentation/pico-sdk/hardware.html#rpip8a3222d9bd4f1a88f966">Function Documentation</a>
1132 <a href="/documentation/pico-sdk/hardware.html#hardware_vreg">hardware_vreg</a>
1137 <a href="/documentation/pico-sdk/hardware.html#rpip2e95f90d0e541df0fbd5">Functions</a>
1141 <a href="/documentation/pico-sdk/hardware.html#rpipff9b545b8ac19c31cf84">Detailed Description</a>
1145 <a href="/documentation/pico-sdk/hardware.html#rpip374b3f7b14694be44510">Function Documentation</a>
1153 <a href="/documentation/pico-sdk/hardware.html#hardware_watchdog">hardware_watchdog</a>
1158 <a href="/documentation/pico-sdk/hardware.html#rpip3e4251ba95a5958301b7">Functions</a>
1162 <a href="/documentation/pico-sdk/hardware.html#rpip0cf7dd571b6eaaeaf8c1">Detailed Description</a>
1166 <a href="/documentation/pico-sdk/hardware.html#watchdog_example">Example</a>
1170 <a href="/documentation/pico-sdk/hardware.html#rpipa364c96388e31cb15832">Function Documentation</a>
1178 <a href="/documentation/pico-sdk/hardware.html#hardware_xosc">hardware_xosc</a>
1183 <a href="/documentation/pico-sdk/hardware.html#rpipb7b0130814aa84716e89">Functions</a>
1187 <a href="/documentation/pico-sdk/hardware.html#rpip6d0698b303647774cdff">Detailed Description</a>
1191 <a href="/documentation/pico-sdk/hardware.html#rpip8c9cf630da61511f7468">Function Documentation</a>
1202 <h3 class="contentshead">High Level APIs</h3>
1204 <div class="itemcontents">
1205 <ul class="sectlevel1">
1208 <a href="/documentation/pico-sdk/high_level.html#pico_async_context">pico_async_context</a>
1213 <a href="/documentation/pico-sdk/high_level.html#rpip334b1daca4d436cd2653">Modules</a>
1217 <a href="/documentation/pico-sdk/high_level.html#rpip34a43d49030e182275e8">Data Structures</a>
1221 <a href="/documentation/pico-sdk/high_level.html#rpip73422519f861a01369c4">Typedefs</a>
1225 <a href="/documentation/pico-sdk/high_level.html#rpipc33092ce8251b4b8dbf1">Functions</a>
1229 <a href="/documentation/pico-sdk/high_level.html#rpip79be1e27fbc098900953">Detailed Description</a>
1233 <a href="/documentation/pico-sdk/high_level.html#rpipe4818f2317923f615384">Typedef Documentation</a>
1237 <a href="/documentation/pico-sdk/high_level.html#rpip8be6ff2503083d1e44cb">Function Documentation</a>
1241 <a href="/documentation/pico-sdk/high_level.html#async_context_freertos">async_context_freertos</a>
1245 <a href="/documentation/pico-sdk/high_level.html#async_context_poll">async_context_poll</a>
1249 <a href="/documentation/pico-sdk/high_level.html#async_context_threadsafe_background">async_context_threadsafe_background</a>
1257 <a href="/documentation/pico-sdk/high_level.html#pico_flash">pico_flash</a>
1262 <a href="/documentation/pico-sdk/high_level.html#rpipcb13fd2e8f843c73e3be">Functions</a>
1266 <a href="/documentation/pico-sdk/high_level.html#rpip757f4a42c3de3c0b5283">Detailed Description</a>
1270 <a href="/documentation/pico-sdk/high_level.html#rpip984b61938ec2fe82b216">Function Documentation</a>
1278 <a href="/documentation/pico-sdk/high_level.html#pico_i2c_slave">pico_i2c_slave</a>
1283 <a href="/documentation/pico-sdk/high_level.html#rpipff46d0780fe042bf707c">Typedefs</a>
1287 <a href="/documentation/pico-sdk/high_level.html#rpip44c693c1c2d88aff02f4">Enumerations</a>
1291 <a href="/documentation/pico-sdk/high_level.html#rpip7d4e1982831b9d4bc1be">Functions</a>
1295 <a href="/documentation/pico-sdk/high_level.html#rpip9e01d206b833ed2d2422">Detailed Description</a>
1299 <a href="/documentation/pico-sdk/high_level.html#rpip64a0102e835d7a4aae09">Typedef Documentation</a>
1303 <a href="/documentation/pico-sdk/high_level.html#rpipafb978c9dd3ec6082f80">Enumeration Type Documentation</a>
1307 <a href="/documentation/pico-sdk/high_level.html#rpipbf5b82a0dc8d3d4bb2bf">Function Documentation</a>
1315 <a href="/documentation/pico-sdk/high_level.html#pico_multicore">pico_multicore</a>
1320 <a href="/documentation/pico-sdk/high_level.html#rpip7baf405557a57f41b9de">Modules</a>
1324 <a href="/documentation/pico-sdk/high_level.html#rpipf840d967c7b8d6fef316">Functions</a>
1328 <a href="/documentation/pico-sdk/high_level.html#rpipc30c9f02735cb3003f42">Detailed Description</a>
1332 <a href="/documentation/pico-sdk/high_level.html#multicore_example">Example</a>
1336 <a href="/documentation/pico-sdk/high_level.html#rpipe803fe9ffd182f2af357">Function Documentation</a>
1340 <a href="/documentation/pico-sdk/high_level.html#multicore_fifo">fifo</a>
1344 <a href="/documentation/pico-sdk/high_level.html#multicore_lockout">lockout</a>
1352 <a href="/documentation/pico-sdk/high_level.html#pico_rand">pico_rand</a>
1357 <a href="/documentation/pico-sdk/high_level.html#rpip2ac37766eddd02aaed07">Functions</a>
1361 <a href="/documentation/pico-sdk/high_level.html#rpipd9cd1e107a6238a969b8">Detailed Description</a>
1365 <a href="/documentation/pico-sdk/high_level.html#rpipaca07ee034d314acc4bf">Function Documentation</a>
1373 <a href="/documentation/pico-sdk/high_level.html#pico_stdlib">pico_stdlib</a>
1378 <a href="/documentation/pico-sdk/high_level.html#rpip04d09fa6ec88d8737403">Functions</a>
1382 <a href="/documentation/pico-sdk/high_level.html#rpip67e7d087a6d9d4177c9c">Detailed Description</a>
1386 <a href="/documentation/pico-sdk/high_level.html#rpip9d8a4958ff265de7762d">Function Documentation</a>
1394 <a href="/documentation/pico-sdk/high_level.html#pico_sync">pico_sync</a>
1399 <a href="/documentation/pico-sdk/high_level.html#rpip42988faa0a4de968a0fe">Modules</a>
1403 <a href="/documentation/pico-sdk/high_level.html#rpip0a443d120465214bff04">Detailed Description</a>
1407 <a href="/documentation/pico-sdk/high_level.html#critical_section">critical_section</a>
1411 <a href="/documentation/pico-sdk/high_level.html#lock_core">lock_core</a>
1415 <a href="/documentation/pico-sdk/high_level.html#mutex">mutex</a>
1419 <a href="/documentation/pico-sdk/high_level.html#sem">sem</a>
1427 <a href="/documentation/pico-sdk/high_level.html#pico_time">pico_time</a>
1432 <a href="/documentation/pico-sdk/high_level.html#rpip75fc0e1fb693907ffae4">Modules</a>
1436 <a href="/documentation/pico-sdk/high_level.html#rpip587c32f8059c662009b6">Detailed Description</a>
1440 <a href="/documentation/pico-sdk/high_level.html#timestamp">timestamp</a>
1444 <a href="/documentation/pico-sdk/high_level.html#sleep">sleep</a>
1448 <a href="/documentation/pico-sdk/high_level.html#alarm">alarm</a>
1452 <a href="/documentation/pico-sdk/high_level.html#repeating_timer">repeating_timer</a>
1460 <a href="/documentation/pico-sdk/high_level.html#pico_unique_id">pico_unique_id</a>
1465 <a href="/documentation/pico-sdk/high_level.html#rpip7981e60e740d763c8048">Data Structures</a>
1469 <a href="/documentation/pico-sdk/high_level.html#rpip04f6f057a3030914c7d2">Functions</a>
1473 <a href="/documentation/pico-sdk/high_level.html#rpip2a7175316ee370f706a8">Detailed Description</a>
1477 <a href="/documentation/pico-sdk/high_level.html#rpipec641d378cce59faa918">Function Documentation</a>
1485 <a href="/documentation/pico-sdk/high_level.html#pico_util">pico_util</a>
1490 <a href="/documentation/pico-sdk/high_level.html#rpip158b48d2746d665569ba">Modules</a>
1494 <a href="/documentation/pico-sdk/high_level.html#rpip8dab79e9dfcc333468bf">Detailed Description</a>
1498 <a href="/documentation/pico-sdk/high_level.html#util_datetime">datetime</a>
1502 <a href="/documentation/pico-sdk/high_level.html#util_pheap">pheap</a>
1506 <a href="/documentation/pico-sdk/high_level.html#queue">queue</a>
1517 <h3 class="contentshead">Third-party Libraries</h3>
1519 <div class="itemcontents">
1520 <ul class="sectlevel1">
1523 <a href="/documentation/pico-sdk/third_party.html#tinyusb_device">tinyusb_device</a>
1528 <a href="/documentation/pico-sdk/third_party.html#tinyusb_host">tinyusb_host</a>
1536 <h3 class="contentshead">Networking Libraries</h3>
1538 <div class="itemcontents">
1539 <ul class="sectlevel1">
1542 <a href="/documentation/pico-sdk/networking.html#pico_btstack">pico_btstack</a>
1547 <a href="/documentation/pico-sdk/networking.html#rpipabe482207518b13daea8">Functions</a>
1551 <a href="/documentation/pico-sdk/networking.html#rpip28aa570f7304feb24dd8">Detailed Description</a>
1555 <a href="/documentation/pico-sdk/networking.html#rpip81e86eeedf11e3669c51">Function Documentation</a>
1563 <a href="/documentation/pico-sdk/networking.html#pico_lwip">pico_lwip</a>
1568 <a href="/documentation/pico-sdk/networking.html#rpip192837c4e57e2f47dbf6">Modules</a>
1572 <a href="/documentation/pico-sdk/networking.html#rpip98f8ef4b7c7e1e6ce281">Detailed Description</a>
1576 <a href="/documentation/pico-sdk/networking.html#pico_lwip_arch">pico_lwip_arch</a>
1580 <a href="/documentation/pico-sdk/networking.html#pico_lwip_freertos">pico_lwip_freertos</a>
1584 <a href="/documentation/pico-sdk/networking.html#pico_lwip_nosys">pico_lwip_nosys</a>
1592 <a href="/documentation/pico-sdk/networking.html#pico_cyw43_driver">pico_cyw43_driver</a>
1597 <a href="/documentation/pico-sdk/networking.html#rpip0627746aa35c1c42f44c">Modules</a>
1601 <a href="/documentation/pico-sdk/networking.html#rpipae8b34f7bf0aa371c600">Files</a>
1605 <a href="/documentation/pico-sdk/networking.html#rpipd512513ec719cf7ab197">Functions</a>
1609 <a href="/documentation/pico-sdk/networking.html#rpipebe2d33331cf989e1d29">Detailed Description</a>
1613 <a href="/documentation/pico-sdk/networking.html#rpip7ddeab266708e76683af">Function Documentation</a>
1617 <a href="/documentation/pico-sdk/networking.html#pico_btstack_cyw43">pico_btstack_cyw43</a>
1625 <a href="/documentation/pico-sdk/networking.html#pico_cyw43_arch">pico_cyw43_arch</a>
1630 <a href="/documentation/pico-sdk/networking.html#rpip55bbe3b3adaa09c91f12">Modules</a>
1634 <a href="/documentation/pico-sdk/networking.html#rpipbd659dd2af29c569d582">Macros</a>
1638 <a href="/documentation/pico-sdk/networking.html#rpip2dbacd10d4e207dae370">Functions</a>
1642 <a href="/documentation/pico-sdk/networking.html#rpip2786c74350b1e1c2247c">Detailed Description</a>
1646 <a href="/documentation/pico-sdk/networking.html#rpip7e5d89be1cf9268f36c9">Macro Definition Documentation</a>
1650 <a href="/documentation/pico-sdk/networking.html#rpip2890f60e0c83d227f2ec">Function Documentation</a>
1654 <a href="/documentation/pico-sdk/networking.html#cyw43_driver">cyw43_driver</a>
1665 <h3 class="contentshead">Runtime Infrastructure</h3>
1667 <div class="itemcontents">
1668 <ul class="sectlevel1">
1671 <a href="/documentation/pico-sdk/runtime.html#boot_stage2">boot_stage2</a>
1676 <a href="/documentation/pico-sdk/runtime.html#pico_base">pico_base</a>
1681 <a href="/documentation/pico-sdk/runtime.html#rpip45542cfabd24f25c2b10">Enumerations</a>
1685 <a href="/documentation/pico-sdk/runtime.html#rpipb665655c66e63f4a0c4a">Detailed Description</a>
1693 <a href="/documentation/pico-sdk/runtime.html#pico_binary_info">pico_binary_info</a>
1698 <a href="/documentation/pico-sdk/runtime.html#rpip7989f07e71fba07188be">Macros</a>
1702 <a href="/documentation/pico-sdk/runtime.html#rpipc27123c22ad347cefc87">Detailed Description</a>
1706 <a href="/documentation/pico-sdk/runtime.html#rpipa2ff445fb2a0a57f9dde">Macro Definition Documentation</a>
1714 <a href="/documentation/pico-sdk/runtime.html#pico_bit_ops">pico_bit_ops</a>
1719 <a href="/documentation/pico-sdk/runtime.html#rpipf1806233ab08edf2d1a4">Functions</a>
1723 <a href="/documentation/pico-sdk/runtime.html#rpip63c260c668f0f7e929e9">Detailed Description</a>
1727 <a href="/documentation/pico-sdk/runtime.html#rpip2b305c870314270af1e5">Function Documentation</a>
1735 <a href="/documentation/pico-sdk/runtime.html#pico_bootrom">pico_bootrom</a>
1740 <a href="/documentation/pico-sdk/runtime.html#rpipcf60d5fd56095181a98e">Macros</a>
1744 <a href="/documentation/pico-sdk/runtime.html#rpip05bb858150fa37b3e132">Functions</a>
1748 <a href="/documentation/pico-sdk/runtime.html#rpip005c32aa3418cd5dc77d">Detailed Description</a>
1752 <a href="/documentation/pico-sdk/runtime.html#rpipf9cc87ae1233fe613239">Macro Definition Documentation</a>
1756 <a href="/documentation/pico-sdk/runtime.html#rpipab643919091a482a2c7d">Function Documentation</a>
1764 <a href="/documentation/pico-sdk/runtime.html#pico_bootsel_via_double_reset">pico_bootsel_via_double_reset</a>
1769 <a href="/documentation/pico-sdk/runtime.html#pico_cxx_options">pico_cxx_options</a>
1774 <a href="/documentation/pico-sdk/runtime.html#pico_divider">pico_divider</a>
1779 <a href="/documentation/pico-sdk/runtime.html#rpipfb1beee11febefbf90cc">Files</a>
1783 <a href="/documentation/pico-sdk/runtime.html#rpipa79e631886e62fcd1cd0">Functions</a>
1787 <a href="/documentation/pico-sdk/runtime.html#rpip108233463d1122628ba9">Detailed Description</a>
1791 <a href="/documentation/pico-sdk/runtime.html#rpip0d33c4d7c6e0d08667ce">Function Documentation</a>
1799 <a href="/documentation/pico-sdk/runtime.html#pico_double">pico_double</a>
1804 <a href="/documentation/pico-sdk/runtime.html#pico_float">pico_float</a>
1809 <a href="/documentation/pico-sdk/runtime.html#pico_int64_ops">pico_int64_ops</a>
1814 <a href="/documentation/pico-sdk/runtime.html#pico_malloc">pico_malloc</a>
1819 <a href="/documentation/pico-sdk/runtime.html#pico_mem_ops">pico_mem_ops</a>
1824 <a href="/documentation/pico-sdk/runtime.html#pico_platform">pico_platform</a>
1829 <a href="/documentation/pico-sdk/runtime.html#rpipb6ca92b8ab23006742ba">Macros</a>
1833 <a href="/documentation/pico-sdk/runtime.html#rpip96324626dec724f7403d">Functions</a>
1837 <a href="/documentation/pico-sdk/runtime.html#rpip092e8191441c92cf5ccf">Detailed Description</a>
1841 <a href="/documentation/pico-sdk/runtime.html#rpip464a3792c78a5a9ffa73">Macro Definition Documentation</a>
1845 <a href="/documentation/pico-sdk/runtime.html#rpip14e9a416348dd6951167">Function Documentation</a>
1853 <a href="/documentation/pico-sdk/runtime.html#pico_printf">pico_printf</a>
1858 <a href="/documentation/pico-sdk/runtime.html#pico_runtime">pico_runtime</a>
1863 <a href="/documentation/pico-sdk/runtime.html#pico_stdio">pico_stdio</a>
1868 <a href="/documentation/pico-sdk/runtime.html#rpip66600d8c06f1ab929c23">Modules</a>
1872 <a href="/documentation/pico-sdk/runtime.html#rpipbfbe419ab3a18de01187">Functions</a>
1876 <a href="/documentation/pico-sdk/runtime.html#rpip3eccc7d7592c0528c9ae">Detailed Description</a>
1880 <a href="/documentation/pico-sdk/runtime.html#rpip2fc272e282686cb4da01">Function Documentation</a>
1884 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_semihosting">pico_stdio_semihosting</a>
1888 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_uart">pico_stdio_uart</a>
1892 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_usb">pico_stdio_usb</a>
1900 <a href="/documentation/pico-sdk/runtime.html#pico_standard_link">pico_standard_link</a>
1908 <h3 class="contentshead">External API Headers</h3>
1910 <div class="itemcontents">
1911 <ul class="sectlevel1">
1914 <a href="/documentation/pico-sdk/misc.html#boot_picoboot">boot_picoboot</a>
1919 <a href="/documentation/pico-sdk/misc.html#boot_uf2">boot_uf2</a>
1946 <h2><a href="/documentation/pico-sdk/">Pico C SDK</a></h2>
1948 <h3 class="contentshead" onclick="expandAndCollapse(this)">Introduction</h3>
1951 <div class="itemcontents">
1952 <ul class="sectlevel1">
1955 <a href="/documentation/pico-sdk/index_doxygen.html#index">Raspberry Pi Pico SDK</a>
1960 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md3">SDK Design</a>
1964 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md4">The Build System</a>
1968 <a href="/documentation/pico-sdk/index_doxygen.html#autotoc_md5">Examples</a>
1980 <h3 class="contentshead" onclick="expandAndCollapse(this)">Hardware APIs</h3>
1983 <div class="itemcontents">
1984 <ul class="sectlevel1">
1987 <a href="/documentation/pico-sdk/hardware.html#hardware_adc">hardware_adc</a>
1992 <a href="/documentation/pico-sdk/hardware.html#rpipfbfe5b0fe8af96a15d1f">Functions</a>
1996 <a href="/documentation/pico-sdk/hardware.html#rpipe94a81e06ca005c7f718">Detailed Description</a>
2000 <a href="/documentation/pico-sdk/hardware.html#adc_example">Example</a>
2004 <a href="/documentation/pico-sdk/hardware.html#rpipb170229eb32af8fbb25b">Function Documentation</a>
2012 <a href="/documentation/pico-sdk/hardware.html#hardware_base">hardware_base</a>
2017 <a href="/documentation/pico-sdk/hardware.html#rpip3926938a4b94e0a060f0">Functions</a>
2021 <a href="/documentation/pico-sdk/hardware.html#rpipf51cc1db3990ae8e6192">Detailed Description</a>
2025 <a href="/documentation/pico-sdk/hardware.html#rpip2bab066fe2ddd52f73df">Function Documentation</a>
2033 <a href="/documentation/pico-sdk/hardware.html#hardware_claim">hardware_claim</a>
2038 <a href="/documentation/pico-sdk/hardware.html#rpipdfa7d254a5da841f0df2">Functions</a>
2042 <a href="/documentation/pico-sdk/hardware.html#rpipa788812432c842a919d0">Detailed Description</a>
2046 <a href="/documentation/pico-sdk/hardware.html#rpipe9940b67cdc9d015deee">Function Documentation</a>
2054 <a href="/documentation/pico-sdk/hardware.html#hardware_clocks">hardware_clocks</a>
2059 <a href="/documentation/pico-sdk/hardware.html#rpip89c91da66ffde1cc30ac">Typedefs</a>
2063 <a href="/documentation/pico-sdk/hardware.html#rpip170d92c7209e76514d2b">Enumerations</a>
2067 <a href="/documentation/pico-sdk/hardware.html#rpipa56ad66478ae79ffb588">Functions</a>
2071 <a href="/documentation/pico-sdk/hardware.html#rpipe93dd39da7bd5b73a2e7">Detailed Description</a>
2075 <a href="/documentation/pico-sdk/hardware.html#clock_example">Example</a>
2079 <a href="/documentation/pico-sdk/hardware.html#rpip058d1a37d53125f96927">Typedef Documentation</a>
2083 <a href="/documentation/pico-sdk/hardware.html#rpipd0eaba69a740cd911694">Enumeration Type Documentation</a>
2087 <a href="/documentation/pico-sdk/hardware.html#rpip6e4e7e64e61a4b43601f">Function Documentation</a>
2095 <a href="/documentation/pico-sdk/hardware.html#hardware_divider">hardware_divider</a>
2100 <a href="/documentation/pico-sdk/hardware.html#rpip7b4dfc6580b2c53a2f61">Functions</a>
2104 <a href="/documentation/pico-sdk/hardware.html#rpip115225b5493e8a07fe97">Detailed Description</a>
2108 <a href="/documentation/pico-sdk/hardware.html#divider_example">Example</a>
2112 <a href="/documentation/pico-sdk/hardware.html#rpip1078d95ce91b99434197">Function Documentation</a>
2120 <a href="/documentation/pico-sdk/hardware.html#hardware_dma">hardware_dma</a>
2125 <a href="/documentation/pico-sdk/hardware.html#rpip5fc5374acc78a0097d96">Modules</a>
2129 <a href="/documentation/pico-sdk/hardware.html#rpip6d5488060fa28b69a5de">Enumerations</a>
2133 <a href="/documentation/pico-sdk/hardware.html#rpipa0fe778975f52970ba61">Functions</a>
2137 <a href="/documentation/pico-sdk/hardware.html#rpip7aba53e0335ad830a5b3">Detailed Description</a>
2141 <a href="/documentation/pico-sdk/hardware.html#rpipd4ba338c9c4b932eb68f">Enumeration Type Documentation</a>
2145 <a href="/documentation/pico-sdk/hardware.html#rpipe2cf7ead0796181b91e4">Function Documentation</a>
2149 <a href="/documentation/pico-sdk/hardware.html#channel_config">channel_config</a>
2157 <a href="/documentation/pico-sdk/hardware.html#hardware_exception">hardware_exception</a>
2162 <a href="/documentation/pico-sdk/hardware.html#rpip18a3627e557367243979">Typedefs</a>
2166 <a href="/documentation/pico-sdk/hardware.html#rpip2093d294cba2d1648b91">Enumerations</a>
2170 <a href="/documentation/pico-sdk/hardware.html#rpip440d48a43ef52888c7f8">Functions</a>
2174 <a href="/documentation/pico-sdk/hardware.html#rpipc1138e9ba5ae1417bab7">Detailed Description</a>
2178 <a href="/documentation/pico-sdk/hardware.html#rpipa203a413b041690f5b3a">Typedef Documentation</a>
2182 <a href="/documentation/pico-sdk/hardware.html#rpip4b1393aca63cad7ac071">Enumeration Type Documentation</a>
2186 <a href="/documentation/pico-sdk/hardware.html#rpip59bacb8331c7305bf23f">Function Documentation</a>
2194 <a href="/documentation/pico-sdk/hardware.html#hardware_flash">hardware_flash</a>
2199 <a href="/documentation/pico-sdk/hardware.html#rpip9bebeb9fda46d7931f29">Functions</a>
2203 <a href="/documentation/pico-sdk/hardware.html#rpip701484253c037df3b8c3">Detailed Description</a>
2207 <a href="/documentation/pico-sdk/hardware.html#flash_example">Example</a>
2211 <a href="/documentation/pico-sdk/hardware.html#rpip181aaf572db7d81ec48c">Function Documentation</a>
2219 <a href="/documentation/pico-sdk/hardware.html#hardware_gpio">hardware_gpio</a>
2224 <a href="/documentation/pico-sdk/hardware.html#rpipfad69ce2636c0406f313">Typedefs</a>
2228 <a href="/documentation/pico-sdk/hardware.html#rpip3dc9f91b4873d19dd61e">Enumerations</a>
2232 <a href="/documentation/pico-sdk/hardware.html#rpipde51588ce1f57a29806f">Functions</a>
2236 <a href="/documentation/pico-sdk/hardware.html#rpip2fb6e3f0d25f72b5b750">Detailed Description</a>
2240 <a href="/documentation/pico-sdk/hardware.html#rpipa09cc3430089dfa6d35f">Typedef Documentation</a>
2244 <a href="/documentation/pico-sdk/hardware.html#rpipc1a3203083c98a8386db">Enumeration Type Documentation</a>
2248 <a href="/documentation/pico-sdk/hardware.html#rpip20bab61362be18e88989">Function Documentation</a>
2256 <a href="/documentation/pico-sdk/hardware.html#hardware_i2c">hardware_i2c</a>
2261 <a href="/documentation/pico-sdk/hardware.html#rpipeb9b68cb7743d9da904d">Functions</a>
2265 <a href="/documentation/pico-sdk/hardware.html#rpip1c8da576903f52eac8f5">Detailed Description</a>
2269 <a href="/documentation/pico-sdk/hardware.html#i2c_example">Example</a>
2273 <a href="/documentation/pico-sdk/hardware.html#rpipe8156bbf78085b8efa90">Function Documentation</a>
2277 <a href="/documentation/pico-sdk/hardware.html#rpip762f57c89c87a7230e8a">Variable Documentation</a>
2285 <a href="/documentation/pico-sdk/hardware.html#hardware_interp">hardware_interp</a>
2290 <a href="/documentation/pico-sdk/hardware.html#rpipc1cdb32b7c7ebdbf8c6d">Modules</a>
2294 <a href="/documentation/pico-sdk/hardware.html#rpip5af7eb7aca9e02ea40e0">Functions</a>
2298 <a href="/documentation/pico-sdk/hardware.html#rpipecac7251f20e18f482f0">Detailed Description</a>
2302 <a href="/documentation/pico-sdk/hardware.html#rpip7f589c9bda3f5c04eaf7">Function Documentation</a>
2306 <a href="/documentation/pico-sdk/hardware.html#interp_config">interp_config</a>
2314 <a href="/documentation/pico-sdk/hardware.html#hardware_irq">hardware_irq</a>
2319 <a href="/documentation/pico-sdk/hardware.html#rpip7d7ce744d18b50aa39e0">Typedefs</a>
2323 <a href="/documentation/pico-sdk/hardware.html#rpipabf9dab89d154231fc7c">Functions</a>
2327 <a href="/documentation/pico-sdk/hardware.html#rpip8e9db58b4e37e3c6e6f7">Detailed Description</a>
2331 <a href="/documentation/pico-sdk/hardware.html#interrupt_nums">Interrupt Numbers</a>
2335 <a href="/documentation/pico-sdk/hardware.html#rpip3156275fc0925d498be5">Typedef Documentation</a>
2339 <a href="/documentation/pico-sdk/hardware.html#rpip809a516c3fb120805834">Function Documentation</a>
2347 <a href="/documentation/pico-sdk/hardware.html#hardware_pio">hardware_pio</a>
2352 <a href="/documentation/pico-sdk/hardware.html#rpip6649e09e7b4258dca43b">Modules</a>
2356 <a href="/documentation/pico-sdk/hardware.html#rpipef554ed6ff6e2801159c">Macros</a>
2360 <a href="/documentation/pico-sdk/hardware.html#rpip09d45f9779a66eef27b9">Enumerations</a>
2364 <a href="/documentation/pico-sdk/hardware.html#rpipe4f94cdaa1864d487415">Functions</a>
2368 <a href="/documentation/pico-sdk/hardware.html#rpip08092671c649e5a7ed33">Detailed Description</a>
2372 <a href="/documentation/pico-sdk/hardware.html#rpip2c90e53db9e0b0eadaf0">Macro Definition Documentation</a>
2376 <a href="/documentation/pico-sdk/hardware.html#rpip993ff9b164db3c600f6c">Function Documentation</a>
2380 <a href="/documentation/pico-sdk/hardware.html#sm_config">sm_config</a>
2384 <a href="/documentation/pico-sdk/hardware.html#pio_instructions">pio_instructions</a>
2392 <a href="/documentation/pico-sdk/hardware.html#hardware_pll">hardware_pll</a>
2397 <a href="/documentation/pico-sdk/hardware.html#rpip04a79fbadb11764c1347">Functions</a>
2401 <a href="/documentation/pico-sdk/hardware.html#rpip60321a9e3dea4db61ac5">Detailed Description</a>
2405 <a href="/documentation/pico-sdk/hardware.html#rpip3b39ffd09f4368ca9083">Function Documentation</a>
2413 <a href="/documentation/pico-sdk/hardware.html#hardware_pwm">hardware_pwm</a>
2418 <a href="/documentation/pico-sdk/hardware.html#rpipb46b1035246cbafd4775">Enumerations</a>
2422 <a href="/documentation/pico-sdk/hardware.html#rpip539e288314d1cb6222a6">Functions</a>
2426 <a href="/documentation/pico-sdk/hardware.html#rpipa8b59f289fb1cca8b30f">Detailed Description</a>
2430 <a href="/documentation/pico-sdk/hardware.html#pwm_example">Example</a>
2434 <a href="/documentation/pico-sdk/hardware.html#rpip00ae929b6ad09e4f9f31">Enumeration Type Documentation</a>
2438 <a href="/documentation/pico-sdk/hardware.html#rpip596da54088102c730a85">Function Documentation</a>
2446 <a href="/documentation/pico-sdk/hardware.html#hardware_resets">hardware_resets</a>
2451 <a href="/documentation/pico-sdk/hardware.html#rpip01db3f21293c4654deff">Functions</a>
2455 <a href="/documentation/pico-sdk/hardware.html#rpip670536031ba50ccc6589">Detailed Description</a>
2459 <a href="/documentation/pico-sdk/hardware.html#reset_example">Example</a>
2463 <a href="/documentation/pico-sdk/hardware.html#rpip696191bc283a6c8da6aa">Function Documentation</a>
2471 <a href="/documentation/pico-sdk/hardware.html#hardware_rtc">hardware_rtc</a>
2476 <a href="/documentation/pico-sdk/hardware.html#rpip517ae21bc4c79589cb63">Typedefs</a>
2480 <a href="/documentation/pico-sdk/hardware.html#rpipfc133cc664b9e7da82a0">Functions</a>
2484 <a href="/documentation/pico-sdk/hardware.html#rpipfac24067380ecd0bc739">Detailed Description</a>
2488 <a href="/documentation/pico-sdk/hardware.html#rtc_example">Example</a>
2492 <a href="/documentation/pico-sdk/hardware.html#rpipf2ca5910c33c1f910921">Typedef Documentation</a>
2496 <a href="/documentation/pico-sdk/hardware.html#rpip1e2ec04f610bc6e2792d">Function Documentation</a>
2504 <a href="/documentation/pico-sdk/hardware.html#hardware_spi">hardware_spi</a>
2509 <a href="/documentation/pico-sdk/hardware.html#rpip3f5aca6fc7b2f7e386a6">Macros</a>
2513 <a href="/documentation/pico-sdk/hardware.html#rpip9ec490b208c8a7d66ea5">Enumerations</a>
2517 <a href="/documentation/pico-sdk/hardware.html#rpip0e32134afff49352abbf">Functions</a>
2521 <a href="/documentation/pico-sdk/hardware.html#rpip53fbef906bbbb4c86c1b">Detailed Description</a>
2525 <a href="/documentation/pico-sdk/hardware.html#rpipfdd2ef7004f65b7695c8">Macro Definition Documentation</a>
2529 <a href="/documentation/pico-sdk/hardware.html#rpip8eaa5c705b10721fc604">Function Documentation</a>
2537 <a href="/documentation/pico-sdk/hardware.html#hardware_sync">hardware_sync</a>
2542 <a href="/documentation/pico-sdk/hardware.html#rpipaf2c26a82e2081c77391">Typedefs</a>
2546 <a href="/documentation/pico-sdk/hardware.html#rpip75ebd45136c83ea77417">Functions</a>
2550 <a href="/documentation/pico-sdk/hardware.html#rpipffceb67fd927abf19a64">Detailed Description</a>
2554 <a href="/documentation/pico-sdk/hardware.html#autotoc_md1">Spin Locks</a>
2558 <a href="/documentation/pico-sdk/hardware.html#rpipa9c3278cd7f23be6930f">Function Documentation</a>
2566 <a href="/documentation/pico-sdk/hardware.html#hardware_timer">hardware_timer</a>
2571 <a href="/documentation/pico-sdk/hardware.html#rpip54d900e51ca5d5f92dc1">Typedefs</a>
2575 <a href="/documentation/pico-sdk/hardware.html#rpipb47e300854299e8a2d40">Functions</a>
2579 <a href="/documentation/pico-sdk/hardware.html#rpip7ce2cdc1662dce59296b">Detailed Description</a>
2583 <a href="/documentation/pico-sdk/hardware.html#timer_example">Example</a>
2587 <a href="/documentation/pico-sdk/hardware.html#rpip8149d3296f588e1af4fb">Typedef Documentation</a>
2591 <a href="/documentation/pico-sdk/hardware.html#rpipdea6c4945bdc6f6374d4">Function Documentation</a>
2599 <a href="/documentation/pico-sdk/hardware.html#hardware_uart">hardware_uart</a>
2604 <a href="/documentation/pico-sdk/hardware.html#rpipa1024710aeeb196b78bd">Enumerations</a>
2608 <a href="/documentation/pico-sdk/hardware.html#rpipf53ff9493512b6885dbc">Functions</a>
2612 <a href="/documentation/pico-sdk/hardware.html#rpip4d3a4f9268d2ebb2f18f">Detailed Description</a>
2616 <a href="/documentation/pico-sdk/hardware.html#uart_example">Example</a>
2620 <a href="/documentation/pico-sdk/hardware.html#rpipe5889bce3760d2f2abc3">Macro Definition Documentation</a>
2624 <a href="/documentation/pico-sdk/hardware.html#rpip8a3222d9bd4f1a88f966">Function Documentation</a>
2632 <a href="/documentation/pico-sdk/hardware.html#hardware_vreg">hardware_vreg</a>
2637 <a href="/documentation/pico-sdk/hardware.html#rpip2e95f90d0e541df0fbd5">Functions</a>
2641 <a href="/documentation/pico-sdk/hardware.html#rpipff9b545b8ac19c31cf84">Detailed Description</a>
2645 <a href="/documentation/pico-sdk/hardware.html#rpip374b3f7b14694be44510">Function Documentation</a>
2653 <a href="/documentation/pico-sdk/hardware.html#hardware_watchdog">hardware_watchdog</a>
2658 <a href="/documentation/pico-sdk/hardware.html#rpip3e4251ba95a5958301b7">Functions</a>
2662 <a href="/documentation/pico-sdk/hardware.html#rpip0cf7dd571b6eaaeaf8c1">Detailed Description</a>
2666 <a href="/documentation/pico-sdk/hardware.html#watchdog_example">Example</a>
2670 <a href="/documentation/pico-sdk/hardware.html#rpipa364c96388e31cb15832">Function Documentation</a>
2678 <a href="/documentation/pico-sdk/hardware.html#hardware_xosc">hardware_xosc</a>
2683 <a href="/documentation/pico-sdk/hardware.html#rpipb7b0130814aa84716e89">Functions</a>
2687 <a href="/documentation/pico-sdk/hardware.html#rpip6d0698b303647774cdff">Detailed Description</a>
2691 <a href="/documentation/pico-sdk/hardware.html#rpip8c9cf630da61511f7468">Function Documentation</a>
2703 <h3 class="contentshead" onclick="expandAndCollapse(this)">High Level APIs</h3>
2706 <div class="itemcontents" id="toc"></div>
2707 <div class="itemcontents noJS">
2708 <ul class="sectlevel1">
2711 <a href="/documentation/pico-sdk/high_level.html#pico_async_context">pico_async_context</a>
2716 <a href="/documentation/pico-sdk/high_level.html#rpip334b1daca4d436cd2653">Modules</a>
2720 <a href="/documentation/pico-sdk/high_level.html#rpip34a43d49030e182275e8">Data Structures</a>
2724 <a href="/documentation/pico-sdk/high_level.html#rpip73422519f861a01369c4">Typedefs</a>
2728 <a href="/documentation/pico-sdk/high_level.html#rpipc33092ce8251b4b8dbf1">Functions</a>
2732 <a href="/documentation/pico-sdk/high_level.html#rpip79be1e27fbc098900953">Detailed Description</a>
2736 <a href="/documentation/pico-sdk/high_level.html#rpipe4818f2317923f615384">Typedef Documentation</a>
2740 <a href="/documentation/pico-sdk/high_level.html#rpip8be6ff2503083d1e44cb">Function Documentation</a>
2744 <a href="/documentation/pico-sdk/high_level.html#async_context_freertos">async_context_freertos</a>
2748 <a href="/documentation/pico-sdk/high_level.html#async_context_poll">async_context_poll</a>
2752 <a href="/documentation/pico-sdk/high_level.html#async_context_threadsafe_background">async_context_threadsafe_background</a>
2760 <a href="/documentation/pico-sdk/high_level.html#pico_flash">pico_flash</a>
2765 <a href="/documentation/pico-sdk/high_level.html#rpipcb13fd2e8f843c73e3be">Functions</a>
2769 <a href="/documentation/pico-sdk/high_level.html#rpip757f4a42c3de3c0b5283">Detailed Description</a>
2773 <a href="/documentation/pico-sdk/high_level.html#rpip984b61938ec2fe82b216">Function Documentation</a>
2781 <a href="/documentation/pico-sdk/high_level.html#pico_i2c_slave">pico_i2c_slave</a>
2786 <a href="/documentation/pico-sdk/high_level.html#rpipff46d0780fe042bf707c">Typedefs</a>
2790 <a href="/documentation/pico-sdk/high_level.html#rpip44c693c1c2d88aff02f4">Enumerations</a>
2794 <a href="/documentation/pico-sdk/high_level.html#rpip7d4e1982831b9d4bc1be">Functions</a>
2798 <a href="/documentation/pico-sdk/high_level.html#rpip9e01d206b833ed2d2422">Detailed Description</a>
2802 <a href="/documentation/pico-sdk/high_level.html#rpip64a0102e835d7a4aae09">Typedef Documentation</a>
2806 <a href="/documentation/pico-sdk/high_level.html#rpipafb978c9dd3ec6082f80">Enumeration Type Documentation</a>
2810 <a href="/documentation/pico-sdk/high_level.html#rpipbf5b82a0dc8d3d4bb2bf">Function Documentation</a>
2818 <a href="/documentation/pico-sdk/high_level.html#pico_multicore">pico_multicore</a>
2823 <a href="/documentation/pico-sdk/high_level.html#rpip7baf405557a57f41b9de">Modules</a>
2827 <a href="/documentation/pico-sdk/high_level.html#rpipf840d967c7b8d6fef316">Functions</a>
2831 <a href="/documentation/pico-sdk/high_level.html#rpipc30c9f02735cb3003f42">Detailed Description</a>
2835 <a href="/documentation/pico-sdk/high_level.html#multicore_example">Example</a>
2839 <a href="/documentation/pico-sdk/high_level.html#rpipe803fe9ffd182f2af357">Function Documentation</a>
2843 <a href="/documentation/pico-sdk/high_level.html#multicore_fifo">fifo</a>
2847 <a href="/documentation/pico-sdk/high_level.html#multicore_lockout">lockout</a>
2855 <a href="/documentation/pico-sdk/high_level.html#pico_rand">pico_rand</a>
2860 <a href="/documentation/pico-sdk/high_level.html#rpip2ac37766eddd02aaed07">Functions</a>
2864 <a href="/documentation/pico-sdk/high_level.html#rpipd9cd1e107a6238a969b8">Detailed Description</a>
2868 <a href="/documentation/pico-sdk/high_level.html#rpipaca07ee034d314acc4bf">Function Documentation</a>
2876 <a href="/documentation/pico-sdk/high_level.html#pico_stdlib">pico_stdlib</a>
2881 <a href="/documentation/pico-sdk/high_level.html#rpip04d09fa6ec88d8737403">Functions</a>
2885 <a href="/documentation/pico-sdk/high_level.html#rpip67e7d087a6d9d4177c9c">Detailed Description</a>
2889 <a href="/documentation/pico-sdk/high_level.html#rpip9d8a4958ff265de7762d">Function Documentation</a>
2897 <a href="/documentation/pico-sdk/high_level.html#pico_sync">pico_sync</a>
2902 <a href="/documentation/pico-sdk/high_level.html#rpip42988faa0a4de968a0fe">Modules</a>
2906 <a href="/documentation/pico-sdk/high_level.html#rpip0a443d120465214bff04">Detailed Description</a>
2910 <a href="/documentation/pico-sdk/high_level.html#critical_section">critical_section</a>
2914 <a href="/documentation/pico-sdk/high_level.html#lock_core">lock_core</a>
2918 <a href="/documentation/pico-sdk/high_level.html#mutex">mutex</a>
2922 <a href="/documentation/pico-sdk/high_level.html#sem">sem</a>
2930 <a href="/documentation/pico-sdk/high_level.html#pico_time">pico_time</a>
2935 <a href="/documentation/pico-sdk/high_level.html#rpip75fc0e1fb693907ffae4">Modules</a>
2939 <a href="/documentation/pico-sdk/high_level.html#rpip587c32f8059c662009b6">Detailed Description</a>
2943 <a href="/documentation/pico-sdk/high_level.html#timestamp">timestamp</a>
2947 <a href="/documentation/pico-sdk/high_level.html#sleep">sleep</a>
2951 <a href="/documentation/pico-sdk/high_level.html#alarm">alarm</a>
2955 <a href="/documentation/pico-sdk/high_level.html#repeating_timer">repeating_timer</a>
2963 <a href="/documentation/pico-sdk/high_level.html#pico_unique_id">pico_unique_id</a>
2968 <a href="/documentation/pico-sdk/high_level.html#rpip7981e60e740d763c8048">Data Structures</a>
2972 <a href="/documentation/pico-sdk/high_level.html#rpip04f6f057a3030914c7d2">Functions</a>
2976 <a href="/documentation/pico-sdk/high_level.html#rpip2a7175316ee370f706a8">Detailed Description</a>
2980 <a href="/documentation/pico-sdk/high_level.html#rpipec641d378cce59faa918">Function Documentation</a>
2988 <a href="/documentation/pico-sdk/high_level.html#pico_util">pico_util</a>
2993 <a href="/documentation/pico-sdk/high_level.html#rpip158b48d2746d665569ba">Modules</a>
2997 <a href="/documentation/pico-sdk/high_level.html#rpip8dab79e9dfcc333468bf">Detailed Description</a>
3001 <a href="/documentation/pico-sdk/high_level.html#util_datetime">datetime</a>
3005 <a href="/documentation/pico-sdk/high_level.html#util_pheap">pheap</a>
3009 <a href="/documentation/pico-sdk/high_level.html#queue">queue</a>
3021 <h3 class="contentshead" onclick="expandAndCollapse(this)">Third-party Libraries</h3>
3024 <div class="itemcontents">
3025 <ul class="sectlevel1">
3028 <a href="/documentation/pico-sdk/third_party.html#tinyusb_device">tinyusb_device</a>
3033 <a href="/documentation/pico-sdk/third_party.html#tinyusb_host">tinyusb_host</a>
3042 <h3 class="contentshead" onclick="expandAndCollapse(this)">Networking Libraries</h3>
3045 <div class="itemcontents">
3046 <ul class="sectlevel1">
3049 <a href="/documentation/pico-sdk/networking.html#pico_btstack">pico_btstack</a>
3054 <a href="/documentation/pico-sdk/networking.html#rpipabe482207518b13daea8">Functions</a>
3058 <a href="/documentation/pico-sdk/networking.html#rpip28aa570f7304feb24dd8">Detailed Description</a>
3062 <a href="/documentation/pico-sdk/networking.html#rpip81e86eeedf11e3669c51">Function Documentation</a>
3070 <a href="/documentation/pico-sdk/networking.html#pico_lwip">pico_lwip</a>
3075 <a href="/documentation/pico-sdk/networking.html#rpip192837c4e57e2f47dbf6">Modules</a>
3079 <a href="/documentation/pico-sdk/networking.html#rpip98f8ef4b7c7e1e6ce281">Detailed Description</a>
3083 <a href="/documentation/pico-sdk/networking.html#pico_lwip_arch">pico_lwip_arch</a>
3087 <a href="/documentation/pico-sdk/networking.html#pico_lwip_freertos">pico_lwip_freertos</a>
3091 <a href="/documentation/pico-sdk/networking.html#pico_lwip_nosys">pico_lwip_nosys</a>
3099 <a href="/documentation/pico-sdk/networking.html#pico_cyw43_driver">pico_cyw43_driver</a>
3104 <a href="/documentation/pico-sdk/networking.html#rpip0627746aa35c1c42f44c">Modules</a>
3108 <a href="/documentation/pico-sdk/networking.html#rpipae8b34f7bf0aa371c600">Files</a>
3112 <a href="/documentation/pico-sdk/networking.html#rpipd512513ec719cf7ab197">Functions</a>
3116 <a href="/documentation/pico-sdk/networking.html#rpipebe2d33331cf989e1d29">Detailed Description</a>
3120 <a href="/documentation/pico-sdk/networking.html#rpip7ddeab266708e76683af">Function Documentation</a>
3124 <a href="/documentation/pico-sdk/networking.html#pico_btstack_cyw43">pico_btstack_cyw43</a>
3132 <a href="/documentation/pico-sdk/networking.html#pico_cyw43_arch">pico_cyw43_arch</a>
3137 <a href="/documentation/pico-sdk/networking.html#rpip55bbe3b3adaa09c91f12">Modules</a>
3141 <a href="/documentation/pico-sdk/networking.html#rpipbd659dd2af29c569d582">Macros</a>
3145 <a href="/documentation/pico-sdk/networking.html#rpip2dbacd10d4e207dae370">Functions</a>
3149 <a href="/documentation/pico-sdk/networking.html#rpip2786c74350b1e1c2247c">Detailed Description</a>
3153 <a href="/documentation/pico-sdk/networking.html#rpip7e5d89be1cf9268f36c9">Macro Definition Documentation</a>
3157 <a href="/documentation/pico-sdk/networking.html#rpip2890f60e0c83d227f2ec">Function Documentation</a>
3161 <a href="/documentation/pico-sdk/networking.html#cyw43_driver">cyw43_driver</a>
3173 <h3 class="contentshead" onclick="expandAndCollapse(this)">Runtime Infrastructure</h3>
3176 <div class="itemcontents">
3177 <ul class="sectlevel1">
3180 <a href="/documentation/pico-sdk/runtime.html#boot_stage2">boot_stage2</a>
3185 <a href="/documentation/pico-sdk/runtime.html#pico_base">pico_base</a>
3190 <a href="/documentation/pico-sdk/runtime.html#rpip45542cfabd24f25c2b10">Enumerations</a>
3194 <a href="/documentation/pico-sdk/runtime.html#rpipb665655c66e63f4a0c4a">Detailed Description</a>
3202 <a href="/documentation/pico-sdk/runtime.html#pico_binary_info">pico_binary_info</a>
3207 <a href="/documentation/pico-sdk/runtime.html#rpip7989f07e71fba07188be">Macros</a>
3211 <a href="/documentation/pico-sdk/runtime.html#rpipc27123c22ad347cefc87">Detailed Description</a>
3215 <a href="/documentation/pico-sdk/runtime.html#rpipa2ff445fb2a0a57f9dde">Macro Definition Documentation</a>
3223 <a href="/documentation/pico-sdk/runtime.html#pico_bit_ops">pico_bit_ops</a>
3228 <a href="/documentation/pico-sdk/runtime.html#rpipf1806233ab08edf2d1a4">Functions</a>
3232 <a href="/documentation/pico-sdk/runtime.html#rpip63c260c668f0f7e929e9">Detailed Description</a>
3236 <a href="/documentation/pico-sdk/runtime.html#rpip2b305c870314270af1e5">Function Documentation</a>
3244 <a href="/documentation/pico-sdk/runtime.html#pico_bootrom">pico_bootrom</a>
3249 <a href="/documentation/pico-sdk/runtime.html#rpipcf60d5fd56095181a98e">Macros</a>
3253 <a href="/documentation/pico-sdk/runtime.html#rpip05bb858150fa37b3e132">Functions</a>
3257 <a href="/documentation/pico-sdk/runtime.html#rpip005c32aa3418cd5dc77d">Detailed Description</a>
3261 <a href="/documentation/pico-sdk/runtime.html#rpipf9cc87ae1233fe613239">Macro Definition Documentation</a>
3265 <a href="/documentation/pico-sdk/runtime.html#rpipab643919091a482a2c7d">Function Documentation</a>
3273 <a href="/documentation/pico-sdk/runtime.html#pico_bootsel_via_double_reset">pico_bootsel_via_double_reset</a>
3278 <a href="/documentation/pico-sdk/runtime.html#pico_cxx_options">pico_cxx_options</a>
3283 <a href="/documentation/pico-sdk/runtime.html#pico_divider">pico_divider</a>
3288 <a href="/documentation/pico-sdk/runtime.html#rpipfb1beee11febefbf90cc">Files</a>
3292 <a href="/documentation/pico-sdk/runtime.html#rpipa79e631886e62fcd1cd0">Functions</a>
3296 <a href="/documentation/pico-sdk/runtime.html#rpip108233463d1122628ba9">Detailed Description</a>
3300 <a href="/documentation/pico-sdk/runtime.html#rpip0d33c4d7c6e0d08667ce">Function Documentation</a>
3308 <a href="/documentation/pico-sdk/runtime.html#pico_double">pico_double</a>
3313 <a href="/documentation/pico-sdk/runtime.html#pico_float">pico_float</a>
3318 <a href="/documentation/pico-sdk/runtime.html#pico_int64_ops">pico_int64_ops</a>
3323 <a href="/documentation/pico-sdk/runtime.html#pico_malloc">pico_malloc</a>
3328 <a href="/documentation/pico-sdk/runtime.html#pico_mem_ops">pico_mem_ops</a>
3333 <a href="/documentation/pico-sdk/runtime.html#pico_platform">pico_platform</a>
3338 <a href="/documentation/pico-sdk/runtime.html#rpipb6ca92b8ab23006742ba">Macros</a>
3342 <a href="/documentation/pico-sdk/runtime.html#rpip96324626dec724f7403d">Functions</a>
3346 <a href="/documentation/pico-sdk/runtime.html#rpip092e8191441c92cf5ccf">Detailed Description</a>
3350 <a href="/documentation/pico-sdk/runtime.html#rpip464a3792c78a5a9ffa73">Macro Definition Documentation</a>
3354 <a href="/documentation/pico-sdk/runtime.html#rpip14e9a416348dd6951167">Function Documentation</a>
3362 <a href="/documentation/pico-sdk/runtime.html#pico_printf">pico_printf</a>
3367 <a href="/documentation/pico-sdk/runtime.html#pico_runtime">pico_runtime</a>
3372 <a href="/documentation/pico-sdk/runtime.html#pico_stdio">pico_stdio</a>
3377 <a href="/documentation/pico-sdk/runtime.html#rpip66600d8c06f1ab929c23">Modules</a>
3381 <a href="/documentation/pico-sdk/runtime.html#rpipbfbe419ab3a18de01187">Functions</a>
3385 <a href="/documentation/pico-sdk/runtime.html#rpip3eccc7d7592c0528c9ae">Detailed Description</a>
3389 <a href="/documentation/pico-sdk/runtime.html#rpip2fc272e282686cb4da01">Function Documentation</a>
3393 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_semihosting">pico_stdio_semihosting</a>
3397 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_uart">pico_stdio_uart</a>
3401 <a href="/documentation/pico-sdk/runtime.html#pico_stdio_usb">pico_stdio_usb</a>
3409 <a href="/documentation/pico-sdk/runtime.html#pico_standard_link">pico_standard_link</a>
3418 <h3 class="contentshead" onclick="expandAndCollapse(this)">External API Headers</h3>
3421 <div class="itemcontents">
3422 <ul class="sectlevel1">
3425 <a href="/documentation/pico-sdk/misc.html#boot_picoboot">boot_picoboot</a>
3430 <a href="/documentation/pico-sdk/misc.html#boot_uf2">boot_uf2</a>
3446 <section id="content">
3447 <h1>High Level APIs</h1>
3448 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3451 <div class="sectionbody">
3452 <div class="paragraph">
3453 <p>This group of libraries provide higher level functionality that isn’t hardware related or provides a richer set of functionality above the basic hardware interfaces</p>
3458 <h2 id="pico_async_context">
3459 <a class="anchor" href="#pico_async_context"></a>pico_async_context</h2>
3460 <div class="sectionbody"></div>
3461 <div class="ingroups" id="rpip80ddd45ab6891502753d">Part of: <a class="el" href="high_level.html" id="rpip8c1fb5192416b24c51f6">High Level APIs</a>
3464 <h3 id="rpip334b1daca4d436cd2653">
3465 <a class="anchor" href="#rpip334b1daca4d436cd2653"></a>Modules</h3>
3466 <ul class="memberdecls" id="rpipfbe2c3022d0932a85e72" data-parent-id="rpip26eb181b7dfadf6bfd2c">
3467 <li class="memitem">
3468 <p data-target="true" data-target-for="rpipfbe2c3022d0932a85e72"><span class="memItemLeft" data-target="true" id="rpip5c5e4902aba71404a274" data-parent-id="rpipfbe2c3022d0932a85e72" data-target-for="rpip5c5e4902aba71404a274">Â </span><span class="memItemRight" data-target="true" id="rpip9af2a83c2507ce432d83" data-parent-id="rpipfbe2c3022d0932a85e72" data-target-for="rpip9af2a83c2507ce432d83"><a class="el" href="high_level.html#async_context_freertos" id="rpipd864304723cc5eec4a01">async_context_freertos</a></span></p>
3470 <li class="memitem">
3471 <p data-target="true" data-target-for="rpip123195e3c9b0be7c4c6d"><span class="memItemLeft" data-target="true" id="rpip44232daa768114512a62" data-parent-id="rpip123195e3c9b0be7c4c6d" data-target-for="rpip44232daa768114512a62">Â </span><span class="memItemRight" data-target="true" id="rpip3d7f6c379c8d6ccc1255" data-parent-id="rpip123195e3c9b0be7c4c6d" data-target-for="rpip3d7f6c379c8d6ccc1255"><a class="el" href="high_level.html#async_context_poll" id="rpip5cb5fc8e6227f24b8788">async_context_poll</a></span></p>
3473 <li class="memitem">
3474 <p data-target="true" data-target-for="rpip3126d34014b8f00d9217"><span class="memItemLeft" data-target="true" id="rpipc1214d42328c2230e82f" data-parent-id="rpip3126d34014b8f00d9217" data-target-for="rpipc1214d42328c2230e82f">Â </span><span class="memItemRight" data-target="true" id="rpip34a48064e27e33169a95" data-parent-id="rpip3126d34014b8f00d9217" data-target-for="rpip34a48064e27e33169a95"><a class="el" href="high_level.html#async_context_threadsafe_background" id="rpip6f64993cc00380e35d90">async_context_threadsafe_background</a></span></p>
3479 <h3 id="rpip34a43d49030e182275e8">
3480 <a class="anchor" href="#rpip34a43d49030e182275e8"></a>Data Structures</h3>
3481 <ul class="memberdecls" id="rpip9865825e08de68c439c1" data-parent-id="rpip6b4c999db6afa68eed66">
3482 <li class="memitem">
3483 <p data-target="true" data-target-for="rpip9865825e08de68c439c1"><span class="memItemLeft" data-target="true" id="rpip43aa1616cf7aab786696" data-parent-id="rpip9865825e08de68c439c1" data-target-for="rpip43aa1616cf7aab786696">struct  </span><span class="memItemRight" data-target="true" id="rpip5f669ff4eac53816699b" data-parent-id="rpip9865825e08de68c439c1" data-target-for="rpip5f669ff4eac53816699b"><a class="el" href="structasync__work__on__timeout.html" id="rpip5cc1b99882539740dd56">async_work_on_timeout</a></span></p>
3485 <li class="memdesc">
3486 <p data-target="true" data-target-for="rpipcfbd03eff985cac1a440"><span class="mdescLeft" data-target="true" id="rpip6e3fde22f021dd401d78" data-parent-id="rpipcfbd03eff985cac1a440" data-target-for="rpip6e3fde22f021dd401d78">Â </span><span class="mdescRight" data-target="true" id="rpipadee0935b91327dff448" data-parent-id="rpipcfbd03eff985cac1a440" data-target-for="rpipadee0935b91327dff448">A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip7ca9b219738f3b132fc0">async_context</a>. <a href="structasync__work__on__timeout.html#details" id="rpipfe31f0c8acba28932c8e" data-adjusted="true">More...</a><br id="rpipd1df60395c8f088f6e4b"></span></p>
3488 <li class="memitem">
3489 <p data-target="true" data-target-for="rpip43f317ac256aa0a6818d"><span class="memItemLeft" data-target="true" id="rpip6b4831dc5eb55028b46f" data-parent-id="rpip43f317ac256aa0a6818d" data-target-for="rpip6b4831dc5eb55028b46f">struct  </span><span class="memItemRight" data-target="true" id="rpipfd6d793f96d8a05885c1" data-parent-id="rpip43f317ac256aa0a6818d" data-target-for="rpipfd6d793f96d8a05885c1"><a class="el" href="structasync__when__pending__worker.html" id="rpipc5ece21e2a9268e73c6c">async_when_pending_worker</a></span></p>
3491 <li class="memdesc">
3492 <p data-target="true" data-target-for="rpip6e7bc91ec009779a1fd2"><span class="mdescLeft" data-target="true" id="rpipda98196fd587549b0797" data-parent-id="rpip6e7bc91ec009779a1fd2" data-target-for="rpipda98196fd587549b0797">Â </span><span class="mdescRight" data-target="true" id="rpip1a1b8e23aea7b5a1e99e" data-parent-id="rpip6e7bc91ec009779a1fd2" data-target-for="rpip1a1b8e23aea7b5a1e99e">A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip2b5e3f94d0803694f276">async_context</a>. <a href="structasync__when__pending__worker.html#details" id="rpipe8b9978e69963752265f" data-adjusted="true">More...</a><br id="rpip38df31595d92600792c4"></span></p>
3494 <li class="memitem">
3495 <p data-target="true" data-target-for="rpip7752b3f12760c9ed3b74"><span class="memItemLeft" data-target="true" id="rpipb34e8b016371f80a45c5" data-parent-id="rpip7752b3f12760c9ed3b74" data-target-for="rpipb34e8b016371f80a45c5">struct  </span><span class="memItemRight" data-target="true" id="rpip63398c0251320e454632" data-parent-id="rpip7752b3f12760c9ed3b74" data-target-for="rpip63398c0251320e454632"><a class="el" href="structasync__context__type.html" id="rpipbdb84a860f040a74bf87">async_context_type</a></span></p>
3497 <li class="memdesc">
3498 <p data-target="true" data-target-for="rpip7b6e0312fdc1f173b011"><span class="mdescLeft" data-target="true" id="rpipb9d6d3b4f44280991d23" data-parent-id="rpip7b6e0312fdc1f173b011" data-target-for="rpipb9d6d3b4f44280991d23">Â </span><span class="mdescRight" data-target="true" id="rpip78e957840e7d7e7df4a3" data-parent-id="rpip7b6e0312fdc1f173b011" data-target-for="rpip78e957840e7d7e7df4a3">Implementation of an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip43c47aaf2e2b789732a5">async_context</a> type, providing methods common to that type. <a href="structasync__context__type.html#details" id="rpipad6d4c9c1f9dec807bda" data-adjusted="true">More...</a><br id="rpip4d1852f140be6151e137"></span></p>
3500 <li class="memitem">
3501 <p data-target="true" data-target-for="rpip68b2a323ff0fa4a428ac"><span class="memItemLeft" data-target="true" id="rpip5fd8ff22afcc18259afb" data-parent-id="rpip68b2a323ff0fa4a428ac" data-target-for="rpip5fd8ff22afcc18259afb">struct  </span><span class="memItemRight" data-target="true" id="rpipc83bb060e4862f7b40dd" data-parent-id="rpip68b2a323ff0fa4a428ac" data-target-for="rpipc83bb060e4862f7b40dd"><a class="el" href="structasync__context.html" id="rpip3e385fd9042a79259ee4">async_context</a></span></p>
3503 <li class="memdesc">
3504 <p data-target="true" data-target-for="rpipc741c71a0f6a902c69a2"><span class="mdescLeft" data-target="true" id="rpip94fc4905483e61c49426" data-parent-id="rpipc741c71a0f6a902c69a2" data-target-for="rpip94fc4905483e61c49426">Â </span><span class="mdescRight" data-target="true" id="rpip9e18bc8fe8e547b413b4" data-parent-id="rpipc741c71a0f6a902c69a2" data-target-for="rpip9e18bc8fe8e547b413b4">Base structure type of all async_contexts. For details about its use, see <a class="el" href="high_level.html#pico_async_context" id="rpipc9194aaa3ef392edbe7d">pico_async_context</a>. <a href="structasync__context.html#details" id="rpip0a4639e89fe905a5c039" data-adjusted="true">More...</a><br id="rpipfa48acc2ab9992df88e4"></span></p>
3509 <h3 id="rpip73422519f861a01369c4">
3510 <a class="anchor" href="#rpip73422519f861a01369c4"></a>Typedefs</h3>
3511 <ul class="memberdecls" id="rpipb567e74bd7fab63e9e54" data-parent-id="rpip6da3bd76764a2f36607c">
3512 <li class="memitem">
3513 <p data-target="true" data-target-for="rpipb567e74bd7fab63e9e54"><span class="memItemLeft" data-target="true" id="rpip5ab0e7fe5e6434e0890a" data-parent-id="rpipb567e74bd7fab63e9e54" data-target-for="rpip5ab0e7fe5e6434e0890a">typedef struct <a class="el" href="structasync__work__on__timeout.html" id="rpipc770c8239074b9cb5b8e">async_work_on_timeout</a>Â </span><span class="memItemRight" data-target="true" id="rpip5578f0e56d7893dc35f3" data-parent-id="rpipb567e74bd7fab63e9e54" data-target-for="rpip5578f0e56d7893dc35f3"><a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip60c6b945c09ce189c3cd" data-adjusted="true">async_at_time_worker_t</a></span></p>
3515 <li class="memdesc">
3516 <p data-target="true" data-target-for="rpip36b49e6c3ba46b8f4ec0"><span class="mdescLeft" data-target="true" id="rpip740ae7c24814f289b38f" data-parent-id="rpip36b49e6c3ba46b8f4ec0" data-target-for="rpip740ae7c24814f289b38f">Â </span><span class="mdescRight" data-target="true" id="rpip5267d35aa4fc39373531" data-parent-id="rpip36b49e6c3ba46b8f4ec0" data-target-for="rpip5267d35aa4fc39373531">A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip02737bd4acdf742f7bcf">async_context</a>. <br id="rpipe4453f9bba30ea150178"></span></p>
3518 <li class="memitem">
3519 <p data-target="true" data-target-for="rpipe746bd6554d241627516"><span class="memItemLeft" data-target="true" id="rpip2bb85c897a6c300b9d4b" data-parent-id="rpipe746bd6554d241627516" data-target-for="rpip2bb85c897a6c300b9d4b">typedef struct <a class="el" href="structasync__when__pending__worker.html" id="rpip947aa37d73eea5220231">async_when_pending_worker</a>Â </span><span class="memItemRight" data-target="true" id="rpiped1e85416622c524eef0" data-parent-id="rpipe746bd6554d241627516" data-target-for="rpiped1e85416622c524eef0"><a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpipeef16e4dbcae25be3ec8" data-adjusted="true">async_when_pending_worker_t</a></span></p>
3521 <li class="memdesc">
3522 <p data-target="true" data-target-for="rpipbcadfc13cd5a13b9364f"><span class="mdescLeft" data-target="true" id="rpipe4dea25596662c021969" data-parent-id="rpipbcadfc13cd5a13b9364f" data-target-for="rpipe4dea25596662c021969">Â </span><span class="mdescRight" data-target="true" id="rpipd9a6f8d09cf720da0206" data-parent-id="rpipbcadfc13cd5a13b9364f" data-target-for="rpipd9a6f8d09cf720da0206">A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbf7d26ed41137ecf2307">async_context</a>. <br id="rpip55ab5928ddf574112d1a"></span></p>
3524 <li class="memitem">
3525 <p data-target="true" data-target-for="rpipc691337632001976bb90"><span class="memItemLeft" data-target="true" id="rpipb0db9f4216b29a71e1d7" data-parent-id="rpipc691337632001976bb90" data-target-for="rpipb0db9f4216b29a71e1d7"><a id="ga1dd6a1433c144f4c4ea28d54176d9fc7" name="ga1dd6a1433c144f4c4ea28d54176d9fc7"></a>
3526 typedef struct <a class="el" href="structasync__context__type.html" id="rpipb7f13d86c99cb81623b9">async_context_type</a>Â </span><span class="memItemRight" data-target="true" id="rpipcceb69211220188ff2c6" data-parent-id="rpipc691337632001976bb90" data-target-for="rpipcceb69211220188ff2c6"><b id="rpip11915f660eb31aa1bccc">async_context_type_t</b></span></p>
3528 <li class="memdesc">
3529 <p data-target="true" data-target-for="rpip8487331547c1ce7b0e0e"><span class="mdescLeft" data-target="true" id="rpipd3b5e911f1b9f4c5f826" data-parent-id="rpip8487331547c1ce7b0e0e" data-target-for="rpipd3b5e911f1b9f4c5f826">Â </span><span class="mdescRight" data-target="true" id="rpipa28f7033b6d4c9cd8595" data-parent-id="rpip8487331547c1ce7b0e0e" data-target-for="rpipa28f7033b6d4c9cd8595">Implementation of an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipe9307c814b7e4820b142">async_context</a> type, providing methods common to that type. <br id="rpipcbb85e411e901b832ce0"></span></p>
3534 <h3 id="rpipc33092ce8251b4b8dbf1">
3535 <a class="anchor" href="#rpipc33092ce8251b4b8dbf1"></a>Functions</h3>
3536 <ul class="memberdecls" id="rpip3e87225a842a0c7432a8" data-parent-id="rpipc8bdbf2fe9e41b794bad">
3537 <li class="memitem">
3538 <p data-target="true" data-target-for="rpip3e87225a842a0c7432a8"><span class="memItemLeft" data-target="true" id="rpip7a55b5ce0d9bf12f2792" data-parent-id="rpip3e87225a842a0c7432a8" data-target-for="rpip7a55b5ce0d9bf12f2792">static void </span><span class="memItemRight" data-target="true" id="rpipeb0d5926c0319705c475" data-parent-id="rpip3e87225a842a0c7432a8" data-target-for="rpipeb0d5926c0319705c475"><a class="el" href="#ga404d5e6a8ef79159c692dc040f2ded44" id="rpip691cc897e93621e619eb" data-adjusted="true">async_context_acquire_lock_blocking</a> (<a class="el" href="structasync__context.html" id="rpip0863d9f528c1f55ff533">async_context_t</a> *context)</span></p>
3540 <li class="memdesc">
3541 <p data-target="true" data-target-for="rpipe98af329ee1462625f8f"><span class="mdescLeft" data-target="true" id="rpip1f4e5b32a94b3421dbd4" data-parent-id="rpipe98af329ee1462625f8f" data-target-for="rpip1f4e5b32a94b3421dbd4">Â </span><span class="mdescRight" data-target="true" id="rpipece2853ee08899ea1652" data-parent-id="rpipe98af329ee1462625f8f" data-target-for="rpipece2853ee08899ea1652">Acquire the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbfbd530cdadbfc8c8651">async_context</a> lock. <br id="rpip04bb0884764ece678184"></span></p>
3543 <li class="memitem">
3544 <p data-target="true" data-target-for="rpip605ca96fe7a2a360e078"><span class="memItemLeft" data-target="true" id="rpipb827a7bf8067c03cc14b" data-parent-id="rpip605ca96fe7a2a360e078" data-target-for="rpipb827a7bf8067c03cc14b">static void </span><span class="memItemRight" data-target="true" id="rpipbf897d0e4f255e66c678" data-parent-id="rpip605ca96fe7a2a360e078" data-target-for="rpipbf897d0e4f255e66c678"><a class="el" href="#gada9eb6dbc0442ba9cbb44a41526f3b9f" id="rpip90e49b2dec9d1ba4b997" data-adjusted="true">async_context_release_lock</a> (<a class="el" href="structasync__context.html" id="rpip67caaa44f73efd40b6d1">async_context_t</a> *context)</span></p>
3546 <li class="memdesc">
3547 <p data-target="true" data-target-for="rpip8adace39e8a938064c55"><span class="mdescLeft" data-target="true" id="rpipf74fc3ee8fb272be1dbc" data-parent-id="rpip8adace39e8a938064c55" data-target-for="rpipf74fc3ee8fb272be1dbc">Â </span><span class="mdescRight" data-target="true" id="rpipf5deabefa8fff6497172" data-parent-id="rpip8adace39e8a938064c55" data-target-for="rpipf5deabefa8fff6497172">Release the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip89fa71b25a65adabcbdc">async_context</a> lock. <br id="rpip127e3c413dcfdba60d54"></span></p>
3549 <li class="memitem">
3550 <p data-target="true" data-target-for="rpip7d12218921e00cce131c"><span class="memItemLeft" data-target="true" id="rpip0a4d90268fdadb583b7c" data-parent-id="rpip7d12218921e00cce131c" data-target-for="rpip0a4d90268fdadb583b7c">static void </span><span class="memItemRight" data-target="true" id="rpip73f1e1d8890735b7010d" data-parent-id="rpip7d12218921e00cce131c" data-target-for="rpip73f1e1d8890735b7010d"><a class="el" href="#ga032285b9d1a4aa325813cdbcc1f00a75" id="rpip99acebd25c3177de8929" data-adjusted="true">async_context_lock_check</a> (<a class="el" href="structasync__context.html" id="rpip8daff02bfaf796b19653">async_context_t</a> *context)</span></p>
3552 <li class="memdesc">
3553 <p data-target="true" data-target-for="rpip994be3645099da5c66ef"><span class="mdescLeft" data-target="true" id="rpipacdad89683773e23096f" data-parent-id="rpip994be3645099da5c66ef" data-target-for="rpipacdad89683773e23096f">Â </span><span class="mdescRight" data-target="true" id="rpipac07481a488ab64519d9" data-parent-id="rpip994be3645099da5c66ef" data-target-for="rpipac07481a488ab64519d9">Assert if the caller does not own the lock for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip4ffc2cc1b02012b2b956">async_context</a>. <br id="rpip4e52e163f9810ee1f836"></span></p>
3555 <li class="memitem">
3556 <p data-target="true" data-target-for="rpipbd1a717bf0c49e0c9363"><span class="memItemLeft" data-target="true" id="rpip1a516f8fc5671b60bbfc" data-parent-id="rpipbd1a717bf0c49e0c9363" data-target-for="rpip1a516f8fc5671b60bbfc">static uint32_t </span><span class="memItemRight" data-target="true" id="rpip0e44fb37803875d89d90" data-parent-id="rpipbd1a717bf0c49e0c9363" data-target-for="rpip0e44fb37803875d89d90"><a class="el" href="#gaa4b239c998978b97eabe2aa2ad659720" id="rpip48fa1e1828eb9fd9f4a6" data-adjusted="true">async_context_execute_sync</a> (<a class="el" href="structasync__context.html" id="rpip6110ccf940aa4fa75868">async_context_t</a> *context, uint32_t(*func)(void *param), void *param)</span></p>
3558 <li class="memdesc">
3559 <p data-target="true" data-target-for="rpipd790ad86eb7395184aa7"><span class="mdescLeft" data-target="true" id="rpip8318160b575248b3f435" data-parent-id="rpipd790ad86eb7395184aa7" data-target-for="rpip8318160b575248b3f435">Â </span><span class="mdescRight" data-target="true" id="rpip0599210df04fb3abff40" data-parent-id="rpipd790ad86eb7395184aa7" data-target-for="rpip0599210df04fb3abff40">Execute work synchronously on the core the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip34d667ef7a75192a9283">async_context</a> belongs to. <br id="rpip18100ff2f3a732adcd48"></span></p>
3561 <li class="memitem">
3562 <p data-target="true" data-target-for="rpip102c36db13159c0e0b52"><span class="memItemLeft" data-target="true" id="rpip5596d364b56ed0aa2e98" data-parent-id="rpip102c36db13159c0e0b52" data-target-for="rpip5596d364b56ed0aa2e98">static bool </span><span class="memItemRight" data-target="true" id="rpipa8a87e7539535ee84613" data-parent-id="rpip102c36db13159c0e0b52" data-target-for="rpipa8a87e7539535ee84613"><a class="el" href="#gad4ea52957b11c70d908e5af6f0c715ab" id="rpip6a67789224d26272be15" data-adjusted="true">async_context_add_at_time_worker</a> (<a class="el" href="structasync__context.html" id="rpipc578c74e715f2d4b9c10">async_context_t</a> *context, <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip206687f05480bf25b708" data-adjusted="true">async_at_time_worker_t</a> *worker)</span></p>
3564 <li class="memdesc">
3565 <p data-target="true" data-target-for="rpipaa70bea55f7cad34d790"><span class="mdescLeft" data-target="true" id="rpip4babbef454db30de356e" data-parent-id="rpipaa70bea55f7cad34d790" data-target-for="rpip4babbef454db30de356e">Â </span><span class="mdescRight" data-target="true" id="rpip787877e7448b6b6cfda9" data-parent-id="rpipaa70bea55f7cad34d790" data-target-for="rpip787877e7448b6b6cfda9">Add an "at time" worker to a context. <br id="rpip17c7892c4eb5c421490f"></span></p>
3567 <li class="memitem">
3568 <p data-target="true" data-target-for="rpip3c68a87124991ddec3f9"><span class="memItemLeft" data-target="true" id="rpip918ac2bde4f15b1ce8b5" data-parent-id="rpip3c68a87124991ddec3f9" data-target-for="rpip918ac2bde4f15b1ce8b5">static bool </span><span class="memItemRight" data-target="true" id="rpip9743b7c67a1324ec381f" data-parent-id="rpip3c68a87124991ddec3f9" data-target-for="rpip9743b7c67a1324ec381f"><a class="el" href="#ga8ef9fba4dd680a576d94c82b40b10fc3" id="rpip1fff2d592d508dd5e143" data-adjusted="true">async_context_add_at_time_worker_at</a> (<a class="el" href="structasync__context.html" id="rpip70e00aa6faee0ef1d4f6">async_context_t</a> *context, <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip1c75d8f66dd0d99107a9" data-adjusted="true">async_at_time_worker_t</a> *worker, <a class="el" href="structabsolute__time__t.html" id="rpip5d2689ed9f1632451e02">absolute_time_t</a> at)</span></p>
3570 <li class="memdesc">
3571 <p data-target="true" data-target-for="rpipc1b05ddd0ef3bb8b024a"><span class="mdescLeft" data-target="true" id="rpipdf06a03e72510588bf4c" data-parent-id="rpipc1b05ddd0ef3bb8b024a" data-target-for="rpipdf06a03e72510588bf4c">Â </span><span class="mdescRight" data-target="true" id="rpip318150f797dfb07f5ed5" data-parent-id="rpipc1b05ddd0ef3bb8b024a" data-target-for="rpip318150f797dfb07f5ed5">Add an "at time" worker to a context. <br id="rpipcb0fcf31b7a568cc5032"></span></p>
3573 <li class="memitem">
3574 <p data-target="true" data-target-for="rpip16850683ef5b371d0425"><span class="memItemLeft" data-target="true" id="rpipadfd4e5a9ceced087d42" data-parent-id="rpip16850683ef5b371d0425" data-target-for="rpipadfd4e5a9ceced087d42">static bool </span><span class="memItemRight" data-target="true" id="rpipde9b88a9b658f8dad150" data-parent-id="rpip16850683ef5b371d0425" data-target-for="rpipde9b88a9b658f8dad150"><a class="el" href="#gae0792d86734a6e30b2f043b8eba42438" id="rpip36738a2f05ce0e564085" data-adjusted="true">async_context_add_at_time_worker_in_ms</a> (<a class="el" href="structasync__context.html" id="rpip71d6ec71a554005bf027">async_context_t</a> *context, <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpipb57ccd0c390714e64755" data-adjusted="true">async_at_time_worker_t</a> *worker, uint32_t ms)</span></p>
3576 <li class="memdesc">
3577 <p data-target="true" data-target-for="rpipa8b9f80eae8a864ad6e9"><span class="mdescLeft" data-target="true" id="rpipb49c65ed6cf72c5198d0" data-parent-id="rpipa8b9f80eae8a864ad6e9" data-target-for="rpipb49c65ed6cf72c5198d0">Â </span><span class="mdescRight" data-target="true" id="rpip011b81e7bb155fc64e88" data-parent-id="rpipa8b9f80eae8a864ad6e9" data-target-for="rpip011b81e7bb155fc64e88">Add an "at time" worker to a context. <br id="rpipa3c91408e53c554d8670"></span></p>
3579 <li class="memitem">
3580 <p data-target="true" data-target-for="rpip94b8e9376a1a8738c8e5"><span class="memItemLeft" data-target="true" id="rpipee25f95fea2eaac33054" data-parent-id="rpip94b8e9376a1a8738c8e5" data-target-for="rpipee25f95fea2eaac33054">static bool </span><span class="memItemRight" data-target="true" id="rpipec2dbf274189a5ff52b0" data-parent-id="rpip94b8e9376a1a8738c8e5" data-target-for="rpipec2dbf274189a5ff52b0"><a class="el" href="#ga58c96cc02b63e12874cae38442c7c4dd" id="rpip161e3b380892c75372c8" data-adjusted="true">async_context_remove_at_time_worker</a> (<a class="el" href="structasync__context.html" id="rpipc9b6f230b98dbc5dce2e">async_context_t</a> *context, <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpipd62682722dcb1ee4f94d" data-adjusted="true">async_at_time_worker_t</a> *worker)</span></p>
3582 <li class="memdesc">
3583 <p data-target="true" data-target-for="rpip28661c377dbec83b5f5f"><span class="mdescLeft" data-target="true" id="rpip26c5c4b818b00532745b" data-parent-id="rpip28661c377dbec83b5f5f" data-target-for="rpip26c5c4b818b00532745b">Â </span><span class="mdescRight" data-target="true" id="rpipea7435aa25918fe3455d" data-parent-id="rpip28661c377dbec83b5f5f" data-target-for="rpipea7435aa25918fe3455d">Remove an "at time" worker from a context. <br id="rpip6fa3d9652bb704cbb1bb"></span></p>
3585 <li class="memitem">
3586 <p data-target="true" data-target-for="rpip9dfd528a50015d4282d0"><span class="memItemLeft" data-target="true" id="rpip2ef4236ae7d61b236255" data-parent-id="rpip9dfd528a50015d4282d0" data-target-for="rpip2ef4236ae7d61b236255">static bool </span><span class="memItemRight" data-target="true" id="rpipc1786959f676b5129795" data-parent-id="rpip9dfd528a50015d4282d0" data-target-for="rpipc1786959f676b5129795"><a class="el" href="#ga9d42179771bcc8c99124c43dcc7b1350" id="rpip46f4c93e4a4be34a7677" data-adjusted="true">async_context_add_when_pending_worker</a> (<a class="el" href="structasync__context.html" id="rpipb5e34f09853090e8fc10">async_context_t</a> *context, <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpip6aaed98c26f8d7f8fbca" data-adjusted="true">async_when_pending_worker_t</a> *worker)</span></p>
3588 <li class="memdesc">
3589 <p data-target="true" data-target-for="rpip0b804b8c6b9f67e7137b"><span class="mdescLeft" data-target="true" id="rpip88d9e7fe1e6830b82e01" data-parent-id="rpip0b804b8c6b9f67e7137b" data-target-for="rpip88d9e7fe1e6830b82e01">Â </span><span class="mdescRight" data-target="true" id="rpip02336bcd01480d8deb4f" data-parent-id="rpip0b804b8c6b9f67e7137b" data-target-for="rpip02336bcd01480d8deb4f">Add a "when pending" worker to a context. <br id="rpip0edcd589c498cbbb36d1"></span></p>
3591 <li class="memitem">
3592 <p data-target="true" data-target-for="rpipef05be58559fda2daa5b"><span class="memItemLeft" data-target="true" id="rpip27387e880bd71702b990" data-parent-id="rpipef05be58559fda2daa5b" data-target-for="rpip27387e880bd71702b990">static bool </span><span class="memItemRight" data-target="true" id="rpip70e0dede22e606a1e21d" data-parent-id="rpipef05be58559fda2daa5b" data-target-for="rpip70e0dede22e606a1e21d"><a class="el" href="#ga72b40c2505cd08cb542c3f1759b9e1d5" id="rpip3cec1fa686eb2f15cfa0" data-adjusted="true">async_context_remove_when_pending_worker</a> (<a class="el" href="structasync__context.html" id="rpipbd4909bfb78036d92dad">async_context_t</a> *context, <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpipcaa3d89a7c99b9018cf6" data-adjusted="true">async_when_pending_worker_t</a> *worker)</span></p>
3594 <li class="memdesc">
3595 <p data-target="true" data-target-for="rpip2dfa5101feab3bf84bf8"><span class="mdescLeft" data-target="true" id="rpip76dfd05fc47a3b4678ee" data-parent-id="rpip2dfa5101feab3bf84bf8" data-target-for="rpip76dfd05fc47a3b4678ee">Â </span><span class="mdescRight" data-target="true" id="rpip33746753c68bac4c7a2e" data-parent-id="rpip2dfa5101feab3bf84bf8" data-target-for="rpip33746753c68bac4c7a2e">Remove a "when pending" worker from a context. <br id="rpipcaaccb77b5a8f3909dc1"></span></p>
3597 <li class="memitem">
3598 <p data-target="true" data-target-for="rpip0b9f5dd812bc7c396cff"><span class="memItemLeft" data-target="true" id="rpipdfb0dce2c3ed2a99b2a9" data-parent-id="rpip0b9f5dd812bc7c396cff" data-target-for="rpipdfb0dce2c3ed2a99b2a9">static void </span><span class="memItemRight" data-target="true" id="rpip371c10755550c3143db9" data-parent-id="rpip0b9f5dd812bc7c396cff" data-target-for="rpip371c10755550c3143db9"><a class="el" href="#ga1ca51536a6f0344cfcbd30bd09fbaec2" id="rpip8130311cee5db6292102" data-adjusted="true">async_context_set_work_pending</a> (<a class="el" href="structasync__context.html" id="rpip3062119b5f37bc328df2">async_context_t</a> *context, <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpip6dc2b3a3ed51fea02b21" data-adjusted="true">async_when_pending_worker_t</a> *worker)</span></p>
3600 <li class="memdesc">
3601 <p data-target="true" data-target-for="rpip67be186859375352b8d0"><span class="mdescLeft" data-target="true" id="rpip1d35bf44060e9ac959bf" data-parent-id="rpip67be186859375352b8d0" data-target-for="rpip1d35bf44060e9ac959bf">Â </span><span class="mdescRight" data-target="true" id="rpipedf517a28d659a109732" data-parent-id="rpip67be186859375352b8d0" data-target-for="rpipedf517a28d659a109732">Mark a "when pending" worker as having work pending. <br id="rpipa732785e9367234638b7"></span></p>
3603 <li class="memitem">
3604 <p data-target="true" data-target-for="rpipa8d35d6b6f77ada79a43"><span class="memItemLeft" data-target="true" id="rpip92b18575eedf84422bc8" data-parent-id="rpipa8d35d6b6f77ada79a43" data-target-for="rpip92b18575eedf84422bc8">static void </span><span class="memItemRight" data-target="true" id="rpipb53be6b607e399263c0e" data-parent-id="rpipa8d35d6b6f77ada79a43" data-target-for="rpipb53be6b607e399263c0e"><a class="el" href="#gafdb322c3f1043265624988215d3a8df9" id="rpip4447a85f8c38963db6aa" data-adjusted="true">async_context_poll</a> (<a class="el" href="structasync__context.html" id="rpipfe90df5d4da537eace7e">async_context_t</a> *context)</span></p>
3606 <li class="memdesc">
3607 <p data-target="true" data-target-for="rpip94531770e37425c3efd9"><span class="mdescLeft" data-target="true" id="rpip67e86db09c1344b6abb7" data-parent-id="rpip94531770e37425c3efd9" data-target-for="rpip67e86db09c1344b6abb7">Â </span><span class="mdescRight" data-target="true" id="rpipd4a1a1d8119c38bc355c" data-parent-id="rpip94531770e37425c3efd9" data-target-for="rpipd4a1a1d8119c38bc355c">Perform any pending work for polling style <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipfb21ef08c20f1e9c622d">async_context</a>. <br id="rpip00eb8666facdc5266930"></span></p>
3609 <li class="memitem">
3610 <p data-target="true" data-target-for="rpip7c57ef17911b9cb7122f"><span class="memItemLeft" data-target="true" id="rpip146cff55c94555dd37fc" data-parent-id="rpip7c57ef17911b9cb7122f" data-target-for="rpip146cff55c94555dd37fc">static void </span><span class="memItemRight" data-target="true" id="rpipe3a0e10ba1780d5e182e" data-parent-id="rpip7c57ef17911b9cb7122f" data-target-for="rpipe3a0e10ba1780d5e182e"><a class="el" href="#gad2f27b21dbaa264dfe59ef0f59de11db" id="rpipb9bb3adaa4bd3ead967d" data-adjusted="true">async_context_wait_until</a> (<a class="el" href="structasync__context.html" id="rpipf677919e4e2614874416">async_context_t</a> *context, <a class="el" href="structabsolute__time__t.html" id="rpipa8383157215299305ec0">absolute_time_t</a> until)</span></p>
3612 <li class="memdesc">
3613 <p data-target="true" data-target-for="rpip02dc5d584e424d1924c3"><span class="mdescLeft" data-target="true" id="rpip3e2227febc253bd2a187" data-parent-id="rpip02dc5d584e424d1924c3" data-target-for="rpip3e2227febc253bd2a187">Â </span><span class="mdescRight" data-target="true" id="rpip399dffacfc0217797540" data-parent-id="rpip02dc5d584e424d1924c3" data-target-for="rpip399dffacfc0217797540">sleep until the specified time in an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip4b353aa7ffb9bbcb6be8">async_context</a> callback safe way <br id="rpip53e68dd78ad5545c111e"></span></p>
3615 <li class="memitem">
3616 <p data-target="true" data-target-for="rpip9327a11656494a05193b"><span class="memItemLeft" data-target="true" id="rpip6469879aec60aa529421" data-parent-id="rpip9327a11656494a05193b" data-target-for="rpip6469879aec60aa529421">static void </span><span class="memItemRight" data-target="true" id="rpip7f9d161bfd5a8afe2ebe" data-parent-id="rpip9327a11656494a05193b" data-target-for="rpip7f9d161bfd5a8afe2ebe"><a class="el" href="#ga6207f562c0b69c7a75cd81a783eb1055" id="rpip0fba4d71b595873e30bc" data-adjusted="true">async_context_wait_for_work_until</a> (<a class="el" href="structasync__context.html" id="rpip0e7607d26b39210a5cb0">async_context_t</a> *context, <a class="el" href="structabsolute__time__t.html" id="rpipe1284ab3b3e718d7addb">absolute_time_t</a> until)</span></p>
3618 <li class="memdesc">
3619 <p data-target="true" data-target-for="rpipb148c130d000ede1cd12"><span class="mdescLeft" data-target="true" id="rpip78f76b4a088fc66ef0eb" data-parent-id="rpipb148c130d000ede1cd12" data-target-for="rpip78f76b4a088fc66ef0eb">Â </span><span class="mdescRight" data-target="true" id="rpip1cb261cc773ab2e81920" data-parent-id="rpipb148c130d000ede1cd12" data-target-for="rpip1cb261cc773ab2e81920">Block until work needs to be done or the specified time has been reached. <br id="rpip0ea9ea0c03ff446dee3f"></span></p>
3621 <li class="memitem">
3622 <p data-target="true" data-target-for="rpip5ed724631b43cfaaa5b5"><span class="memItemLeft" data-target="true" id="rpipa2968d19a2f04508d2a6" data-parent-id="rpip5ed724631b43cfaaa5b5" data-target-for="rpipa2968d19a2f04508d2a6">static void </span><span class="memItemRight" data-target="true" id="rpip7c0107693bd2fa33fcd1" data-parent-id="rpip5ed724631b43cfaaa5b5" data-target-for="rpip7c0107693bd2fa33fcd1"><a class="el" href="#gaae7ea2fed2b274a63455773d056f6d4c" id="rpipe6765042fb56e93784d1" data-adjusted="true">async_context_wait_for_work_ms</a> (<a class="el" href="structasync__context.html" id="rpip2bf96c4781e230b63be4">async_context_t</a> *context, uint32_t ms)</span></p>
3624 <li class="memdesc">
3625 <p data-target="true" data-target-for="rpip92d035eab660de83cf4f"><span class="mdescLeft" data-target="true" id="rpip5a204b76ef17dc41193b" data-parent-id="rpip92d035eab660de83cf4f" data-target-for="rpip5a204b76ef17dc41193b">Â </span><span class="mdescRight" data-target="true" id="rpip75cd418d2d2046a07aa2" data-parent-id="rpip92d035eab660de83cf4f" data-target-for="rpip75cd418d2d2046a07aa2">Block until work needs to be done or the specified number of milliseconds have passed. <br id="rpipe6ef5dfa05fcbf6ab504"></span></p>
3627 <li class="memitem">
3628 <p data-target="true" data-target-for="rpip3e31fc77e78cebe3d753"><span class="memItemLeft" data-target="true" id="rpip2e92b4a389ed9694d65f" data-parent-id="rpip3e31fc77e78cebe3d753" data-target-for="rpip2e92b4a389ed9694d65f">static uint </span><span class="memItemRight" data-target="true" id="rpipff50017c012da569348e" data-parent-id="rpip3e31fc77e78cebe3d753" data-target-for="rpipff50017c012da569348e"><a class="el" href="#ga604afdcf2e76f1bf99df469edfadf7eb" id="rpip9077e5adbc68a8b24093" data-adjusted="true">async_context_core_num</a> (const <a class="el" href="structasync__context.html" id="rpip6ebe8b10f090ae68ce66">async_context_t</a> *context)</span></p>
3630 <li class="memdesc">
3631 <p data-target="true" data-target-for="rpipcaa5338c10666990ab99"><span class="mdescLeft" data-target="true" id="rpip8b67b6d0311c3b107a2e" data-parent-id="rpipcaa5338c10666990ab99" data-target-for="rpip8b67b6d0311c3b107a2e">Â </span><span class="mdescRight" data-target="true" id="rpipeaabb610f393e9eb112b" data-parent-id="rpipcaa5338c10666990ab99" data-target-for="rpipeaabb610f393e9eb112b">Return the processor core this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipe8191a409c04cff73e3b">async_context</a> belongs to. <br id="rpip4fad31a0d493d6d5e696"></span></p>
3633 <li class="memitem">
3634 <p data-target="true" data-target-for="rpip05346c4120375f0aac53"><span class="memItemLeft" data-target="true" id="rpip014d9e9f314a410e0419" data-parent-id="rpip05346c4120375f0aac53" data-target-for="rpip014d9e9f314a410e0419">static void </span><span class="memItemRight" data-target="true" id="rpipc812fab87fb89dee3d4d" data-parent-id="rpip05346c4120375f0aac53" data-target-for="rpipc812fab87fb89dee3d4d"><a class="el" href="#ga66d09e106e04d70971d4fb6f09d5d949" id="rpip878c7e97bd5d1fa817c4" data-adjusted="true">async_context_deinit</a> (<a class="el" href="structasync__context.html" id="rpip5b8e3c0ab146b8b893ad">async_context_t</a> *context)</span></p>
3636 <li class="memdesc">
3637 <p data-target="true" data-target-for="rpipb918acb2097488bead4f"><span class="mdescLeft" data-target="true" id="rpip893da7b57049424ed1b0" data-parent-id="rpipb918acb2097488bead4f" data-target-for="rpip893da7b57049424ed1b0">Â </span><span class="mdescRight" data-target="true" id="rpipe088168220e96803ddea" data-parent-id="rpipb918acb2097488bead4f" data-target-for="rpipe088168220e96803ddea">End <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip980ec0d67ef12675a333">async_context</a> processing, and free any resources. <br id="rpipf5a4681c636328500ea1"></span></p>
3640 <a name="details" id="details"></a>
3643 <h3 id="rpip79be1e27fbc098900953">
3644 <a class="anchor" href="#rpip79be1e27fbc098900953"></a>Detailed Description</h3>
3645 <p id="rpipfe68a583af0ebdc1f6bb">An <a class="el" href="structasync__context.html" id="rpip957da08ec40242883a00">async_context</a> provides a logically single-threaded context for performing work, and responding to asynchronous events. Thus an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip7dac4a56a1321ba0d1bc">async_context</a> instance is suitable for servicing third-party libraries that are not re-entrant.</p>
3646 <p id="rpipb8c29285f1dca8f1f315">The "context" in <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip6a984f93ba4aa9e7428b">async_context</a> refers to the fact that when calling workers or timeouts within the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipfbeb970065a3a5ed4389">async_context</a> various pre-conditions hold:</p>
3647 <ol id="rpip205e417567e4347ec470">
3648 <li id="rpipe9aeebfdbbbeaff44510"><p>
3649 That there is a single logical thread of execution; i.e. that the context does not call any worker functions concurrently. </p></li>
3650 <li id="rpipf2291d70f8bf900934fc"><p>
3651 That the context always calls workers from the same processor core, as most uses of <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip26ddc67d34a67a1cf53d">async_context</a> rely on interaction with IRQs which are themselves core-specific. </p></li>
3653 <p id="rpip4270e0479706f33c88f5">THe <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip4640463fbb502e5f7c96">async_context</a> provides two mechanisms for asynchronous work:</p>
3654 <div class="ulist" id="rpip14e2110335591577d23b" data-parent-id="rpip1b956b68cc0a41b2d027">
3655 <ul data-target="true" data-target-for="rpip14e2110335591577d23b">
3656 <li id="rpip049db0824da2b5e37813"><p><em id="rpip501796ce481be38abaf8">when_pending</em> workers, which are processed whenever they have work pending. See <a class="el" href="#ga9d42179771bcc8c99124c43dcc7b1350" id="rpip5e1b0f182ab5121ec922" data-adjusted="true">async_context_add_when_pending_worker</a>, <a class="el" href="#ga72b40c2505cd08cb542c3f1759b9e1d5" id="rpipa0cb60ac4019ffb87a94" data-adjusted="true">async_context_remove_when_pending_worker</a>, and <a class="el" href="#ga1ca51536a6f0344cfcbd30bd09fbaec2" id="rpipa6ac9543e9f5fb3776d3" data-adjusted="true">async_context_set_work_pending</a>, the latter of which can be used from an interrupt handler to signal that servicing work is required to be performed by the worker from the regular <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip1500ee24607fbb6f8bac">async_context</a>.</p></li>
3657 <li id="rpipe9d09edc3b3ba32c9974"><p><em id="rpip2d4bee9e5a09fc65aea5">at_time</em> workers, that are executed after at a specific time.</p></li>
3660 <p id="rpipbcd5fabb8aadb0a864c5">Note: "when pending" workers with work pending are executed before "at time" workers.</p>
3661 <p id="rpipbfc700ed8f16f822705f">The <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip9e6a77a97e3beca95f6a">async_context</a> provides locking mechanisms, see <a class="el" href="#ga404d5e6a8ef79159c692dc040f2ded44" id="rpip4f20af90c546e5c77084" data-adjusted="true">async_context_acquire_lock_blocking</a>, <a class="el" href="#gada9eb6dbc0442ba9cbb44a41526f3b9f" id="rpipe8e8a1a87221da6c0929" data-adjusted="true">async_context_release_lock</a> and <a class="el" href="#ga032285b9d1a4aa325813cdbcc1f00a75" id="rpipace3a413398e346b47f5" data-adjusted="true">async_context_lock_check</a> which can be used by external code to ensure execution of external code does not happen concurrently with worker code. Locked code runs on the calling core, however <a class="el" href="#gaa4b239c998978b97eabe2aa2ad659720" id="rpip7c6c9d9e71b5571a590d" data-adjusted="true">async_context_execute_sync</a> is provided to synchronously run a function from the core of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip9b2179e17cae6955f4a2">async_context</a>.</p>
3662 <p id="rpip5154413a8e30616e6f8a">The SDK ships with the following default async_contexts:</p>
3663 <p id="rpip2115bff7e9006619fbba"><a class="el" href="structasync__context__poll.html" id="rpipcf6c6f2ac1929f24193b">async_context_poll</a> - this context is not thread-safe, and the user is responsible for calling <a class="el" href="high_level.html#async_context_poll" id="rpip2a6ad1baa5c32c66e6f8">async_context_poll</a> periodically, and can use <a class="el" href="#ga6207f562c0b69c7a75cd81a783eb1055" title="Block until work needs to be done or the specified time has been reached." id="rpip6c7add934a7b00f777f2" data-adjusted="true">async_context_wait_for_work_until()</a> to sleep between calls until work is needed if the user has nothing else to do.</p>
3664 <p id="rpipadad7aefe3ed2ab5e5c8"><a class="el" href="structasync__context__threadsafe__background.html" id="rpip9a35623aa51f8f949e63">async_context_threadsafe_background</a> - in order to work in the background, a low priority IRQ is used to handle callbacks. Code is usually invoked from this IRQ context, but may be invoked after any other code that uses the async context in another (non-IRQ) context on the same core. Calling <a class="el" href="high_level.html#async_context_poll" id="rpip9fd41a384521f4d459b3">async_context_poll</a> is not required, and is a no-op. This context implements <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbb96e7422384de2e3460">async_context</a> locking and is thus safe to call from either core, according to the specific notes on each API.</p>
3665 <p id="rpipd06f5218c0d05cf04f79"><a class="el" href="structasync__context__freertos.html" id="rpipb9234c68bebb82113354">async_context_freertos</a> - Work is performed from a separate "async_context" task, however once again, code may also be invoked after a direct use of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip7616c23f003f69fb332c">async_context</a> on the same core that the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip22a547953be62ceea759">async_context</a> belongs to. Calling <a class="el" href="high_level.html#async_context_poll" id="rpipfb27557fa2005b44ad1b">async_context_poll</a> is not required, and is a no-op. This context implements <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipe96772fbbe3bd0a0f102">async_context</a> locking and is thus safe to call from any task, and from either core, according to the specific notes on each API.</p>
3666 <p id="rpipe8ca0ea0dc51bdba8e7f">Each <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip090fee37e5860be29a14">async_context</a> provides bespoke methods of instantiation which are provided in the corresponding headers (e.g. <a class="el" href="async__context__poll_8h_source.html" id="rpipc3126f40be3020b71e31">async_context_poll.h</a>, <a class="el" href="async__context__threadsafe__background_8h_source.html" id="rpip679abefbf774a7b7ac24">async_context_threadsafe_background.h</a>, asycn_context_freertos.h). async_contexts are de-initialized by the common async_context_deint() method.</p>
3667 <p id="rpip44f32b1f1fb1ee371bbb">Multiple <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip8edb9c3698be4f94b7e6">async_context</a> instances can be used by a single application, and they will operate independently. </p>
3670 <h3 id="rpipe4818f2317923f615384">
3671 <a class="anchor" href="#rpipe4818f2317923f615384"></a>Typedef Documentation</h3>
3672 <a id="ga74aa4914d98b190d2d4d84d7ff6b469e" name="ga74aa4914d98b190d2d4d84d7ff6b469e"></a>
3674 <h4 id="rpip06f19048246c69c40ead">
3675 <a class="anchor" href="#rpip06f19048246c69c40ead"></a>◆ async_at_time_worker_t</h4>
3676 <div class="memitem" id="rpipf0af2896ec4c7c514948">
3677 <div class="memproto" id="rpip87bac6e6c6807b555c77">
3678 <table class="memname" id="rpipe00d4e5324336b598d28">
3679 <tr id="rpipdbb1e048e8a78d07b836">
3680 <td class="memname" id="rpip7fc5713591263ad1f33a">typedef struct <a class="el" href="structasync__work__on__timeout.html" id="rpip8b78143daa615d8d308d">async_work_on_timeout</a> <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpipe5a0484420c6bbc6c6f5" data-adjusted="true">async_at_time_worker_t</a>
3685 <div class="memdoc" id="rpipe9eff3f21aa2b230aee4">
3687 <p id="rpipb1fecc92a9721881e5df">A "timeout" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipd2dcc2f4c2a1c23ce7db">async_context</a>. </p>
3688 <p id="rpip05920ccf502ca8dc7b7c">A "timeout" represents some future action that must be taken at a specific time. Its methods are called from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipabb9cb8132d7baf268a8">async_context</a> under lock at the given time</p>
3689 <p class="see" id="rpip62c67b41a9057dbaaf40" data-parent-id="rpipe9eff3f21aa2b230aee4" data-target-for="rpip62c67b41a9057dbaaf40"><span class="label" id="rpip914468ed50af606d9b3b" data-parent-id="rpip62c67b41a9057dbaaf40" data-target-for="rpip914468ed50af606d9b3b">See also</span><span class="target" id="rpip7758e20e368e55837513" data-parent-id="rpip62c67b41a9057dbaaf40" data-target-for="rpip7758e20e368e55837513">async_context_add_worker_at </span>
3691 <span class="target" id="rpipfed09ae9b2f5ec43dc36" data-parent-id="rpip62c67b41a9057dbaaf40" data-target-for="rpipfed09ae9b2f5ec43dc36">
3692 async_context_add_worker_in_ms </span></p>
3698 <a id="ga975e8fa20352873b7ac76b06a497eb2b" name="ga975e8fa20352873b7ac76b06a497eb2b"></a>
3701 <h4 id="rpipad403978f7fcb9cceed0">
3702 <a class="anchor" href="#rpipad403978f7fcb9cceed0"></a>◆ async_when_pending_worker_t</h4>
3703 <div class="memitem" id="rpipe42054e108593bd28937">
3704 <div class="memproto" id="rpip1d8a9d63d4250eb6d7b9">
3705 <table class="memname" id="rpipa4d4db6d39250aee63d4">
3706 <tr id="rpip2abd121d99a22e0f8215">
3707 <td class="memname" id="rpipb9f02745d45acb462f78">typedef struct <a class="el" href="structasync__when__pending__worker.html" id="rpipcc03f152468a43e11d87">async_when_pending_worker</a> <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpipe585a2acbc2c2bc84529" data-adjusted="true">async_when_pending_worker_t</a>
3712 <div class="memdoc" id="rpip499c422c16da429dfab9">
3714 <p id="rpip086978416361a5146bae">A "worker" instance used by an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipeed8985e022c1537606f">async_context</a>. </p>
3715 <p id="rpipce7adc4ac87b642ebcf3">A "worker" represents some external entity that must do work in response to some external stimulus (usually an IRQ). Its methods are called from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip23008ffcf6d2117d01aa">async_context</a> under lock at the given time</p>
3716 <p class="see" id="rpip9d5fcb986ba7a45b87a3" data-parent-id="rpip499c422c16da429dfab9" data-target-for="rpip9d5fcb986ba7a45b87a3"><span class="label" id="rpipe46de538666920e1a678" data-parent-id="rpip9d5fcb986ba7a45b87a3" data-target-for="rpipe46de538666920e1a678">See also</span><span class="target" id="rpip1428cae5887d10b4598d" data-parent-id="rpip9d5fcb986ba7a45b87a3" data-target-for="rpip1428cae5887d10b4598d">async_context_add_worker_at </span>
3718 <span class="target" id="rpip8c511fffe10656348cd4" data-parent-id="rpip9d5fcb986ba7a45b87a3" data-target-for="rpip8c511fffe10656348cd4">
3719 async_context_add_worker_in_ms </span></p>
3728 <h3 id="rpip8be6ff2503083d1e44cb">
3729 <a class="anchor" href="#rpip8be6ff2503083d1e44cb"></a>Function Documentation</h3>
3730 <a id="ga404d5e6a8ef79159c692dc040f2ded44" name="ga404d5e6a8ef79159c692dc040f2ded44"></a>
3732 <h4 id="rpipfed29163cca99458427d">
3733 <a class="anchor" href="#rpipfed29163cca99458427d"></a>◆ async_context_acquire_lock_blocking()</h4>
3734 <div class="memitem" id="rpip2c61e6b5fb6baee637e3">
3735 <div class="memproto" id="rpip6c018e39655365723f55">
3736 <table class="mlabels" id="rpip50339a6b9ecb20dccc95">
3737 <tr id="rpipaefc51d5e4b2f142b29c">
3738 <td class="mlabels-left" id="rpipcce27f9d3b31458c2ebb">
3739 <table class="memname" id="rpip680894871ccaaa00669a">
3740 <tr id="rpip7f1e6ca41b39cf83df19">
3741 <td class="memname" id="rpipf00945e41393381fc703">static void async_context_acquire_lock_blocking </td>
3742 <td id="rpipe1b79601c83fa3ec2e5d">(</td>
3743 <td class="paramtype" id="rpip3aab7e357fb6ac5a45fc">
3744 <a class="el" href="structasync__context.html" id="rpip36c5932acf988c71a116">async_context_t</a> *Â </td>
3745 <td class="paramname" id="rpip76fc629dc1d5a33007d0"><em id="rpip64259b773aec2cb76897">context</em></td>
3746 <td id="rpipaa877f635fb2758e0ef0">)</td>
3747 <td id="rpipb6b86bcec23f1b25fa4b"></td>
3751 <td class="mlabels-right" id="rpip980c4fccfd4a8bcadb27">
3752 <span class="mlabels" id="rpip829d389a3e5896d0fbdd"><span class="mlabel" id="rpip95032e13b5390bb60cb5">inline</span><span class="mlabel" id="rpipd3769949525759a47ffb">static</span></span> </td>
3756 <div class="memdoc" id="rpip3c75e8417638ebe6476a">
3758 <p id="rpip8d96a0222a3e2639b6c3">Acquire the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip467ee833c3d09e0f5591">async_context</a> lock. </p>
3759 <p id="rpip5d1ce30779090590075d">The owner of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip65bb4548a766edc145a6">async_context</a> lock is the logic owner of the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip965a53c313c684cf613d">async_context</a> and other work related to this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip497b6e96bfef0c3730c9">async_context</a> will not happen concurrently.</p>
3760 <p id="rpip15ee9f9ca49e026c4614">This method may be called in a nested fashion by the the lock owner.</p>
3761 <div class="admonitionblock note" id="rpip9cb2581e6b9d86c8a18d" data-parent-id="rpip3c75e8417638ebe6476a"><table>
3762 <tr data-target="true" data-target-for="rpip9cb2581e6b9d86c8a18d">
3763 <td class="icon" id="rpipb51ecfe11f6c66fe9ac7" data-parent-id="rpip9cb2581e6b9d86c8a18d"><div class="title" data-target="true" data-target-for="rpipb51ecfe11f6c66fe9ac7">Note</div></td>
3764 <td class="content" id="rpipcbd3e28dbc64d1ff6feb" data-parent-id="rpip9cb2581e6b9d86c8a18d" data-target-for="rpipcbd3e28dbc64d1ff6feb">
3765 <p>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip5da5e0e2a1e359bdd9ff">async_context</a> lock is nestable by the same caller, so an internal count is maintained</p>
3767 for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip4c07b470c434b14f0fac">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip162e77fa9460420eb68f">async_context</a> or from any other non-IRQ context.</p>
3772 <h4 id="rpip4f7dd9b7a3089ffdf026" data-parent-id="rpip921c992acb75b26d9d2a" data-target-for="rpip4f7dd9b7a3089ffdf026">Parameters</h4>
3773 <p class="paragraph" id="rpip4daa11455a3949479701" data-parent-id="rpip921c992acb75b26d9d2a" data-target-for="rpip4daa11455a3949479701">
3775 <table class="params" id="rpip1313342af9de922f72fe">
3776 <tr id="rpip1f43d0cf90a59b857e98">
3777 <td class="paramname" id="rpipcb981acae41459e209ae">context</td>
3778 <td id="rpip7034b572ecf2ff008743">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipf712e8cef7183643e49d">async_context</a>
3785 <p class="see" id="rpip0a7fc8cbaebe94a65f76" data-parent-id="rpip3c75e8417638ebe6476a" data-target-for="rpip0a7fc8cbaebe94a65f76"><span class="label" id="rpipb4747dcbecf1ce2a8cd2" data-parent-id="rpip0a7fc8cbaebe94a65f76" data-target-for="rpipb4747dcbecf1ce2a8cd2">See also</span><span class="target" id="rpip7eba5286fc6ab5e01c64" data-parent-id="rpip0a7fc8cbaebe94a65f76" data-target-for="rpip7eba5286fc6ab5e01c64"><a class="el" href="#gada9eb6dbc0442ba9cbb44a41526f3b9f" title="Release the async_context lock." id="rpip5efd818baca2f71bfd54" data-adjusted="true">async_context_release_lock</a> </span></p>
3791 <a id="gad4ea52957b11c70d908e5af6f0c715ab" name="gad4ea52957b11c70d908e5af6f0c715ab"></a>
3794 <h4 id="rpipa0d836312ac088ba7430">
3795 <a class="anchor" href="#rpipa0d836312ac088ba7430"></a>◆ async_context_add_at_time_worker()</h4>
3796 <div class="memitem" id="rpipf352b542dd0cb080afe7">
3797 <div class="memproto" id="rpip4a99998102b0652ee4cd">
3798 <table class="mlabels" id="rpip99c1ad3896583e728926">
3799 <tr id="rpipedc576963e5f2f2c183e">
3800 <td class="mlabels-left" id="rpip3ee3ab5bdb9ab2f66c2a">
3801 <table class="memname" id="rpip515808cb20bf7643daaa">
3802 <tr id="rpipcd44e18a77301d3ccabf">
3803 <td class="memname" id="rpip7281ed9d595f94730e7f">static bool async_context_add_at_time_worker </td>
3804 <td id="rpipe6929277c3b6812f8658">(</td>
3805 <td class="paramtype" id="rpip8a9aafb42edaaa56c823">
3806 <a class="el" href="structasync__context.html" id="rpip1c7731ee0be89af328e8">async_context_t</a> *Â </td>
3807 <td class="paramname" id="rpipac5c2c852f59291fb0b4">
3808 <em id="rpipc18ef504877599a4239d">context</em>, </td>
3810 <tr id="rpipffe0d1256320ea789d9e">
3811 <td class="paramkey" id="rpipc3e032fb3a0e01d0f5c7"></td>
3812 <td id="rpip892a60cae512030aa7c6"></td>
3813 <td class="paramtype" id="rpip7b0db9df773933942541">
3814 <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpipd6c09679ba86b0ab9dd9" data-adjusted="true">async_at_time_worker_t</a> *Â </td>
3815 <td class="paramname" id="rpip3a7ab0d6452fb96692e4">
3816 <em id="rpipa6504bedab0aa2b60765">worker</em>Â </td>
3818 <tr id="rpip4b5cf221f3f98426872e">
3819 <td id="rpip586cdbb67ac9d0998050"></td>
3820 <td id="rpip60d3ed7c7ef9c5681e2a">)</td>
3821 <td id="rpip0e78bb023af468e9f531"></td>
3822 <td id="rpipb0cbe69c74ffe692d2f0"></td>
3826 <td class="mlabels-right" id="rpip181c16b4a2b07bc5e4c9">
3827 <span class="mlabels" id="rpip776e165b2582c83ac561"><span class="mlabel" id="rpipdf7df7696a5b25a10428">inline</span><span class="mlabel" id="rpipeb43f384715ba6c0d43a">static</span></span> </td>
3831 <div class="memdoc" id="rpip7b20dff779f28c525de0">
3833 <p id="rpipf1afbdff196876fc1367">Add an "at time" worker to a context. </p>
3834 <p id="rpipa995418958ad9aae0df5">An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
3835 <p id="rpipeb10e41c14b1c664ec55">The time to fire is specified in the next_time field of the worker.</p>
3836 <div class="admonitionblock note" id="rpip3c84a9c2f4bb16e30344" data-parent-id="rpip7b20dff779f28c525de0"><table>
3837 <tr data-target="true" data-target-for="rpip3c84a9c2f4bb16e30344">
3838 <td class="icon" id="rpip3e01923b8d4cadbef237" data-parent-id="rpip3c84a9c2f4bb16e30344"><div class="title" data-target="true" data-target-for="rpip3e01923b8d4cadbef237">Note</div></td>
3839 <td class="content" id="rpip767743e26910e30aec88" data-parent-id="rpip3c84a9c2f4bb16e30344" data-target-for="rpip767743e26910e30aec88">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip2fc0deff206cda582325">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip9c9b262c68a9881dc052">async_context</a> or from any other non-IRQ context.</td>
3842 <h4 id="rpipb0f76373b87267bd027e" data-parent-id="rpip10e1a4636a49311c6157" data-target-for="rpipb0f76373b87267bd027e">Parameters</h4>
3843 <p class="paragraph" id="rpip838183599fc418f37bf6" data-parent-id="rpip10e1a4636a49311c6157" data-target-for="rpip838183599fc418f37bf6">
3845 <table class="params" id="rpip5a89d69cbf2f96f531fc">
3846 <tr id="rpip900f80d613dd6b013393">
3847 <td class="paramname" id="rpipc35cf3ab301b726fbe11">context</td>
3848 <td id="rpip15f536688cc3b2b81cf3">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipd7919931944eff71760b">async_context</a> </td>
3850 <tr id="rpip7271e8106e22e3e43047">
3851 <td class="paramname" id="rpip2d029c9c7e69680f1e4d">worker</td>
3852 <td id="rpip44f91ba1d9b937dc341c">the "at time" worker to add </td>
3858 <h4 class="label" id="rpipe2add90305cb0837cc46" data-parent-id="rpip91274db66069c2191785" data-target-for="rpipe2add90305cb0837cc46">Returns</h4>
3859 <p class="returns" id="rpipdda3fa475c548a2b4922" data-parent-id="rpip91274db66069c2191785" data-target-for="rpipdda3fa475c548a2b4922">true if the worker was added, false if the worker was already present. </p>
3863 <a id="ga8ef9fba4dd680a576d94c82b40b10fc3" name="ga8ef9fba4dd680a576d94c82b40b10fc3"></a>
3866 <h4 id="rpip6c5908262984b7d54a1a">
3867 <a class="anchor" href="#rpip6c5908262984b7d54a1a"></a>◆ async_context_add_at_time_worker_at()</h4>
3868 <div class="memitem" id="rpip3dc25ddc55842e97fc1b">
3869 <div class="memproto" id="rpip32145938e5e94d850854">
3870 <table class="mlabels" id="rpip102bf2f28a08ca3c7ee5">
3871 <tr id="rpipec639ad9fc27acf262fb">
3872 <td class="mlabels-left" id="rpip78b950984c85e8c79975">
3873 <table class="memname" id="rpip2fbc4de2e9e5d8aa681a">
3874 <tr id="rpip1c681383698b7cea09d3">
3875 <td class="memname" id="rpip2e9faa298c350327b762">static bool async_context_add_at_time_worker_at </td>
3876 <td id="rpipfa5a8b5d178a86eff98c">(</td>
3877 <td class="paramtype" id="rpipda66a53ef7146e750c07">
3878 <a class="el" href="structasync__context.html" id="rpip7be9b4378c7dfd1a593c">async_context_t</a> *Â </td>
3879 <td class="paramname" id="rpip00d35fc20435317b1f44">
3880 <em id="rpipb9cba665ef91a1b7df31">context</em>, </td>
3882 <tr id="rpip0fe31313d6a7ad10c47b">
3883 <td class="paramkey" id="rpip098c275b5daa1a4fd846"></td>
3884 <td id="rpipba18a81a027c0a8f619c"></td>
3885 <td class="paramtype" id="rpip8090c8d0fb17c46541ae">
3886 <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip76dff32ba838658c04e2" data-adjusted="true">async_at_time_worker_t</a> *Â </td>
3887 <td class="paramname" id="rpip0594fc2d0933652c5920">
3888 <em id="rpip81697f8bf914b7717ab3">worker</em>, </td>
3890 <tr id="rpip70b832dc6937d89aa124">
3891 <td class="paramkey" id="rpipb6fce5eb4f26dd959b7e"></td>
3892 <td id="rpip9c6431052bf54d7dc41c"></td>
3893 <td class="paramtype" id="rpipa5d0d22907cbc2a9633f">
3894 <a class="el" href="structabsolute__time__t.html" id="rpip4e3d77c9c0531376a818">absolute_time_t</a>Â </td>
3895 <td class="paramname" id="rpip76ba949580130a38be63">
3896 <em id="rpipc74fcbc94a5c3d47445f">at</em>Â </td>
3898 <tr id="rpip2f12dcc6b638204e7d4c">
3899 <td id="rpip36eab323d7af71388822"></td>
3900 <td id="rpipb83452ada63fe04f1c25">)</td>
3901 <td id="rpip09a22584667ca32e4ac7"></td>
3902 <td id="rpip33dd799866dec913776d"></td>
3906 <td class="mlabels-right" id="rpipf2cba1fcf469870dd4ab">
3907 <span class="mlabels" id="rpip696676ffc31d62f17365"><span class="mlabel" id="rpip24f5ee8414b4574e28b9">inline</span><span class="mlabel" id="rpip96ff48e59c42f4d809ce">static</span></span> </td>
3911 <div class="memdoc" id="rpipf0b4f36c2f735393fe03">
3913 <p id="rpipe06f6635e6e4614e80ad">Add an "at time" worker to a context. </p>
3914 <p id="rpip9b315bd4bf12f9266002">An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
3915 <p id="rpip34454064eb51673a4d9c">The time to fire is specified by the at parameter.</p>
3916 <div class="admonitionblock note" id="rpipbe28bf44025ef7df5208" data-parent-id="rpipf0b4f36c2f735393fe03"><table>
3917 <tr data-target="true" data-target-for="rpipbe28bf44025ef7df5208">
3918 <td class="icon" id="rpip4e48e1dd52a9cdd3c60e" data-parent-id="rpipbe28bf44025ef7df5208"><div class="title" data-target="true" data-target-for="rpip4e48e1dd52a9cdd3c60e">Note</div></td>
3919 <td class="content" id="rpip26396269d2b142c6240d" data-parent-id="rpipbe28bf44025ef7df5208" data-target-for="rpip26396269d2b142c6240d">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip292f4e889ed34ece2afb">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipe2ec4b1907aeb25763d9">async_context</a> or from any other non-IRQ context.</td>
3922 <h4 id="rpipf3edce3f5d719321865e" data-parent-id="rpip2a48aeda305096bb9d6b" data-target-for="rpipf3edce3f5d719321865e">Parameters</h4>
3923 <p class="paragraph" id="rpipf57336234a236605a7b3" data-parent-id="rpip2a48aeda305096bb9d6b" data-target-for="rpipf57336234a236605a7b3">
3925 <table class="params" id="rpip310b08959cbcf301c7a4">
3926 <tr id="rpip47e2160bed63dc234ef0">
3927 <td class="paramname" id="rpipa5787124df5719ba4da9">context</td>
3928 <td id="rpip16e5733dc59751f9b98f">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip194c27832448bc633c3f">async_context</a> </td>
3930 <tr id="rpipe321627b30a712d9449c">
3931 <td class="paramname" id="rpip0550b2d77710f656f46d">worker</td>
3932 <td id="rpipaa3dc4a33acdf3ba3f06">the "at time" worker to add </td>
3934 <tr id="rpip378daf2d83dc728392a2">
3935 <td class="paramname" id="rpip2841e35bb53f3f5db068">at</td>
3936 <td id="rpipca7a386a677ca19d8276">the time to fire at </td>
3942 <h4 class="label" id="rpip223270955e16cb195a63" data-parent-id="rpip10eb19fe8eafdb80778f" data-target-for="rpip223270955e16cb195a63">Returns</h4>
3943 <p class="returns" id="rpipd660803cc547d416e497" data-parent-id="rpip10eb19fe8eafdb80778f" data-target-for="rpipd660803cc547d416e497">true if the worker was added, false if the worker was already present. </p>
3947 <a id="gae0792d86734a6e30b2f043b8eba42438" name="gae0792d86734a6e30b2f043b8eba42438"></a>
3950 <h4 id="rpip2f6119f8f60397d59954">
3951 <a class="anchor" href="#rpip2f6119f8f60397d59954"></a>◆ async_context_add_at_time_worker_in_ms()</h4>
3952 <div class="memitem" id="rpip7d1af3475090a58bd799">
3953 <div class="memproto" id="rpip0d6c18a2befdf411d2f5">
3954 <table class="mlabels" id="rpipd816bec4ef41907247bb">
3955 <tr id="rpip1e8b9b434af6ab1878fe">
3956 <td class="mlabels-left" id="rpipd2db2c9c5d4710fac8b2">
3957 <table class="memname" id="rpip4e35d59ef304a22a220c">
3958 <tr id="rpip544703ecde1b1594d7fb">
3959 <td class="memname" id="rpip35c478dc432861c7be27">static bool async_context_add_at_time_worker_in_ms </td>
3960 <td id="rpip4cc8e6c43188834d1116">(</td>
3961 <td class="paramtype" id="rpip3be485ec7a6ca0589e32">
3962 <a class="el" href="structasync__context.html" id="rpipf2395585c826e7f59948">async_context_t</a> *Â </td>
3963 <td class="paramname" id="rpipaaaaa5eb54bfdd2f4b4e">
3964 <em id="rpip3dabf02830b330d1eb6d">context</em>, </td>
3966 <tr id="rpipa3a21592847430a6c374">
3967 <td class="paramkey" id="rpipc9d3df79513176a5a754"></td>
3968 <td id="rpip0ad35ca9423ecf4f6cb3"></td>
3969 <td class="paramtype" id="rpipd84c4a2f00db6d0f50b4">
3970 <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip61770fc69f9798e35491" data-adjusted="true">async_at_time_worker_t</a> *Â </td>
3971 <td class="paramname" id="rpipe679961c00187ba8de62">
3972 <em id="rpip4504ec163f85db61dd67">worker</em>, </td>
3974 <tr id="rpip52ecd470b7f5c66c87ea">
3975 <td class="paramkey" id="rpipd8569ff737ba0ce0c48a"></td>
3976 <td id="rpipd6eb3740c375e195064c"></td>
3977 <td class="paramtype" id="rpipc99c0bf35f3e798df3e4">uint32_t </td>
3978 <td class="paramname" id="rpip01ac951ac84dc819c401">
3979 <em id="rpip7730857110393ac61e33">ms</em>Â </td>
3981 <tr id="rpipa58bde36c420f82e5dd3">
3982 <td id="rpipbe484fdd73d881d3d65a"></td>
3983 <td id="rpip0ec6995769baf1347308">)</td>
3984 <td id="rpip5a95071120b5a7228812"></td>
3985 <td id="rpip2aeacd72eb4efa4a767f"></td>
3989 <td class="mlabels-right" id="rpipd0a22f3f1cc0fb473db9">
3990 <span class="mlabels" id="rpipbd80c249b47ffb38a91e"><span class="mlabel" id="rpipbdf987af77533b6da826">inline</span><span class="mlabel" id="rpipd1dabeb8a829b47245b6">static</span></span> </td>
3994 <div class="memdoc" id="rpip29cb2b711fcf6b6e63c0">
3996 <p id="rpip52961b78409cbeee26e6">Add an "at time" worker to a context. </p>
3997 <p id="rpipfc19d29fe56aa0bc5205">An "at time" worker will run at or after a specific point in time, and is automatically when (just before) it runs.</p>
3998 <p id="rpip5c518954d4b5e27cf207">The time to fire is specified by a delay via the ms parameter</p>
3999 <div class="admonitionblock note" id="rpip0564fd02e51fa1eba73f" data-parent-id="rpip29cb2b711fcf6b6e63c0"><table>
4000 <tr data-target="true" data-target-for="rpip0564fd02e51fa1eba73f">
4001 <td class="icon" id="rpip2812cbf61e7e8ceaafc8" data-parent-id="rpip0564fd02e51fa1eba73f"><div class="title" data-target="true" data-target-for="rpip2812cbf61e7e8ceaafc8">Note</div></td>
4002 <td class="content" id="rpip192a2862f81bf53b0e1b" data-parent-id="rpip0564fd02e51fa1eba73f" data-target-for="rpip192a2862f81bf53b0e1b">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip9d650c77f793755a725e">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbfe6bfc59713da71dbe6">async_context</a> or from any other non-IRQ context.</td>
4005 <h4 id="rpipfa6b7c6ca670c8d3c6c6" data-parent-id="rpip50588d40f8a7786cf32c" data-target-for="rpipfa6b7c6ca670c8d3c6c6">Parameters</h4>
4006 <p class="paragraph" id="rpipe25f90dd52e06c2d80ba" data-parent-id="rpip50588d40f8a7786cf32c" data-target-for="rpipe25f90dd52e06c2d80ba">
4008 <table class="params" id="rpip66c987989c91429fa740">
4009 <tr id="rpip0e62c9b9637a1e09cca9">
4010 <td class="paramname" id="rpip631891b0d7a94e38ad1e">context</td>
4011 <td id="rpip7966e73fcb5359f67b37">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipff0409041dd5bd37d3c8">async_context</a> </td>
4013 <tr id="rpipc1327404d410daaed968">
4014 <td class="paramname" id="rpip482da1763eb9f6786351">worker</td>
4015 <td id="rpipb83c68d68fdd7cc6e3b7">the "at time" worker to add </td>
4017 <tr id="rpip5476baad3d48c063a91b">
4018 <td class="paramname" id="rpip0a4e7ec7a61b1e04cc31">ms</td>
4019 <td id="rpip20573284bd96d640ca47">the number of milliseconds from now to fire after </td>
4025 <h4 class="label" id="rpip63c5e75fdccf36a7844d" data-parent-id="rpip8c73e3dc66fa6b650632" data-target-for="rpip63c5e75fdccf36a7844d">Returns</h4>
4026 <p class="returns" id="rpip091654da6f284f325880" data-parent-id="rpip8c73e3dc66fa6b650632" data-target-for="rpip091654da6f284f325880">true if the worker was added, false if the worker was already present. </p>
4030 <a id="ga9d42179771bcc8c99124c43dcc7b1350" name="ga9d42179771bcc8c99124c43dcc7b1350"></a>
4033 <h4 id="rpipbae6dffa0c65608317e9">
4034 <a class="anchor" href="#rpipbae6dffa0c65608317e9"></a>◆ async_context_add_when_pending_worker()</h4>
4035 <div class="memitem" id="rpipab1a2ffe7bb7ea520506">
4036 <div class="memproto" id="rpip7b38bb3c2053b58b91d1">
4037 <table class="mlabels" id="rpip3c81451c72fea3c69ea4">
4038 <tr id="rpipfe1a84147df6be2a89b7">
4039 <td class="mlabels-left" id="rpipabbb35c569470d20b057">
4040 <table class="memname" id="rpip6c6fd62cf04e0fe936ac">
4041 <tr id="rpip983c360872b2f0d1d346">
4042 <td class="memname" id="rpipdfed33093319122694bf">static bool async_context_add_when_pending_worker </td>
4043 <td id="rpip29082f4038794c327ecd">(</td>
4044 <td class="paramtype" id="rpip89af2d48544532e4df04">
4045 <a class="el" href="structasync__context.html" id="rpip7e7eb9e97942bfa3bbf6">async_context_t</a> *Â </td>
4046 <td class="paramname" id="rpip52467e16a2842331cab3">
4047 <em id="rpip8a234f41b6d25628caf0">context</em>, </td>
4049 <tr id="rpipa829251b514f9cda8998">
4050 <td class="paramkey" id="rpipefc1551919084ae6d34b"></td>
4051 <td id="rpipb6d4f043260dbce01110"></td>
4052 <td class="paramtype" id="rpipb894bcbac8c9a9936acd">
4053 <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpip7429920581fcd21635c5" data-adjusted="true">async_when_pending_worker_t</a> *Â </td>
4054 <td class="paramname" id="rpip6a4ba15a08c6ab1b2797">
4055 <em id="rpip427816dabf28afb076ca">worker</em>Â </td>
4057 <tr id="rpip45cac13964b92dae63f9">
4058 <td id="rpipe3608affcabe83894947"></td>
4059 <td id="rpip24fcab622b9ce8684ab3">)</td>
4060 <td id="rpip6e05181296d744639ef1"></td>
4061 <td id="rpip017e762ae24db30ca9aa"></td>
4065 <td class="mlabels-right" id="rpip0e70702aad8f3a44cba7">
4066 <span class="mlabels" id="rpipac884fa8f262bda4090a"><span class="mlabel" id="rpip10b8c324ac1ea7dd3c01">inline</span><span class="mlabel" id="rpip415a4e2f5acac3e5c3a1">static</span></span> </td>
4070 <div class="memdoc" id="rpip81f3cf279721efef2197">
4072 <p id="rpipbfc3a11cb37a485fa26a">Add a "when pending" worker to a context. </p>
4073 <p id="rpip399a1eb6f47cf312d497">An "when pending" worker will run when it is pending (can be set via <a class="el" href="#ga1ca51536a6f0344cfcbd30bd09fbaec2" id="rpip13edeb87834f708f93eb" data-adjusted="true">async_context_set_work_pending</a>), and is NOT automatically removed when it runs.</p>
4074 <p id="rpip770e284db75a7e5b7926">The time to fire is specified by a delay via the ms parameter</p>
4075 <div class="admonitionblock note" id="rpipb11059a4be43d27b3d99" data-parent-id="rpip81f3cf279721efef2197"><table>
4076 <tr data-target="true" data-target-for="rpipb11059a4be43d27b3d99">
4077 <td class="icon" id="rpip0793d7b0626bf17bfa13" data-parent-id="rpipb11059a4be43d27b3d99"><div class="title" data-target="true" data-target-for="rpip0793d7b0626bf17bfa13">Note</div></td>
4078 <td class="content" id="rpipe3fcf2d8e11796580587" data-parent-id="rpipb11059a4be43d27b3d99" data-target-for="rpipe3fcf2d8e11796580587">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpipcb39aab4d1293aac9894">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbca1e3c3392837e87989">async_context</a> or from any other non-IRQ context.</td>
4081 <h4 id="rpip9c58091f372f6e338e22" data-parent-id="rpipbc0c8adf09b527e209b9" data-target-for="rpip9c58091f372f6e338e22">Parameters</h4>
4082 <p class="paragraph" id="rpip8d97a9bc92d005a9f606" data-parent-id="rpipbc0c8adf09b527e209b9" data-target-for="rpip8d97a9bc92d005a9f606">
4084 <table class="params" id="rpip320528be3027e37620e0">
4085 <tr id="rpip9836a1f097106e5148c6">
4086 <td class="paramname" id="rpip4c6a964910f548b987c9">context</td>
4087 <td id="rpipe9d16354246d91d9a734">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip8eb1b06af068d3b49830">async_context</a> </td>
4089 <tr id="rpip3db94c6a50eceedf6f39">
4090 <td class="paramname" id="rpipd6981fd2cfda9cb75445">worker</td>
4091 <td id="rpip6fb969e24862f9becd6d">the "when pending" worker to add </td>
4097 <h4 class="label" id="rpipf5171eb65af6acf0a078" data-parent-id="rpipd341477f666dd179dd77" data-target-for="rpipf5171eb65af6acf0a078">Returns</h4>
4098 <p class="returns" id="rpip857f606776b8923a65e0" data-parent-id="rpipd341477f666dd179dd77" data-target-for="rpip857f606776b8923a65e0">true if the worker was added, false if the worker was already present. </p>
4102 <a id="ga604afdcf2e76f1bf99df469edfadf7eb" name="ga604afdcf2e76f1bf99df469edfadf7eb"></a>
4105 <h4 id="rpip4be8c3a3f83a46470520">
4106 <a class="anchor" href="#rpip4be8c3a3f83a46470520"></a>◆ async_context_core_num()</h4>
4107 <div class="memitem" id="rpip8e8164b45c5276c28d89">
4108 <div class="memproto" id="rpipd90be814762d833abe8d">
4109 <table class="mlabels" id="rpip827d83855e96c2e0981d">
4110 <tr id="rpipb9ec921a81e9be7df196">
4111 <td class="mlabels-left" id="rpip9de988c2956402320d0e">
4112 <table class="memname" id="rpip9495a5cba22b2f62972a">
4113 <tr id="rpipabc9ac8c728b295a08b4">
4114 <td class="memname" id="rpipe826f0d66aa7cdb788e8">static uint async_context_core_num </td>
4115 <td id="rpipedbbb15f25728fb80112">(</td>
4116 <td class="paramtype" id="rpipfb52ab20a9b78e2aa49e">const <a class="el" href="structasync__context.html" id="rpipec35cad54ebdaaa1e2e5">async_context_t</a> *Â </td>
4117 <td class="paramname" id="rpip8657a6a4265467010a16"><em id="rpip391bee2ee2cd493d51ea">context</em></td>
4118 <td id="rpip94fb032da082541fd3c8">)</td>
4119 <td id="rpip3fa488878f218e6f1243"></td>
4123 <td class="mlabels-right" id="rpip2ad21f598d41d58c3d37">
4124 <span class="mlabels" id="rpip67aecb2dbf73f1070498"><span class="mlabel" id="rpipf814d6b9756f164272ec">inline</span><span class="mlabel" id="rpip2aa00c9453ca373caa80">static</span></span> </td>
4128 <div class="memdoc" id="rpip6ae985713a7c2f3e2866">
4130 <p id="rpip1d0809447a22ab95911f">Return the processor core this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip881b51dcfc2368f1fbb4">async_context</a> belongs to. </p>
4131 <h4 id="rpipe9b8531745e06308dddb" data-parent-id="rpip9e5a280e1970fe01aeca" data-target-for="rpipe9b8531745e06308dddb">Parameters</h4>
4132 <p class="paragraph" id="rpip4697388a93ddcca91959" data-parent-id="rpip9e5a280e1970fe01aeca" data-target-for="rpip4697388a93ddcca91959">
4134 <table class="params" id="rpip1c351762d94e9521313d">
4135 <tr id="rpipb5e89482be922a24d5e1">
4136 <td class="paramname" id="rpip608227d492b9dd592932">context</td>
4137 <td id="rpip0c0233836a1456be1351">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipb998bae12e1bbd7741f3">async_context</a> </td>
4143 <h4 class="label" id="rpip5d545ec16e2771ab2ea3" data-parent-id="rpipe53004f1e359bdbe12dc" data-target-for="rpip5d545ec16e2771ab2ea3">Returns</h4>
4144 <p class="returns" id="rpip9a27a71c676945bddda5" data-parent-id="rpipe53004f1e359bdbe12dc" data-target-for="rpip9a27a71c676945bddda5">the physical core number </p>
4148 <a id="ga66d09e106e04d70971d4fb6f09d5d949" name="ga66d09e106e04d70971d4fb6f09d5d949"></a>
4151 <h4 id="rpipf6e58c274e9945353c4a">
4152 <a class="anchor" href="#rpipf6e58c274e9945353c4a"></a>◆ async_context_deinit()</h4>
4153 <div class="memitem" id="rpipf42bd01e907cceccba9d">
4154 <div class="memproto" id="rpip5d76b7490d1a8a0345cf">
4155 <table class="mlabels" id="rpipff9c1f71fdbe297be474">
4156 <tr id="rpipe4d921b49f4b2b44fd33">
4157 <td class="mlabels-left" id="rpipd8ab2ceebca601a6e418">
4158 <table class="memname" id="rpipc1afb4ee263b5fc545e5">
4159 <tr id="rpipf9768f65c2d5ed8b193e">
4160 <td class="memname" id="rpipb66ecb10330d555645a5">static void async_context_deinit </td>
4161 <td id="rpipa4a47b9ac53974bf7fea">(</td>
4162 <td class="paramtype" id="rpipeccb7e6a145ca95458cf">
4163 <a class="el" href="structasync__context.html" id="rpip2ec4496fb8c4a0e05501">async_context_t</a> *Â </td>
4164 <td class="paramname" id="rpip0baeb39962a343e293df"><em id="rpip99b23a182852bdfe033f">context</em></td>
4165 <td id="rpipebeda4d53ed25201904c">)</td>
4166 <td id="rpipd8d68c74fcf3ace53476"></td>
4170 <td class="mlabels-right" id="rpipa2de9fbf319901eedc64">
4171 <span class="mlabels" id="rpip45dcdbb82e41d370e2dd"><span class="mlabel" id="rpipbe7111bd8e7b474a61a5">inline</span><span class="mlabel" id="rpip7fc74b0503759ed8fd11">static</span></span> </td>
4175 <div class="memdoc" id="rpip21c413a648e704b05a2b">
4177 <p id="rpipe8b2c271a265aaca11e6">End <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip0d554519e1a8435fda18">async_context</a> processing, and free any resources. </p>
4178 <p id="rpip93698ff293cc35b8b1aa">Note the user should clean up any resources associated with workers in the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipc6425a6a2ca84523cf36">async_context</a> themselves.</p>
4179 <p id="rpipb6bdf8856a54a4938406">Asynchronous (non-polled) async_contexts guarantee that no callback is being called once this method returns.</p>
4180 <h4 id="rpip4b799ad498ed0e6fbfc8" data-parent-id="rpipb0bd2ddff7ad01b732d5" data-target-for="rpip4b799ad498ed0e6fbfc8">Parameters</h4>
4181 <p class="paragraph" id="rpip3991c1c0b71e146793c2" data-parent-id="rpipb0bd2ddff7ad01b732d5" data-target-for="rpip3991c1c0b71e146793c2">
4183 <table class="params" id="rpip8b1d4e520911a3c7dbc1">
4184 <tr id="rpipf3091a7b1e1cb208e290">
4185 <td class="paramname" id="rpip9a5dcf0da19408317ce1">context</td>
4186 <td id="rpip1ff7ce5ffb1e11f817c8">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipf61bfe4eca06f6f4f27b">async_context</a> </td>
4195 <a id="gaa4b239c998978b97eabe2aa2ad659720" name="gaa4b239c998978b97eabe2aa2ad659720"></a>
4198 <h4 id="rpip13acbb32c251b59bf23c">
4199 <a class="anchor" href="#rpip13acbb32c251b59bf23c"></a>◆ async_context_execute_sync()</h4>
4200 <div class="memitem" id="rpip65cc9dca5db2298b1eb3">
4201 <div class="memproto" id="rpip70983de0371b83949d65">
4202 <table class="mlabels" id="rpipa799f081f006b6a0822a">
4203 <tr id="rpip7d545ae04143d037d768">
4204 <td class="mlabels-left" id="rpip9d9cc8ffd73912450a01">
4205 <table class="memname" id="rpipc17e022b71bd8782ef74">
4206 <tr id="rpip56e1746e69fccb8ef7f7">
4207 <td class="memname" id="rpip2c9c26a0659de5371f38">static uint32_t async_context_execute_sync </td>
4208 <td id="rpipbc217ba2494ba8566c4e">(</td>
4209 <td class="paramtype" id="rpipda841790f98cccf33cde">
4210 <a class="el" href="structasync__context.html" id="rpip36dfbe87dd492a22963c">async_context_t</a> *Â </td>
4211 <td class="paramname" id="rpip565a820deaa6df366760">
4212 <em id="rpip7ab6da870ed7b3581a8e">context</em>, </td>
4214 <tr id="rpip2bd8bf5bc1654932bf10">
4215 <td class="paramkey" id="rpipded7967b342578aea04c"></td>
4216 <td id="rpipdbc76927de42b8679760"></td>
4217 <td class="paramtype" id="rpip4cad60d71ea28e384d61">uint32_t(*)(void *param)Â </td>
4218 <td class="paramname" id="rpip9569d799fa78766e5167">
4219 <em id="rpipa95258ab7a1b8ffbffb4">func</em>, </td>
4221 <tr id="rpipf61286f127e48f4ad1e4">
4222 <td class="paramkey" id="rpipd5650c4a562c483cb37e"></td>
4223 <td id="rpip1564a2b913730ca373e8"></td>
4224 <td class="paramtype" id="rpip9c0c31ec30eb8281bf07">void *Â </td>
4225 <td class="paramname" id="rpipf1953e5c88a7917e8880">
4226 <em id="rpipa8dc8e1d0d6b8bb66301">param</em>Â </td>
4228 <tr id="rpipfaa3f47876cd4cfd2427">
4229 <td id="rpip2295100c8e3183e04e60"></td>
4230 <td id="rpipf2d46ced398f2300187d">)</td>
4231 <td id="rpipbfbe3286875e63e60061"></td>
4232 <td id="rpip9759118c26cd44e20944"></td>
4236 <td class="mlabels-right" id="rpipd1d7b3c4cc492747d2fb">
4237 <span class="mlabels" id="rpipca67b906e51b8b5295d9"><span class="mlabel" id="rpipfcd5aa175845884670b3">inline</span><span class="mlabel" id="rpip13ff57763110ee9447bf">static</span></span> </td>
4241 <div class="memdoc" id="rpipbc0a143fa68387a67705">
4243 <p id="rpip3a331a6773487074a77f">Execute work synchronously on the core the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip818e55f8dc1744066e8e">async_context</a> belongs to. </p>
4244 <p id="rpipdf864036616a02ae9cab">This method is intended for code external to the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbdfbd7dc78cb2eb882be">async_context</a> (e.g. another thread/task) to execute a function with the same guarantees (single core, logical thread of execution) that <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip292fc2881f9430f6c8b2">async_context</a> workers are called with.</p>
4245 <div class="admonitionblock note" id="rpipc615675a18ec43723b1d" data-parent-id="rpipbc0a143fa68387a67705"><table>
4246 <tr data-target="true" data-target-for="rpipc615675a18ec43723b1d">
4247 <td class="icon" id="rpipd4c248ee3ff7de2ba726" data-parent-id="rpipc615675a18ec43723b1d"><div class="title" data-target="true" data-target-for="rpipd4c248ee3ff7de2ba726">Note</div></td>
4248 <td class="content" id="rpip2c2e5ff67d3fd9738629" data-parent-id="rpipc615675a18ec43723b1d" data-target-for="rpip2c2e5ff67d3fd9738629">you should NOT call this method while holding the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip744463a50625e6a4502e">async_context</a>'s lock</td>
4251 <h4 id="rpip7b215a3c82bf823e942b" data-parent-id="rpipe9187c5c62d5a29ccc4d" data-target-for="rpip7b215a3c82bf823e942b">Parameters</h4>
4252 <p class="paragraph" id="rpip24dd264d808f06c56c48" data-parent-id="rpipe9187c5c62d5a29ccc4d" data-target-for="rpip24dd264d808f06c56c48">
4254 <table class="params" id="rpip7c212fb431382eb71797">
4255 <tr id="rpipe73a4d80558fd839f13d">
4256 <td class="paramname" id="rpip2f13661f4ed4afd3e45f">context</td>
4257 <td id="rpipcaa22ef0fac0b468c5f4">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip79881aaff037833eea6b">async_context</a> </td>
4259 <tr id="rpipf166ff7a4f4d33a4a66f">
4260 <td class="paramname" id="rpip7b7192d4b743e117ba7f">func</td>
4261 <td id="rpip1a846c569170a7fcb93c">the function to call </td>
4263 <tr id="rpip5776c8dd9efa041c9c4f">
4264 <td class="paramname" id="rpip7ea0f93c357b94ebcfd5">param</td>
4265 <td id="rpip274673ce72a4c7574304">the paramter to pass to the function </td>
4271 <h4 class="label" id="rpipe4046767e1f959a4d0fa" data-parent-id="rpip2b204ac6d412f3cf8642" data-target-for="rpipe4046767e1f959a4d0fa">Returns</h4>
4272 <p class="returns" id="rpipe669de03ed03c2790336" data-parent-id="rpip2b204ac6d412f3cf8642" data-target-for="rpipe669de03ed03c2790336">the return value from func </p>
4276 <a id="ga032285b9d1a4aa325813cdbcc1f00a75" name="ga032285b9d1a4aa325813cdbcc1f00a75"></a>
4279 <h4 id="rpip250869a37ff50ac1fb91">
4280 <a class="anchor" href="#rpip250869a37ff50ac1fb91"></a>◆ async_context_lock_check()</h4>
4281 <div class="memitem" id="rpipd9a67854f6c652ae8877">
4282 <div class="memproto" id="rpip041c07cccd817fc9ff02">
4283 <table class="mlabels" id="rpipfaab335448ba740f255c">
4284 <tr id="rpip2e42daf4b7d91d67bcf6">
4285 <td class="mlabels-left" id="rpip15afe8ee2cceb479f67a">
4286 <table class="memname" id="rpipd1d684e26bd4b6605aba">
4287 <tr id="rpip6dec530d4ac62f5c2cb2">
4288 <td class="memname" id="rpipfd9878d1d70b2c7417d9">static void async_context_lock_check </td>
4289 <td id="rpipdd84f99e9f71fe0ad74c">(</td>
4290 <td class="paramtype" id="rpip33dc0e0c214b35fabfe4">
4291 <a class="el" href="structasync__context.html" id="rpip09babef47c29b8c966eb">async_context_t</a> *Â </td>
4292 <td class="paramname" id="rpip19abe7720c2fe272f4db"><em id="rpip14b4208b612702cf745f">context</em></td>
4293 <td id="rpip2a2c13de2d1d64e3e337">)</td>
4294 <td id="rpip9880b126f4ef2010a3d2"></td>
4298 <td class="mlabels-right" id="rpipf9a2ad1225ddbba86587">
4299 <span class="mlabels" id="rpipdfa03d8763894973e597"><span class="mlabel" id="rpip250bfa9e859df7844d53">inline</span><span class="mlabel" id="rpip5a2f376aaa4613189c56">static</span></span> </td>
4303 <div class="memdoc" id="rpip3677ba90aeefb4fd64ea">
4305 <p id="rpip58f9c4570de289658283">Assert if the caller does not own the lock for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip8cb0256f5140d922c05c">async_context</a>. </p>
4306 <div class="admonitionblock note" id="rpip46c7207e842d540823f7" data-parent-id="rpip3677ba90aeefb4fd64ea"><table>
4307 <tr data-target="true" data-target-for="rpip46c7207e842d540823f7">
4308 <td class="icon" id="rpipc51c83e3adafce653f4e" data-parent-id="rpip46c7207e842d540823f7"><div class="title" data-target="true" data-target-for="rpipc51c83e3adafce653f4e">Note</div></td>
4309 <td class="content" id="rpip0895674117b7dc07a13f" data-parent-id="rpip46c7207e842d540823f7" data-target-for="rpip0895674117b7dc07a13f">this method is thread-safe</td>
4312 <h4 id="rpip388d308daa7839d6b25e" data-parent-id="rpip59303aab59c891b4f2f4" data-target-for="rpip388d308daa7839d6b25e">Parameters</h4>
4313 <p class="paragraph" id="rpip9ac31ae6a3dc492fc089" data-parent-id="rpip59303aab59c891b4f2f4" data-target-for="rpip9ac31ae6a3dc492fc089">
4315 <table class="params" id="rpip6b47f878a8b4ec89dd9d">
4316 <tr id="rpip841d9a31cdd1067856d3">
4317 <td class="paramname" id="rpip647a45ab13c65eb3c09e">context</td>
4318 <td id="rpip274cacc7952a4bbe25a9">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip02a3afcbca5ba3f150b7">async_context</a> </td>
4327 <a id="gafdb322c3f1043265624988215d3a8df9" name="gafdb322c3f1043265624988215d3a8df9"></a>
4330 <h4 id="rpip0e4a542f722357a888b4">
4331 <a class="anchor" href="#rpip0e4a542f722357a888b4"></a>◆ async_context_poll()</h4>
4332 <div class="memitem" id="rpip6a8c12d585fb90e0ae62">
4333 <div class="memproto" id="rpipfde5393ae6643b4c74e9">
4334 <table class="mlabels" id="rpip8e8c8817ade584482b95">
4335 <tr id="rpip556f50b59b404fdf1d7a">
4336 <td class="mlabels-left" id="rpip3d102601461826ccd193">
4337 <table class="memname" id="rpip7cc37a67a0101a799d36">
4338 <tr id="rpip2daa47510c0a6c4b29c0">
4339 <td class="memname" id="rpipdb677b1aeb77622879ef">static void <a class="el" href="structasync__context__poll.html" id="rpip8820412033bedde03499">async_context_poll</a> </td>
4340 <td id="rpip086fc2f22cabac64141d">(</td>
4341 <td class="paramtype" id="rpipfe20678144c9b5cf3540">
4342 <a class="el" href="structasync__context.html" id="rpipe782d4931a0f28301367">async_context_t</a> *Â </td>
4343 <td class="paramname" id="rpipc6419e8b368afd986b55"><em id="rpip4b1fc26c72d884572f81">context</em></td>
4344 <td id="rpip5f5a3951228305a20fcf">)</td>
4345 <td id="rpip0727846dff2271ef290c"></td>
4349 <td class="mlabels-right" id="rpip3254bad6c758b48ec6d9">
4350 <span class="mlabels" id="rpip747c35ceeff8f69f2acf"><span class="mlabel" id="rpip1990668c12d1417cb466">inline</span><span class="mlabel" id="rpipef5a220f625a957a40b1">static</span></span> </td>
4354 <div class="memdoc" id="rpipb0bd4af7ee88c872bd6e">
4356 <p id="rpip5656eebd10fbf97a57a5">Perform any pending work for polling style <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpiped19b85d4247754f6fdc">async_context</a>. </p>
4357 <p id="rpipc0378991cc178f8ba2a3">For a polled <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip65812558b4abbc934fb8">async_context</a> (e.g. <a class="el" href="high_level.html#async_context_poll" id="rpip57421d0699f9a7a9d532">async_context_poll</a>) the user is responsible for calling this method periodically to perform any required work.</p>
4358 <p id="rpipda37c258b06c7c9c70c7">This method may immediately perform outstanding work on other context types, but is not required to.</p>
4359 <h4 id="rpip99e665f1defb91e9f1aa" data-parent-id="rpip18ab0051015c039f16a1" data-target-for="rpip99e665f1defb91e9f1aa">Parameters</h4>
4360 <p class="paragraph" id="rpipc47d4cfa7688d171e070" data-parent-id="rpip18ab0051015c039f16a1" data-target-for="rpipc47d4cfa7688d171e070">
4362 <table class="params" id="rpipfcf557eb98065ace85c0">
4363 <tr id="rpip28bccd786661eb58ee06">
4364 <td class="paramname" id="rpip2da2401f2b1c1fe17a98">context</td>
4365 <td id="rpip9903f1f800a453bd79cb">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbaf1a0d1f0cfe4e8c5dc">async_context</a> </td>
4374 <a id="gada9eb6dbc0442ba9cbb44a41526f3b9f" name="gada9eb6dbc0442ba9cbb44a41526f3b9f"></a>
4377 <h4 id="rpipf38dbc1e01e406973ff8">
4378 <a class="anchor" href="#rpipf38dbc1e01e406973ff8"></a>◆ async_context_release_lock()</h4>
4379 <div class="memitem" id="rpip08a01c9c6080d03c9f4b">
4380 <div class="memproto" id="rpip0a45d3a8704618ad0520">
4381 <table class="mlabels" id="rpipfd34fd10609837b30289">
4382 <tr id="rpipa279b27c97ac6fb4982c">
4383 <td class="mlabels-left" id="rpip7c38d1663a6f76775fe1">
4384 <table class="memname" id="rpipaceae83d840a4267e0bd">
4385 <tr id="rpip26f3acb8a96649251bb9">
4386 <td class="memname" id="rpip817b19852ae3a1428f1b">static void async_context_release_lock </td>
4387 <td id="rpipffd65a4eddb6148db1b7">(</td>
4388 <td class="paramtype" id="rpip1ba3c0779c6be0bb828d">
4389 <a class="el" href="structasync__context.html" id="rpip0b2c1a877e30aee298e0">async_context_t</a> *Â </td>
4390 <td class="paramname" id="rpip0fc369ed7f22c333b1ad"><em id="rpip3f5dd4d763432021b688">context</em></td>
4391 <td id="rpipc4078691cb3e25005bcb">)</td>
4392 <td id="rpip33adc9c3bce688141ad0"></td>
4396 <td class="mlabels-right" id="rpipb36cdbe4cc8b976f3d77">
4397 <span class="mlabels" id="rpipadacdf4b21937f6a0d45"><span class="mlabel" id="rpipaac1f97ee184d52e19ee">inline</span><span class="mlabel" id="rpip4f6bceaa00468f77f517">static</span></span> </td>
4401 <div class="memdoc" id="rpip046a6f30c511639b899e">
4403 <p id="rpipe03521a92e766925f1b0">Release the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip705241d560781ac53a7f">async_context</a> lock. </p>
4404 <div class="admonitionblock note" id="rpipbb1170288938dd1644e9" data-parent-id="rpip046a6f30c511639b899e"><table>
4405 <tr data-target="true" data-target-for="rpipbb1170288938dd1644e9">
4406 <td class="icon" id="rpip0ca18ce9ac441b3080b2" data-parent-id="rpipbb1170288938dd1644e9"><div class="title" data-target="true" data-target-for="rpip0ca18ce9ac441b3080b2">Note</div></td>
4407 <td class="content" id="rpipa29774280591d3998dfb" data-parent-id="rpipbb1170288938dd1644e9" data-target-for="rpipa29774280591d3998dfb">
4408 <p>the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipbadd494d8ff1f5a94fc8">async_context</a> lock may be called in a nested fashion, so an internal count is maintained. On the outermost release, When the outermost lock is released, a check is made for work which might have been skipped while the lock was held, and any such work may be performed during this call IF the call is made from the same core that the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip1e0eb714407f3b5639a7">async_context</a> belongs to.</p>
4410 for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpipde7932d5acaf188f9481">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip635da67f890f11fdcc92">async_context</a> or from any other non-IRQ context.</p>
4415 <h4 id="rpip0dc16811d7ef2ca048c2" data-parent-id="rpip0a7b2fc675a2b2f9517d" data-target-for="rpip0dc16811d7ef2ca048c2">Parameters</h4>
4416 <p class="paragraph" id="rpipc355bee8a6701090a11f" data-parent-id="rpip0a7b2fc675a2b2f9517d" data-target-for="rpipc355bee8a6701090a11f">
4418 <table class="params" id="rpipdda79b23d8b66dc12018">
4419 <tr id="rpip040b3279694a200848b1">
4420 <td class="paramname" id="rpip469b0848e014f5f39fc8">context</td>
4421 <td id="rpip4c4260bf628f50e6c364">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipdf3ce24ed0261f73dd6c">async_context</a>
4428 <p class="see" id="rpipb485825963f87d2b1844" data-parent-id="rpip046a6f30c511639b899e" data-target-for="rpipb485825963f87d2b1844"><span class="label" id="rpip6a8f1fbf364df7ee6ee8" data-parent-id="rpipb485825963f87d2b1844" data-target-for="rpip6a8f1fbf364df7ee6ee8">See also</span><span class="target" id="rpip81f568bbba6e4e59ea03" data-parent-id="rpipb485825963f87d2b1844" data-target-for="rpip81f568bbba6e4e59ea03"><a class="el" href="#ga404d5e6a8ef79159c692dc040f2ded44" title="Acquire the async_context lock." id="rpip367ba1a1670e895bb54a" data-adjusted="true">async_context_acquire_lock_blocking</a> </span></p>
4434 <a id="ga58c96cc02b63e12874cae38442c7c4dd" name="ga58c96cc02b63e12874cae38442c7c4dd"></a>
4437 <h4 id="rpip4353c736b26af2238a18">
4438 <a class="anchor" href="#rpip4353c736b26af2238a18"></a>◆ async_context_remove_at_time_worker()</h4>
4439 <div class="memitem" id="rpip25dd657d1693e077717f">
4440 <div class="memproto" id="rpip816bbd8da96b44680048">
4441 <table class="mlabels" id="rpip2315507a9623e24ab7b3">
4442 <tr id="rpipdac0093e7288c524bbbe">
4443 <td class="mlabels-left" id="rpip8ea7974ddcd6ce01e9d3">
4444 <table class="memname" id="rpipba353acd37ba86487638">
4445 <tr id="rpipc7f864caaf59e085f77b">
4446 <td class="memname" id="rpipe0677a1dfc14775a3765">static bool async_context_remove_at_time_worker </td>
4447 <td id="rpip315ea75fa66d7240d498">(</td>
4448 <td class="paramtype" id="rpipe8931a1c4de004a1ac71">
4449 <a class="el" href="structasync__context.html" id="rpipbea631b6709a6943fdcf">async_context_t</a> *Â </td>
4450 <td class="paramname" id="rpip4750269dd0f2d41c8a84">
4451 <em id="rpipa3fd3db378046ac42f4d">context</em>, </td>
4453 <tr id="rpip6d8a18309197ea2c26d3">
4454 <td class="paramkey" id="rpipa52e853a0bb1fba6f94b"></td>
4455 <td id="rpip83ea52d138182601f6db"></td>
4456 <td class="paramtype" id="rpip14f6406d86b4b93375b0">
4457 <a class="el" href="#ga74aa4914d98b190d2d4d84d7ff6b469e" id="rpip5fe370e7476f056484f5" data-adjusted="true">async_at_time_worker_t</a> *Â </td>
4458 <td class="paramname" id="rpipb028908e7ec6a61745db">
4459 <em id="rpip378d801a1d2f81db5d8e">worker</em>Â </td>
4461 <tr id="rpiped8532b144fa244b799d">
4462 <td id="rpip2824d753f42c43679578"></td>
4463 <td id="rpip549f3116ac483710c4c4">)</td>
4464 <td id="rpip65d05cab713ae90a3904"></td>
4465 <td id="rpip84fedfabd3508db6d49d"></td>
4469 <td class="mlabels-right" id="rpipee75c865697a32f4a030">
4470 <span class="mlabels" id="rpip8ed1af07fbcc6f70225f"><span class="mlabel" id="rpip0c6224ef6bae50f0368a">inline</span><span class="mlabel" id="rpip1faab1409dd5932090e9">static</span></span> </td>
4474 <div class="memdoc" id="rpip2fe4235b20e9d397df37">
4476 <p id="rpip39d2d993df80a032faa6">Remove an "at time" worker from a context. </p>
4477 <div class="admonitionblock note" id="rpip4e92a479e82f4129a946" data-parent-id="rpip2fe4235b20e9d397df37"><table>
4478 <tr data-target="true" data-target-for="rpip4e92a479e82f4129a946">
4479 <td class="icon" id="rpip08820f1125f9fc239cb8" data-parent-id="rpip4e92a479e82f4129a946"><div class="title" data-target="true" data-target-for="rpip08820f1125f9fc239cb8">Note</div></td>
4480 <td class="content" id="rpipc71ac10379549cc2e2a2" data-parent-id="rpip4e92a479e82f4129a946" data-target-for="rpipc71ac10379549cc2e2a2">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip60bdfb3c6d232f1c4124">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip20dedfeb0fe3cec19686">async_context</a> or from any other non-IRQ context.</td>
4483 <h4 id="rpip18b55204ebf060ed9e89" data-parent-id="rpipe3a3abc671daaebbafad" data-target-for="rpip18b55204ebf060ed9e89">Parameters</h4>
4484 <p class="paragraph" id="rpip484af72a6f5c6b01b25d" data-parent-id="rpipe3a3abc671daaebbafad" data-target-for="rpip484af72a6f5c6b01b25d">
4486 <table class="params" id="rpip136b3dfe12ffd05c9f74">
4487 <tr id="rpip8cfb96add7a6d4aac531">
4488 <td class="paramname" id="rpipf8a43f0385f4c23054a6">context</td>
4489 <td id="rpip90e06eae213f8826718c">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipa76fa144efb0bae66f15">async_context</a> </td>
4491 <tr id="rpip7525ffe37149c1d9dc8c">
4492 <td class="paramname" id="rpip83765392d1ebac6293a2">worker</td>
4493 <td id="rpipf5207ed8b1f6a16b3c02">the "at time" worker to remove </td>
4499 <h4 class="label" id="rpip912fd8cb494b96c71eaf" data-parent-id="rpip97a425d4807e541b82f3" data-target-for="rpip912fd8cb494b96c71eaf">Returns</h4>
4500 <p class="returns" id="rpip6675d3f25891315b33e9" data-parent-id="rpip97a425d4807e541b82f3" data-target-for="rpip6675d3f25891315b33e9">true if the worker was removed, false if the instance not present. </p>
4504 <a id="ga72b40c2505cd08cb542c3f1759b9e1d5" name="ga72b40c2505cd08cb542c3f1759b9e1d5"></a>
4507 <h4 id="rpipbdd1b57f0c1de4adfba2">
4508 <a class="anchor" href="#rpipbdd1b57f0c1de4adfba2"></a>◆ async_context_remove_when_pending_worker()</h4>
4509 <div class="memitem" id="rpipf07afa9f2cd6c944c4ad">
4510 <div class="memproto" id="rpipe7f91f616ae76debcad7">
4511 <table class="mlabels" id="rpip92aa9b2299f6b2704b9f">
4512 <tr id="rpipcfd3ce398c1cea1aca12">
4513 <td class="mlabels-left" id="rpip4ce2b63de6eb9cca425c">
4514 <table class="memname" id="rpipfcfc62f0d930bbe6c94f">
4515 <tr id="rpipa0d0a822d3965a45d31a">
4516 <td class="memname" id="rpip35dd60aad61f70156856">static bool async_context_remove_when_pending_worker </td>
4517 <td id="rpip637bf308cad0be0ee38f">(</td>
4518 <td class="paramtype" id="rpipd083feb2111bb5cc067e">
4519 <a class="el" href="structasync__context.html" id="rpipe129be16015f73dd3f4b">async_context_t</a> *Â </td>
4520 <td class="paramname" id="rpip2ef698a23c4b9536b7e5">
4521 <em id="rpipdb383f01468b2d1ab556">context</em>, </td>
4523 <tr id="rpipc37db36d9b1ada62923b">
4524 <td class="paramkey" id="rpip8efd30db5f3b4dd9a99a"></td>
4525 <td id="rpipc2d32082bfe97adf173e"></td>
4526 <td class="paramtype" id="rpipdc76d16836ddd518b693">
4527 <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpip7944680b0831c05ad03f" data-adjusted="true">async_when_pending_worker_t</a> *Â </td>
4528 <td class="paramname" id="rpip214276bfcfd42045217d">
4529 <em id="rpip423cccc7ec1e991bf630">worker</em>Â </td>
4531 <tr id="rpip52af47f5ed53ac2746a8">
4532 <td id="rpip91932e59df97b312d08c"></td>
4533 <td id="rpip34e1b748b7cce0410929">)</td>
4534 <td id="rpip98b86b8d69c8fde82346"></td>
4535 <td id="rpip53fdf81a7dc06dba664a"></td>
4539 <td class="mlabels-right" id="rpip436900c7651ebae15b02">
4540 <span class="mlabels" id="rpip5b2e3eb9e429666f84be"><span class="mlabel" id="rpipd8450f3c9d4a8212eaf3">inline</span><span class="mlabel" id="rpip1ef41c808dfd8ba6029e">static</span></span> </td>
4544 <div class="memdoc" id="rpipb0cd90253667d8ef92f6">
4546 <p id="rpip7835070ee167b2c3d523">Remove a "when pending" worker from a context. </p>
4547 <div class="admonitionblock note" id="rpip851a7c48fc61ac05616a" data-parent-id="rpipb0cd90253667d8ef92f6"><table>
4548 <tr data-target="true" data-target-for="rpip851a7c48fc61ac05616a">
4549 <td class="icon" id="rpip79f37fba8e364e2e1c8b" data-parent-id="rpip851a7c48fc61ac05616a"><div class="title" data-target="true" data-target-for="rpip79f37fba8e364e2e1c8b">Note</div></td>
4550 <td class="content" id="rpipbcbbb79bdf829d76952b" data-parent-id="rpip851a7c48fc61ac05616a" data-target-for="rpipbcbbb79bdf829d76952b">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip494521589d1b556c0c49">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip62373aa99f8c3d5b3579">async_context</a> or from any other non-IRQ context.</td>
4553 <h4 id="rpipd78dca9afaacaa93ad26" data-parent-id="rpip7eed8aba0e43b8109606" data-target-for="rpipd78dca9afaacaa93ad26">Parameters</h4>
4554 <p class="paragraph" id="rpip56ad3cae82a394da4245" data-parent-id="rpip7eed8aba0e43b8109606" data-target-for="rpip56ad3cae82a394da4245">
4556 <table class="params" id="rpipf4274581f70938124eff">
4557 <tr id="rpip5003684c421ba1176a8c">
4558 <td class="paramname" id="rpip459283924fac2957f893">context</td>
4559 <td id="rpip55827d14d2210950a813">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip0050db70539c86f8c4f8">async_context</a> </td>
4561 <tr id="rpip4e0d898e437b7aef32a2">
4562 <td class="paramname" id="rpip80f0489245bc5ef69b58">worker</td>
4563 <td id="rpipd7f858d7a985e2f4edb8">the "when pending" worker to remove </td>
4569 <h4 class="label" id="rpip2478ebd1fa37dfd1af16" data-parent-id="rpipd6bf726e281a7436156c" data-target-for="rpip2478ebd1fa37dfd1af16">Returns</h4>
4570 <p class="returns" id="rpipded195e324de0e881c88" data-parent-id="rpipd6bf726e281a7436156c" data-target-for="rpipded195e324de0e881c88">true if the worker was removed, false if the instance not present. </p>
4574 <a id="ga1ca51536a6f0344cfcbd30bd09fbaec2" name="ga1ca51536a6f0344cfcbd30bd09fbaec2"></a>
4577 <h4 id="rpip2e1052eefc3f48bdcd13">
4578 <a class="anchor" href="#rpip2e1052eefc3f48bdcd13"></a>◆ async_context_set_work_pending()</h4>
4579 <div class="memitem" id="rpip009c106649130e4d5854">
4580 <div class="memproto" id="rpip559072cd38de3864cd15">
4581 <table class="mlabels" id="rpip932617c475ae86c56218">
4582 <tr id="rpip6473806befd41d2fff59">
4583 <td class="mlabels-left" id="rpipe745eb2f4565c61731e1">
4584 <table class="memname" id="rpipc19f0cf4d743d59ec874">
4585 <tr id="rpipaa879b838803dc36f642">
4586 <td class="memname" id="rpip753194bda49642935b93">static void async_context_set_work_pending </td>
4587 <td id="rpip38ca893d844a34939c7c">(</td>
4588 <td class="paramtype" id="rpip75fa72df03a05e444db8">
4589 <a class="el" href="structasync__context.html" id="rpip12f1cadb14f7f0b1725b">async_context_t</a> *Â </td>
4590 <td class="paramname" id="rpip6f8fac33e6f2c249700e">
4591 <em id="rpip8ca64dad01f2a5ac9301">context</em>, </td>
4593 <tr id="rpip6580d62769e628b96243">
4594 <td class="paramkey" id="rpipafcac5b68c0d36e27526"></td>
4595 <td id="rpipe65f8855c8759ed5bfe0"></td>
4596 <td class="paramtype" id="rpipd266c67a3dc85a61c150">
4597 <a class="el" href="#ga975e8fa20352873b7ac76b06a497eb2b" id="rpip5e29cc8c2c67d8caea91" data-adjusted="true">async_when_pending_worker_t</a> *Â </td>
4598 <td class="paramname" id="rpip277951b929326ef8952c">
4599 <em id="rpip82ecd5fff29fa1ceba00">worker</em>Â </td>
4601 <tr id="rpip54f7cf2bf2830b772c7a">
4602 <td id="rpip76756980c9ef714d1f92"></td>
4603 <td id="rpipe64cd2e5e1f2bee15948">)</td>
4604 <td id="rpipfc6fea5698e7a181f4c9"></td>
4605 <td id="rpipfea9ca72e465b765ae86"></td>
4609 <td class="mlabels-right" id="rpip5d9c76c1d4f10aee101f">
4610 <span class="mlabels" id="rpip98fd420eaf0b50be17c8"><span class="mlabel" id="rpip77f77236cae39dc8bc1c">inline</span><span class="mlabel" id="rpipd3beeb737e7515ab9e38">static</span></span> </td>
4614 <div class="memdoc" id="rpip90b7e1ed6b1f5181c016">
4616 <p id="rpip380068fabc5f3e9547fb">Mark a "when pending" worker as having work pending. </p>
4617 <p id="rpip86182631b46915e591ad">The worker will be run from the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip1aa9462d4e2d536f9f48">async_context</a> at a later time.</p>
4618 <div class="admonitionblock note" id="rpipfb5305e2e871665b90c0" data-parent-id="rpip90b7e1ed6b1f5181c016"><table>
4619 <tr data-target="true" data-target-for="rpipfb5305e2e871665b90c0">
4620 <td class="icon" id="rpipb9f499395859347a6c37" data-parent-id="rpipfb5305e2e871665b90c0"><div class="title" data-target="true" data-target-for="rpipb9f499395859347a6c37">Note</div></td>
4621 <td class="content" id="rpip5f5b3ee055d08dea7305" data-parent-id="rpipfb5305e2e871665b90c0" data-target-for="rpip5f5b3ee055d08dea7305">this method may be called from any context including IRQs</td>
4624 <h4 id="rpip19a3f458c4c8afab685c" data-parent-id="rpip3811f4dd36e13922b4d6" data-target-for="rpip19a3f458c4c8afab685c">Parameters</h4>
4625 <p class="paragraph" id="rpipa5359adf54f5861f00d1" data-parent-id="rpip3811f4dd36e13922b4d6" data-target-for="rpipa5359adf54f5861f00d1">
4627 <table class="params" id="rpip56f34b9dc1a006ac607d">
4628 <tr id="rpipdd164605ab4d738763fa">
4629 <td class="paramname" id="rpip2da992d90855b7cf379d">context</td>
4630 <td id="rpip4ed45fad2bd0b7e87d12">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip5ced6500e8bc257b2c18">async_context</a> </td>
4632 <tr id="rpipb67ccfb046ab1b836056">
4633 <td class="paramname" id="rpip93e19a60b5ed4d86aa91">worker</td>
4634 <td id="rpipe5ab6e64e98800515bb9">the "when pending" worker to mark as pending. </td>
4643 <a id="gaae7ea2fed2b274a63455773d056f6d4c" name="gaae7ea2fed2b274a63455773d056f6d4c"></a>
4646 <h4 id="rpip3c493b95027dd58bea66">
4647 <a class="anchor" href="#rpip3c493b95027dd58bea66"></a>◆ async_context_wait_for_work_ms()</h4>
4648 <div class="memitem" id="rpipa493fae1ab794f2e9cd5">
4649 <div class="memproto" id="rpipc10997925f62d275b632">
4650 <table class="mlabels" id="rpip7b1e6187a0a6dcdc45fb">
4651 <tr id="rpip926eb05ac331073ba61e">
4652 <td class="mlabels-left" id="rpip288c79f7cc82a5b13759">
4653 <table class="memname" id="rpip2033b1a14a1403abd92a">
4654 <tr id="rpipd058074c1d2082f4f078">
4655 <td class="memname" id="rpip8d3c0708ba650b72f3c2">static void async_context_wait_for_work_ms </td>
4656 <td id="rpip2018fa98454ed9f9134d">(</td>
4657 <td class="paramtype" id="rpip3ec6a89750422f8444b9">
4658 <a class="el" href="structasync__context.html" id="rpip01e5f1e735b4238f4243">async_context_t</a> *Â </td>
4659 <td class="paramname" id="rpip13268a22d216fa42a589">
4660 <em id="rpipa951d041ad75a04f6ecb">context</em>, </td>
4662 <tr id="rpip28f01a8805467a052e6e">
4663 <td class="paramkey" id="rpip4faef60486b7ccdb3901"></td>
4664 <td id="rpip4ef7a7879256531bd2e9"></td>
4665 <td class="paramtype" id="rpip878a3065360e073b49aa">uint32_t </td>
4666 <td class="paramname" id="rpip813afbac3162b7e0845d">
4667 <em id="rpip642c7d6db07c0ba9ce97">ms</em>Â </td>
4669 <tr id="rpipcf39aeb6d3a1cb0ec6bc">
4670 <td id="rpip046a2d3a02aa133bbca9"></td>
4671 <td id="rpipc41ae610ca6ec7f6c596">)</td>
4672 <td id="rpip5519496a2a8d870e7e9c"></td>
4673 <td id="rpip4b1c12754d048bef1723"></td>
4677 <td class="mlabels-right" id="rpip50b4aeb6dc33b23ec3d7">
4678 <span class="mlabels" id="rpip0a430d94bf5f7a51e20b"><span class="mlabel" id="rpip7d0f4a669999691d745e">inline</span><span class="mlabel" id="rpip7330e54d48dd6d9fcb6d">static</span></span> </td>
4682 <div class="memdoc" id="rpip1b3ff67c80f0d9edf286">
4684 <p id="rpipc589f3e5baa3e4ce7220">Block until work needs to be done or the specified number of milliseconds have passed. </p>
4685 <div class="admonitionblock note" id="rpipb28365300e2227222ced" data-parent-id="rpip1b3ff67c80f0d9edf286"><table>
4686 <tr data-target="true" data-target-for="rpipb28365300e2227222ced">
4687 <td class="icon" id="rpipb076502bf9ac69dacf0e" data-parent-id="rpipb28365300e2227222ced"><div class="title" data-target="true" data-target-for="rpipb076502bf9ac69dacf0e">Note</div></td>
4688 <td class="content" id="rpipb1a6344aedb3347e9c1b" data-parent-id="rpipb28365300e2227222ced" data-target-for="rpipb1a6344aedb3347e9c1b">this method should not be called from a worker callback</td>
4691 <h4 id="rpip3bcc47308592b31819aa" data-parent-id="rpip11c34ccc645982d851af" data-target-for="rpip3bcc47308592b31819aa">Parameters</h4>
4692 <p class="paragraph" id="rpipbfc8b3e6894296d67583" data-parent-id="rpip11c34ccc645982d851af" data-target-for="rpipbfc8b3e6894296d67583">
4694 <table class="params" id="rpip24bdccdad857c1929d9c">
4695 <tr id="rpip49ed65bb7e1a7a246a8e">
4696 <td class="paramname" id="rpipe5d1661589aa5bd95403">context</td>
4697 <td id="rpip330152af5d31557ca7c7">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipa54bfd23bb80bcea1bc1">async_context</a> </td>
4699 <tr id="rpip3db4951eaf9a9902046b">
4700 <td class="paramname" id="rpip6b4a006d4752cc8c4ec3">ms</td>
4701 <td id="rpip1226676b3c7d544c63f1">the number of milliseconds to return after if no work is required </td>
4710 <a id="ga6207f562c0b69c7a75cd81a783eb1055" name="ga6207f562c0b69c7a75cd81a783eb1055"></a>
4713 <h4 id="rpip2b7fac0c433fe918835e">
4714 <a class="anchor" href="#rpip2b7fac0c433fe918835e"></a>◆ async_context_wait_for_work_until()</h4>
4715 <div class="memitem" id="rpip9edb9404a12c79213f8b">
4716 <div class="memproto" id="rpipefc62789cc3f3df9cfb9">
4717 <table class="mlabels" id="rpip6c0412dfdcba37b4da4b">
4718 <tr id="rpip38a2f1f31f0bc2f877d0">
4719 <td class="mlabels-left" id="rpip117fdd2a97c4bcae874e">
4720 <table class="memname" id="rpip5d680a4a80b99bfb3c41">
4721 <tr id="rpipdfd488ba664ac67a1238">
4722 <td class="memname" id="rpip0d67ee811f7ab43cf1a0">static void async_context_wait_for_work_until </td>
4723 <td id="rpipfc509bc631c4b59cc2ec">(</td>
4724 <td class="paramtype" id="rpip73439d0188774bedc8f2">
4725 <a class="el" href="structasync__context.html" id="rpipb6a88d7a4d3c7b108ad2">async_context_t</a> *Â </td>
4726 <td class="paramname" id="rpip585e4b9076804336c4bc">
4727 <em id="rpipbb3be239861d845c4c59">context</em>, </td>
4729 <tr id="rpip3ca7303d1af70ddb95ab">
4730 <td class="paramkey" id="rpipf1ef17f10840694b5726"></td>
4731 <td id="rpip1331a9d7c5020aa2acd0"></td>
4732 <td class="paramtype" id="rpip8c9ceccecd748f392fa0">
4733 <a class="el" href="structabsolute__time__t.html" id="rpipf7576690220953178f80">absolute_time_t</a>Â </td>
4734 <td class="paramname" id="rpipbe24736d63087e4b3153">
4735 <em id="rpipdd6ae02b25b52f423ae4">until</em>Â </td>
4737 <tr id="rpip36a37952754f96b4900d">
4738 <td id="rpip87201e1c1e7db76db3c1"></td>
4739 <td id="rpipaec8fc5483fc80013dfc">)</td>
4740 <td id="rpip4c7060c53f9cb068ea85"></td>
4741 <td id="rpip3ba8040abf6818942c66"></td>
4745 <td class="mlabels-right" id="rpipaa9be2997b4b1be9b578">
4746 <span class="mlabels" id="rpip21618d007dfd86a1d83e"><span class="mlabel" id="rpip0ac13c339954c38b2fa6">inline</span><span class="mlabel" id="rpipe3626836e5891a8644f6">static</span></span> </td>
4750 <div class="memdoc" id="rpipcb957ec8901eacadf963">
4752 <p id="rpipb3bfb43d6861a2db97ac">Block until work needs to be done or the specified time has been reached. </p>
4753 <div class="admonitionblock note" id="rpip9e1a687ba36de8d3d3a4" data-parent-id="rpipcb957ec8901eacadf963"><table>
4754 <tr data-target="true" data-target-for="rpip9e1a687ba36de8d3d3a4">
4755 <td class="icon" id="rpip3d37f0c96134feff15d4" data-parent-id="rpip9e1a687ba36de8d3d3a4"><div class="title" data-target="true" data-target-for="rpip3d37f0c96134feff15d4">Note</div></td>
4756 <td class="content" id="rpip924e4963a161e77a4336" data-parent-id="rpip9e1a687ba36de8d3d3a4" data-target-for="rpip924e4963a161e77a4336">this method should not be called from a worker callback</td>
4759 <h4 id="rpipbf425d5bcce9dbeee986" data-parent-id="rpipb479f7198c937f9fb139" data-target-for="rpipbf425d5bcce9dbeee986">Parameters</h4>
4760 <p class="paragraph" id="rpip6318e1e1d5ecdcfccf46" data-parent-id="rpipb479f7198c937f9fb139" data-target-for="rpip6318e1e1d5ecdcfccf46">
4762 <table class="params" id="rpip5132f9d32d114c03a301">
4763 <tr id="rpip37593088f7d69720363c">
4764 <td class="paramname" id="rpip12a87f3f27dd15820085">context</td>
4765 <td id="rpip601a89dcc595398d20b9">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip913bdf3c304a003504a4">async_context</a> </td>
4767 <tr id="rpip195d70ee4b2ab6e94597">
4768 <td class="paramname" id="rpip20c2ef420fccc210d7be">until</td>
4769 <td id="rpipedc98fde02d288751131">the time to return at if no work is required </td>
4778 <a id="gad2f27b21dbaa264dfe59ef0f59de11db" name="gad2f27b21dbaa264dfe59ef0f59de11db"></a>
4781 <h4 id="rpip4d093bb5a402dcf62a33">
4782 <a class="anchor" href="#rpip4d093bb5a402dcf62a33"></a>◆ async_context_wait_until()</h4>
4783 <div class="memitem" id="rpip3d00a95f76c3c72f42d4">
4784 <div class="memproto" id="rpip3b194112d7a46fc5d94d">
4785 <table class="mlabels" id="rpipa4631934c77e0036b7b3">
4786 <tr id="rpip4aaa6e721656d2014156">
4787 <td class="mlabels-left" id="rpip9d93e3e33c63742cb7ef">
4788 <table class="memname" id="rpipa0f11a51e55f1d178bac">
4789 <tr id="rpip94645771ebbc919867aa">
4790 <td class="memname" id="rpip84a07e3603e129ce3fdf">static void async_context_wait_until </td>
4791 <td id="rpip5fc398ee59d365889f60">(</td>
4792 <td class="paramtype" id="rpipac6e7636b6b0ae54dc13">
4793 <a class="el" href="structasync__context.html" id="rpip2499c5aee0170264eda6">async_context_t</a> *Â </td>
4794 <td class="paramname" id="rpip86037894b1526b1c7e1a">
4795 <em id="rpip1849821fd597d33f5817">context</em>, </td>
4797 <tr id="rpipc3ea66f92e9ad58685a4">
4798 <td class="paramkey" id="rpip7b3cbd18cb596262f865"></td>
4799 <td id="rpipf5d1cf1acbf5a73d1538"></td>
4800 <td class="paramtype" id="rpip395f6eea222aefe3ffdf">
4801 <a class="el" href="structabsolute__time__t.html" id="rpipfb2cec323106eaa0a2cb">absolute_time_t</a>Â </td>
4802 <td class="paramname" id="rpip5725028b2016f03fed69">
4803 <em id="rpip9d8ab32bf9cc23045a6b">until</em>Â </td>
4805 <tr id="rpipf259929502da739c62d1">
4806 <td id="rpip3236caff5ba7a16d1224"></td>
4807 <td id="rpipd6fc867d925cce298e98">)</td>
4808 <td id="rpip901e81856f2b9ffc25f8"></td>
4809 <td id="rpipf728080bd306bce328d5"></td>
4813 <td class="mlabels-right" id="rpipaa45458cd1934371709e">
4814 <span class="mlabels" id="rpip596076173043e762bf9e"><span class="mlabel" id="rpip7556218fec98747d9442">inline</span><span class="mlabel" id="rpipeea3b153cf4ae29bd45c">static</span></span> </td>
4818 <div class="memdoc" id="rpipd8f80e1515abb5a34100">
4820 <p id="rpipfe47200d9c4b58684af9">sleep until the specified time in an <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip8ae6c9540a76181beeae">async_context</a> callback safe way </p>
4821 <div class="admonitionblock note" id="rpipbb6c382c8fceee6ebc0d" data-parent-id="rpipd8f80e1515abb5a34100"><table>
4822 <tr data-target="true" data-target-for="rpipbb6c382c8fceee6ebc0d">
4823 <td class="icon" id="rpip73be86c676c4bf7ee5b0" data-parent-id="rpipbb6c382c8fceee6ebc0d"><div class="title" data-target="true" data-target-for="rpip73be86c676c4bf7ee5b0">Note</div></td>
4824 <td class="content" id="rpip4969f84fcdb0222f7dc2" data-parent-id="rpipbb6c382c8fceee6ebc0d" data-target-for="rpip4969f84fcdb0222f7dc2">for async_contexts that provide locking (not <a class="el" href="structasync__context__poll.html" id="rpip914af510c96347f4ee58">async_context_poll</a>), this method is threadsafe. and may be called from within any worker method called by the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip1f83228b8c796cda04dc">async_context</a> or from any other non-IRQ context.</td>
4827 <h4 id="rpipad83a94b330544c81a3f" data-parent-id="rpipbb0cc5dbf50fae0275bb" data-target-for="rpipad83a94b330544c81a3f">Parameters</h4>
4828 <p class="paragraph" id="rpip0b2e5949b5b534f17505" data-parent-id="rpipbb0cc5dbf50fae0275bb" data-target-for="rpip0b2e5949b5b534f17505">
4830 <table class="params" id="rpip4fa03abf2829c101554e">
4831 <tr id="rpip38c6e004947f478284b4">
4832 <td class="paramname" id="rpip44640ce5930b8fbfa47f">context</td>
4833 <td id="rpipd7da5ffa621d08efbeda">the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipa24622f3ae32667ce2c5">async_context</a> </td>
4835 <tr id="rpip032aa5bb47a460b4646d">
4836 <td class="paramname" id="rpip989e30d94401d26b38e2">until</td>
4837 <td id="rpip13fed6db0b3db6916f27">the time to sleep until </td>
4849 <h3 id="async_context_freertos">
4850 <a class="anchor" href="#async_context_freertos"></a>async_context_freertos</h3>
4851 <div class="ingroups" id="rpip121097263efab4ea0278">Part of: <a class="el" href="high_level.html" id="rpipbe2b5aa899c51a3a999c">High Level APIs</a> » <a class="el" href="high_level.html#pico_async_context" id="rpip94c2b29c66bc09225d3e">pico_async_context</a>
4854 <h4 id="rpip8a07cc4b6ab740260e1e">
4855 <a class="anchor" href="#rpip8a07cc4b6ab740260e1e"></a>Functions</h4>
4856 <ul class="memberdecls" id="rpip7140223355e4ed4dde29" data-parent-id="rpipc8fb122b94e32ddd8066">
4857 <li class="memitem">
4858 <p data-target="true" data-target-for="rpip7140223355e4ed4dde29"><span class="memItemLeft" data-target="true" id="rpipa4964925f8375f26c527" data-parent-id="rpip7140223355e4ed4dde29" data-target-for="rpipa4964925f8375f26c527">bool </span><span class="memItemRight" data-target="true" id="rpip346fbbb7dfeedbfd0ba6" data-parent-id="rpip7140223355e4ed4dde29" data-target-for="rpip346fbbb7dfeedbfd0ba6"><a class="el" href="#ga2deda7edb010962737d8b614fdf2f6da" id="rpip2f986788e13c2bfe3525" data-adjusted="true">async_context_freertos_init</a> (<a class="el" href="structasync__context__freertos.html" id="rpipc0a9eb1c2e35f6ce516d">async_context_freertos_t</a> *self, <a class="el" href="structasync__context__freertos__config.html" id="rpip349974a77818bbcec4e4">async_context_freertos_config_t</a> *config)</span></p>
4860 <li class="memdesc">
4861 <p data-target="true" data-target-for="rpipbea52ab1b025f9e4e656"><span class="mdescLeft" data-target="true" id="rpip6dc95f7c88e8f2ceb689" data-parent-id="rpipbea52ab1b025f9e4e656" data-target-for="rpip6dc95f7c88e8f2ceb689">Â </span><span class="mdescRight" data-target="true" id="rpip730226b6596dd9a9c7f7" data-parent-id="rpipbea52ab1b025f9e4e656" data-target-for="rpip730226b6596dd9a9c7f7">Initialize an <a class="el" href="structasync__context__freertos.html" id="rpip679dd72712ab478e8a89">async_context_freertos</a> instance using the specified configuration. <br id="rpip96bcba045dddf5d6d732"></span></p>
4863 <li class="memitem">
4864 <p data-target="true" data-target-for="rpip78ab455e72c2b8845a5a"><span class="memItemLeft" data-target="true" id="rpipa25c058292fbbcaab475" data-parent-id="rpip78ab455e72c2b8845a5a" data-target-for="rpipa25c058292fbbcaab475">static <a class="el" href="structasync__context__freertos__config.html" id="rpip9cfbbc64e07d2b0e4681">async_context_freertos_config_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip8972912a47f435320f01" data-parent-id="rpip78ab455e72c2b8845a5a" data-target-for="rpip8972912a47f435320f01"><a class="el" href="#ga9cff526632c6dc26e8f3e7ab9784d83a" id="rpip4058c3207c6a5b3cb164" data-adjusted="true">async_context_freertos_default_config</a> (void)</span></p>
4866 <li class="memdesc">
4867 <p data-target="true" data-target-for="rpip333b58c4f22ca207d807"><span class="mdescLeft" data-target="true" id="rpip9c52583251e256ce6b35" data-parent-id="rpip333b58c4f22ca207d807" data-target-for="rpip9c52583251e256ce6b35">Â </span><span class="mdescRight" data-target="true" id="rpip1497e1c4de9f7ba55194" data-parent-id="rpip333b58c4f22ca207d807" data-target-for="rpip1497e1c4de9f7ba55194">Return a copy of the default configuration object used by <a class="el" href="#ga90e97b53118205726fcb2253a21fa159" id="rpip7947f56a02f849bc275f" data-adjusted="true">async_context_freertos_init_with_defaults()</a> <br id="rpip09d76f8b0669c27d8e97"></span></p>
4869 <li class="memitem">
4870 <p data-target="true" data-target-for="rpipa41efb7b0aa2f2794510"><span class="memItemLeft" data-target="true" id="rpipfe40458a6df5f6d8ce46" data-parent-id="rpipa41efb7b0aa2f2794510" data-target-for="rpipfe40458a6df5f6d8ce46">static bool </span><span class="memItemRight" data-target="true" id="rpip29030bcde789f3d15362" data-parent-id="rpipa41efb7b0aa2f2794510" data-target-for="rpip29030bcde789f3d15362"><a class="el" href="#ga90e97b53118205726fcb2253a21fa159" id="rpipe573adc47dd8f3b539b9" data-adjusted="true">async_context_freertos_init_with_defaults</a> (<a class="el" href="structasync__context__freertos.html" id="rpip2e0bc8a5381cfe751cae">async_context_freertos_t</a> *self)</span></p>
4872 <li class="memdesc">
4873 <p data-target="true" data-target-for="rpip3e638fdb7b14a3fb55aa"><span class="mdescLeft" data-target="true" id="rpip7475846075831e79d458" data-parent-id="rpip3e638fdb7b14a3fb55aa" data-target-for="rpip7475846075831e79d458">Â </span><span class="mdescRight" data-target="true" id="rpip91fdb5f81be6a65fe880" data-parent-id="rpip3e638fdb7b14a3fb55aa" data-target-for="rpip91fdb5f81be6a65fe880">Initialize an <a class="el" href="structasync__context__freertos.html" id="rpip3f52f1366c8cf182b7d4">async_context_freertos</a> instance with default values. <br id="rpipe25064daee4a3b3f649f"></span></p>
4876 <a name="details" id="details"></a>
4879 <h4 id="rpip38759742afec8aa8721b">
4880 <a class="anchor" href="#rpip38759742afec8aa8721b"></a>Detailed Description</h4>
4881 <p id="rpip488fe89ec36eec0140fe"><a class="el" href="structasync__context__freertos.html" id="rpip4a26b6f0a614d793b80a">async_context_freertos</a> provides an implementation of <a class="el" href="structasync__context.html" id="rpip530352e69ccb22cfd856">async_context</a> that handles asynchronous work in a separate FreeRTOS task. </p>
4884 <h4 id="rpip1db4645e0d9424d9ed71">
4885 <a class="anchor" href="#rpip1db4645e0d9424d9ed71"></a>Function Documentation</h4>
4886 <a id="ga9cff526632c6dc26e8f3e7ab9784d83a" name="ga9cff526632c6dc26e8f3e7ab9784d83a"></a>
4888 <h5 id="rpip69be88e7c613cb84485b">
4889 <a class="anchor" href="#rpip69be88e7c613cb84485b"></a>◆ async_context_freertos_default_config()</h5>
4890 <div class="memitem" id="rpipfc3424fb9639a736b6f0">
4891 <div class="memproto" id="rpip4e0303f0d4ae7957265c">
4892 <table class="mlabels" id="rpip28cb7aecdb1ccfa1b782">
4893 <tr id="rpip4357e6749625d67af781">
4894 <td class="mlabels-left" id="rpip8f6aeda6dc65200ef962">
4895 <table class="memname" id="rpipbcd3d51a116ee6f77689">
4896 <tr id="rpip47eb77cd066daa316686">
4897 <td class="memname" id="rpip59f0aec019ae22dc5982">static <a class="el" href="structasync__context__freertos__config.html" id="rpip9e5d42790008a2a446d9">async_context_freertos_config_t</a> async_context_freertos_default_config </td>
4898 <td id="rpipd986435c7b5d7404d165">(</td>
4899 <td class="paramtype" id="rpip963b6d9470dadaed3af2">void </td>
4900 <td class="paramname" id="rpip4ef9190931e13fa13c0b"></td>
4901 <td id="rpipe911d8a09c9119a2afe2">)</td>
4902 <td id="rpip85c724be073c5607338e"></td>
4906 <td class="mlabels-right" id="rpipcde4cec472da4acc685b">
4907 <span class="mlabels" id="rpipaf56175c40db94c8d2f7"><span class="mlabel" id="rpipa9c365638ff29715b5c1">inline</span><span class="mlabel" id="rpipf2dbd35b855d0b4be14d">static</span></span> </td>
4911 <div class="memdoc" id="rpip11419c53c06399a3a6e3">
4913 <p id="rpipce3f533217410518c895">Return a copy of the default configuration object used by <a class="el" href="#ga90e97b53118205726fcb2253a21fa159" id="rpip02407b75fa3ff514047d" data-adjusted="true">async_context_freertos_init_with_defaults()</a> </p>
4914 <p id="rpip264b2b5594f7dd1bdfa0">The caller can then modify just the settings it cares about, and call <a class="el" href="#ga2deda7edb010962737d8b614fdf2f6da" id="rpip003762fb9dbb306a6720" data-adjusted="true">async_context_freertos_init()</a> </p>
4915 <h4 class="label" id="rpip85ed822c74bf06113204" data-parent-id="rpipb0718dc81c002fcc7b87" data-target-for="rpip85ed822c74bf06113204">Returns</h4>
4916 <p class="returns" id="rpipc0867cdf64a0381f2f50" data-parent-id="rpipb0718dc81c002fcc7b87" data-target-for="rpipc0867cdf64a0381f2f50">the default configuration object </p>
4920 <a id="ga2deda7edb010962737d8b614fdf2f6da" name="ga2deda7edb010962737d8b614fdf2f6da"></a>
4923 <h5 id="rpip2dba2f43fe54c14c85f4">
4924 <a class="anchor" href="#rpip2dba2f43fe54c14c85f4"></a>◆ async_context_freertos_init()</h5>
4925 <div class="memitem" id="rpipa8e02fc3c510aeea9ebb">
4926 <div class="memproto" id="rpip6068121a74a9e3650cb6">
4927 <table class="memname" id="rpipc2a06acc26ed1efd8996">
4928 <tr id="rpip0866499477c1c281b28d">
4929 <td class="memname" id="rpipe9806f888a30fc380072">bool async_context_freertos_init </td>
4930 <td id="rpip0805e9e90034249bc1df">(</td>
4931 <td class="paramtype" id="rpip6a2494787753e5066120">
4932 <a class="el" href="structasync__context__freertos.html" id="rpipd13c1f4932e93662db09">async_context_freertos_t</a> *Â </td>
4933 <td class="paramname" id="rpipf19ef040ad067c6fb3d5">
4934 <em id="rpip85927908c009e258c4c2">self</em>, </td>
4936 <tr id="rpip3263947919b7a22916dd">
4937 <td class="paramkey" id="rpipeac5d0638e918cd63534"></td>
4938 <td id="rpipd331e43f3a8ad81a051d"></td>
4939 <td class="paramtype" id="rpip177b1255260a5448806c">
4940 <a class="el" href="structasync__context__freertos__config.html" id="rpip889b8ca5374ce960e7ef">async_context_freertos_config_t</a> *Â </td>
4941 <td class="paramname" id="rpipdb4edbe438e6b2c86d3f">
4942 <em id="rpip8bc26fb6ea04a1c3eeaa">config</em>Â </td>
4944 <tr id="rpip39a67d02c5d9ce3000db">
4945 <td id="rpipab64c2d4afadf7f6a3a4"></td>
4946 <td id="rpip3a07ffed63227b299228">)</td>
4947 <td id="rpip5005178475862077d6d9"></td>
4948 <td id="rpipb3f048f9f0b8cd2bdf74"></td>
4952 <div class="memdoc" id="rpip380d29aeaaf2473d8853">
4954 <p id="rpip599e31830bf8bf312e10">Initialize an <a class="el" href="structasync__context__freertos.html" id="rpipa4cfd3b96b0119f8ea78">async_context_freertos</a> instance using the specified configuration. </p>
4955 <p id="rpip7ff9f0386f8ff7c67034">If this method succeeds (returns true), then the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip036e88f90dca0c997047">async_context</a> is available for use and can be de-initialized by calling <a class="el" href="high_level.html#pico_async_context#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources." id="rpip303d5087937cdc15b134" data-adjusted="true">async_context_deinit()</a>.</p>
4956 <h4 id="rpipe62a8a8cc78986ee87e4" data-parent-id="rpipf5946cddaac5557c78fb" data-target-for="rpipe62a8a8cc78986ee87e4">Parameters</h4>
4957 <p class="paragraph" id="rpipdae647a8f5ffabd8bde2" data-parent-id="rpipf5946cddaac5557c78fb" data-target-for="rpipdae647a8f5ffabd8bde2">
4959 <table class="params" id="rpip2b7d2180da2286f635cf">
4960 <tr id="rpip6dd502ccf4dca695d99a">
4961 <td class="paramname" id="rpipba6655e90af554bb416a">self</td>
4962 <td id="rpip5c4dcce979df3f43c213">a pointer to <a class="el" href="structasync__context__freertos.html" id="rpip9faaf5dae0874fcad1a9">async_context_freertos</a> structure to initialize </td>
4964 <tr id="rpipa6384b54fec0f59aa296">
4965 <td class="paramname" id="rpip3dfed5fab108cc9c1974">config</td>
4966 <td id="rpipdf878b809cf413d749c7">the configuration object specifying characteristics for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipd71f1b1e361fd28dc1c2">async_context</a> </td>
4972 <h4 class="label" id="rpip607367c11ae31dc1340f" data-parent-id="rpipbf4ba31465b7cf3586a9" data-target-for="rpip607367c11ae31dc1340f">Returns</h4>
4973 <p class="returns" id="rpipf5396d9eebf4ca19b9e8" data-parent-id="rpipbf4ba31465b7cf3586a9" data-target-for="rpipf5396d9eebf4ca19b9e8">true if initialization is successful, false otherwise </p>
4977 <a id="ga90e97b53118205726fcb2253a21fa159" name="ga90e97b53118205726fcb2253a21fa159"></a>
4980 <h5 id="rpip950acb1da96b69bb9089">
4981 <a class="anchor" href="#rpip950acb1da96b69bb9089"></a>◆ async_context_freertos_init_with_defaults()</h5>
4982 <div class="memitem" id="rpipe4a09b547e6faf5bbab0">
4983 <div class="memproto" id="rpip771dae0f60f96c346cec">
4984 <table class="mlabels" id="rpip2dfc1b1e0d65afe2d53b">
4985 <tr id="rpipcc4a58ade387bf37882b">
4986 <td class="mlabels-left" id="rpip4d8faa7addba46f240c2">
4987 <table class="memname" id="rpip31de2ac4c5560b33aa37">
4988 <tr id="rpip5564034e1e7771da8958">
4989 <td class="memname" id="rpip21b6f43e9b84f3ed3449">static bool async_context_freertos_init_with_defaults </td>
4990 <td id="rpip02dac0cdb1dc139f3768">(</td>
4991 <td class="paramtype" id="rpipd67a0182d1f144970220">
4992 <a class="el" href="structasync__context__freertos.html" id="rpipbd340a6137ff1e4d8f24">async_context_freertos_t</a> *Â </td>
4993 <td class="paramname" id="rpip0533a1b3b949ae32cff0"><em id="rpipd0492b8d478ed7ae7e4d">self</em></td>
4994 <td id="rpip62ba084d430d7800bbb4">)</td>
4995 <td id="rpip7a20f3707cc85609c0eb"></td>
4999 <td class="mlabels-right" id="rpip80f3239571be069583ea">
5000 <span class="mlabels" id="rpip71073ea3c87e7aa43fe3"><span class="mlabel" id="rpip238c693910fb52ca2827">inline</span><span class="mlabel" id="rpip7c4b71ac51a3ed2b80a3">static</span></span> </td>
5004 <div class="memdoc" id="rpip5c10330b871cc060dfa7">
5006 <p id="rpipf947c366b8f21e93ecdb">Initialize an <a class="el" href="structasync__context__freertos.html" id="rpip4079b05af86b4254758d">async_context_freertos</a> instance with default values. </p>
5007 <p id="rpip156bbcd8213035a8d42b">If this method succeeds (returns true), then the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip16ddaf1aae4b9a609447">async_context</a> is available for use and can be de-initialized by calling <a class="el" href="high_level.html#pico_async_context#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources." id="rpipea67fd1be19360e44313" data-adjusted="true">async_context_deinit()</a>.</p>
5008 <h4 id="rpipfd5d02be7e54e1546a42" data-parent-id="rpip52e0c30bba3713393671" data-target-for="rpipfd5d02be7e54e1546a42">Parameters</h4>
5009 <p class="paragraph" id="rpip174cd7d04c2f356456c6" data-parent-id="rpip52e0c30bba3713393671" data-target-for="rpip174cd7d04c2f356456c6">
5011 <table class="params" id="rpip779157d9f4ce36adc04e">
5012 <tr id="rpipbfae0781f35f2614c34b">
5013 <td class="paramname" id="rpip7c0c78732be50e0d0a9c">self</td>
5014 <td id="rpipb83e791842080d1d6a64">a pointer to <a class="el" href="structasync__context__freertos.html" id="rpip69b03f07a284ef30339b">async_context_freertos</a> structure to initialize </td>
5020 <h4 class="label" id="rpip02ab572abf645e7d310d" data-parent-id="rpipb9ce79d826e027e8d95c" data-target-for="rpip02ab572abf645e7d310d">Returns</h4>
5021 <p class="returns" id="rpip6e598120c0d46863420c" data-parent-id="rpipb9ce79d826e027e8d95c" data-target-for="rpip6e598120c0d46863420c">true if initialization is successful, false otherwise </p>
5029 <h3 id="async_context_poll">
5030 <a class="anchor" href="#async_context_poll"></a>async_context_poll</h3>
5031 <div class="ingroups" id="rpipc7c69d084c7ec69d979a">Part of: <a class="el" href="high_level.html" id="rpip11aa429b7f15f3e996d5">High Level APIs</a> » <a class="el" href="high_level.html#pico_async_context" id="rpip815a050cf26f4d17297a">pico_async_context</a>
5034 <h4 id="rpip85687ce81a1edca3f080">
5035 <a class="anchor" href="#rpip85687ce81a1edca3f080"></a>Functions</h4>
5036 <ul class="memberdecls" id="rpip976bcfc952cafcd5b3d2" data-parent-id="rpip1035f489256937e507eb">
5037 <li class="memitem">
5038 <p data-target="true" data-target-for="rpip976bcfc952cafcd5b3d2"><span class="memItemLeft" data-target="true" id="rpipda558ee0cdda0baeaf53" data-parent-id="rpip976bcfc952cafcd5b3d2" data-target-for="rpipda558ee0cdda0baeaf53">bool </span><span class="memItemRight" data-target="true" id="rpipab619dee84d782a079c8" data-parent-id="rpip976bcfc952cafcd5b3d2" data-target-for="rpipab619dee84d782a079c8"><a class="el" href="#ga4ee772d4efa94ec03e2b2ae2f775837d" id="rpip79d8d62910149165e33d" data-adjusted="true">async_context_poll_init_with_defaults</a> (<a class="el" href="structasync__context__poll.html" id="rpip50fad4f349f13f1fb22e">async_context_poll_t</a> *self)</span></p>
5040 <li class="memdesc">
5041 <p data-target="true" data-target-for="rpipaf5c74de644fb8766ced"><span class="mdescLeft" data-target="true" id="rpip99017ccb0e69f1423be9" data-parent-id="rpipaf5c74de644fb8766ced" data-target-for="rpip99017ccb0e69f1423be9">Â </span><span class="mdescRight" data-target="true" id="rpip70ae8d966d56ee52cdf5" data-parent-id="rpipaf5c74de644fb8766ced" data-target-for="rpip70ae8d966d56ee52cdf5">Initialize an <a class="el" href="structasync__context__poll.html" id="rpip21bd96c4389ee4fee734">async_context_poll</a> instance with default values. <br id="rpip0b75b9098aa3b49d7d0d"></span></p>
5044 <a name="details" id="details"></a>
5047 <h4 id="rpip58eddeb5eaf2d276033d">
5048 <a class="anchor" href="#rpip58eddeb5eaf2d276033d"></a>Detailed Description</h4>
5049 <p id="rpip54d53e517022c3680bb9"><a class="el" href="structasync__context__poll.html" id="rpipb076dad88046f8ca8c99">async_context_poll</a> provides an implementation of <a class="el" href="structasync__context.html" id="rpipb399b44a085d442128c0">async_context</a> that is intended for use with a simple polling loop on one core. It is not thread safe.</p>
5050 <p id="rpipfa5175ecd80987d6eb04">The <a class="el" href="high_level.html#async_context_poll" id="rpip8e6ac8f473fea1cfea8d">async_context_poll</a> method must be called periodically to handle asynchronous work that may now be pending. <a class="el" href="high_level.html#pico_async_context#ga6207f562c0b69c7a75cd81a783eb1055" id="rpipaced15c69a6c30c7794b" data-adjusted="true">async_context_wait_for_work_until()</a> may be used to block a polling loop until there is work to do, and prevent tight spinning. </p>
5053 <h4 id="rpipff5dada0d9337904d720">
5054 <a class="anchor" href="#rpipff5dada0d9337904d720"></a>Function Documentation</h4>
5055 <a id="ga4ee772d4efa94ec03e2b2ae2f775837d" name="ga4ee772d4efa94ec03e2b2ae2f775837d"></a>
5057 <h5 id="rpip7c6f27e5cf71021fe0aa">
5058 <a class="anchor" href="#rpip7c6f27e5cf71021fe0aa"></a>◆ async_context_poll_init_with_defaults()</h5>
5059 <div class="memitem" id="rpip210603fa8b916a4e2413">
5060 <div class="memproto" id="rpip047ddbc51252d125ad94">
5061 <table class="memname" id="rpipe03ccd6568efbb94bb59">
5062 <tr id="rpip555e08b363565c04ed3e">
5063 <td class="memname" id="rpip94d48623cb61e27ffcd3">bool async_context_poll_init_with_defaults </td>
5064 <td id="rpip39011f2ca9993d0fcf5e">(</td>
5065 <td class="paramtype" id="rpip37240a537e148b431cff">
5066 <a class="el" href="structasync__context__poll.html" id="rpipb2557f558083536ac3a5">async_context_poll_t</a> *Â </td>
5067 <td class="paramname" id="rpipd82c1e52d878cdc5431b"><em id="rpipec3152278a809f453af5">self</em></td>
5068 <td id="rpip38591b53c9262ba422b8">)</td>
5069 <td id="rpip77f51c2176b1cd4561c7"></td>
5073 <div class="memdoc" id="rpip5e0c1530daa32f0eb10c">
5075 <p id="rpip44b0c0b2117ee9f72add">Initialize an <a class="el" href="structasync__context__poll.html" id="rpipa7f2eeac94bdf759c66d">async_context_poll</a> instance with default values. </p>
5076 <p id="rpip4b138fee3dc35a2fbb36">If this method succeeds (returns true), then the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipe41649792004569b30b2">async_context</a> is available for use and can be de-initialized by calling <a class="el" href="high_level.html#pico_async_context#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources." id="rpip0aecb7a82f703bccd814" data-adjusted="true">async_context_deinit()</a>.</p>
5077 <h4 id="rpip0156a53fb74bbb458477" data-parent-id="rpip9c198bb22c99ea767fd4" data-target-for="rpip0156a53fb74bbb458477">Parameters</h4>
5078 <p class="paragraph" id="rpipc5f8318b260b8e5d88f8" data-parent-id="rpip9c198bb22c99ea767fd4" data-target-for="rpipc5f8318b260b8e5d88f8">
5080 <table class="params" id="rpipf5d50207a59d85f9cf3f">
5081 <tr id="rpip518cf808b8c78cbc76f1">
5082 <td class="paramname" id="rpipeab3b92d2c4883ddc6fb">self</td>
5083 <td id="rpipebd3083b786b0e07b11b">a pointer to <a class="el" href="structasync__context__poll.html" id="rpipd0d7b16967e3f313c750">async_context_poll</a> structure to initialize </td>
5089 <h4 class="label" id="rpip6f121ed4401cba46e0bf" data-parent-id="rpip1711ca042238f9b53d24" data-target-for="rpip6f121ed4401cba46e0bf">Returns</h4>
5090 <p class="returns" id="rpip96d4437ddf60b3f3ee79" data-parent-id="rpip1711ca042238f9b53d24" data-target-for="rpip96d4437ddf60b3f3ee79">true if initialization is successful, false otherwise </p>
5098 <h3 id="async_context_threadsafe_background">
5099 <a class="anchor" href="#async_context_threadsafe_background"></a>async_context_threadsafe_background</h3>
5100 <div class="ingroups" id="rpip69bc499b4edcab85a75b">Part of: <a class="el" href="high_level.html" id="rpip3a695de5f25a411d0a02">High Level APIs</a> » <a class="el" href="high_level.html#pico_async_context" id="rpip656726ff996a48666a2c">pico_async_context</a>
5103 <h4 id="rpip58c7717931704615b6a0">
5104 <a class="anchor" href="#rpip58c7717931704615b6a0"></a>Functions</h4>
5105 <ul class="memberdecls" id="rpip673b20e05bd1adfd497e" data-parent-id="rpipd78eaf39a83241ddb277">
5106 <li class="memitem">
5107 <p data-target="true" data-target-for="rpip673b20e05bd1adfd497e"><span class="memItemLeft" data-target="true" id="rpipe52e50546ed1788b4ae4" data-parent-id="rpip673b20e05bd1adfd497e" data-target-for="rpipe52e50546ed1788b4ae4">bool </span><span class="memItemRight" data-target="true" id="rpipc372380107bab60929c2" data-parent-id="rpip673b20e05bd1adfd497e" data-target-for="rpipc372380107bab60929c2"><a class="el" href="#gabf48cafcbfa48c9fbef1aa7a18ded9e5" id="rpip68bcb90dba86b900e255" data-adjusted="true">async_context_threadsafe_background_init</a> (<a class="el" href="structasync__context__threadsafe__background.html" id="rpipb7f3c1f38c024e234b7b">async_context_threadsafe_background_t</a> *self, <a class="el" href="structasync__context__threadsafe__background__config.html" id="rpip3c5d29bc6f9cd3aec7ad">async_context_threadsafe_background_config_t</a> *config)</span></p>
5109 <li class="memdesc">
5110 <p data-target="true" data-target-for="rpip96ad53983ac754f45d4d"><span class="mdescLeft" data-target="true" id="rpipd297a6ab86f7a9f9600e" data-parent-id="rpip96ad53983ac754f45d4d" data-target-for="rpipd297a6ab86f7a9f9600e">Â </span><span class="mdescRight" data-target="true" id="rpip3fb1ab207aeba88526ec" data-parent-id="rpip96ad53983ac754f45d4d" data-target-for="rpip3fb1ab207aeba88526ec">Initialize an <a class="el" href="structasync__context__threadsafe__background.html" id="rpipef68d99893a65e97a094">async_context_threadsafe_background</a> instance using the specified configuration. <br id="rpipd1f7f021e277969a77e7"></span></p>
5112 <li class="memitem">
5113 <p data-target="true" data-target-for="rpip6f120bc6f7ef5a4cd4c4"><span class="memItemLeft" data-target="true" id="rpipeef0d1028523bcb0993f" data-parent-id="rpip6f120bc6f7ef5a4cd4c4" data-target-for="rpipeef0d1028523bcb0993f"><a class="el" href="structasync__context__threadsafe__background__config.html" id="rpip785a3a254b14191404e0">async_context_threadsafe_background_config_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip31ccfd290f0f0407b537" data-parent-id="rpip6f120bc6f7ef5a4cd4c4" data-target-for="rpip31ccfd290f0f0407b537"><a class="el" href="#gaf8eafbbac141e7f24e377c708ffa1479" id="rpipcf43d3f0d0d6be2d7727" data-adjusted="true">async_context_threadsafe_background_default_config</a> (void)</span></p>
5115 <li class="memdesc">
5116 <p data-target="true" data-target-for="rpipe04dc05c26c26db36ada"><span class="mdescLeft" data-target="true" id="rpip65a62ed022a633946980" data-parent-id="rpipe04dc05c26c26db36ada" data-target-for="rpip65a62ed022a633946980">Â </span><span class="mdescRight" data-target="true" id="rpip6013ef42b0d52e5c9304" data-parent-id="rpipe04dc05c26c26db36ada" data-target-for="rpip6013ef42b0d52e5c9304">Return a copy of the default configuration object used by <a class="el" href="#gab8bc5211f18cbc3a6817b1bf82020f8e" id="rpip4cf5786760001b6a7fe1" data-adjusted="true">async_context_threadsafe_background_init_with_defaults()</a> <br id="rpipe4f7d011b50a39e0a084"></span></p>
5118 <li class="memitem">
5119 <p data-target="true" data-target-for="rpip2940363ed3c04bd749fb"><span class="memItemLeft" data-target="true" id="rpip952ef6df1391702ad35a" data-parent-id="rpip2940363ed3c04bd749fb" data-target-for="rpip952ef6df1391702ad35a">static bool </span><span class="memItemRight" data-target="true" id="rpip99d3eb2ec3179245ca3e" data-parent-id="rpip2940363ed3c04bd749fb" data-target-for="rpip99d3eb2ec3179245ca3e"><a class="el" href="#gab8bc5211f18cbc3a6817b1bf82020f8e" id="rpip3ca087d17fff5ac59913" data-adjusted="true">async_context_threadsafe_background_init_with_defaults</a> (<a class="el" href="structasync__context__threadsafe__background.html" id="rpipad36b7c0f84526fd5222">async_context_threadsafe_background_t</a> *self)</span></p>
5121 <li class="memdesc">
5122 <p data-target="true" data-target-for="rpipea8fc8e5b53713b53e66"><span class="mdescLeft" data-target="true" id="rpipf7d5c0e0f97c42d724df" data-parent-id="rpipea8fc8e5b53713b53e66" data-target-for="rpipf7d5c0e0f97c42d724df">Â </span><span class="mdescRight" data-target="true" id="rpip8866d9b1173bf1d0cf55" data-parent-id="rpipea8fc8e5b53713b53e66" data-target-for="rpip8866d9b1173bf1d0cf55">Initialize an <a class="el" href="structasync__context__threadsafe__background.html" id="rpip15bae526a79b27a8cbe5">async_context_threadsafe_background</a> instance with default values. <br id="rpipb792fa028d8aa638a6a9"></span></p>
5125 <a name="details" id="details"></a>
5128 <h4 id="rpip7a878c0c85f00da28faa">
5129 <a class="anchor" href="#rpip7a878c0c85f00da28faa"></a>Detailed Description</h4>
5130 <p id="rpipf1b7b737f98d350c854f"><a class="el" href="structasync__context__threadsafe__background.html" id="rpip68c40cf76c9c9215235d">async_context_threadsafe_background</a> provides an implementation of <a class="el" href="structasync__context.html" id="rpipaa5cc6a23f031d7af190">async_context</a> that handles asynchronous work in a low priority IRQ, and there is no need for the user to poll for work.</p>
5131 <div class="admonitionblock note" id="rpip4e143ad63190ed1c67df" data-parent-id="rpip747c81a569af39ce3fc0"><table>
5132 <tr data-target="true" data-target-for="rpip4e143ad63190ed1c67df">
5133 <td class="icon" id="rpip7c66881b4a10bbf9bda7" data-parent-id="rpip4e143ad63190ed1c67df"><div class="title" data-target="true" data-target-for="rpip7c66881b4a10bbf9bda7">Note</div></td>
5134 <td class="content" id="rpip3cfb7ec426e1dc4ad308" data-parent-id="rpip4e143ad63190ed1c67df" data-target-for="rpip3cfb7ec426e1dc4ad308">The workers used with this <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipa49763c0532183db83b9">async_context</a> MUST be safe to call from an IRQ. </td>
5139 <h4 id="rpip6a31b1f3c7c30ca26c12">
5140 <a class="anchor" href="#rpip6a31b1f3c7c30ca26c12"></a>Function Documentation</h4>
5141 <a id="gaf8eafbbac141e7f24e377c708ffa1479" name="gaf8eafbbac141e7f24e377c708ffa1479"></a>
5143 <h5 id="rpip3c72aa21c6315ebba1da">
5144 <a class="anchor" href="#rpip3c72aa21c6315ebba1da"></a>◆ async_context_threadsafe_background_default_config()</h5>
5145 <div class="memitem" id="rpip677d32d963e403b3c13b">
5146 <div class="memproto" id="rpipdbbd097db11453d8e7ad">
5147 <table class="memname" id="rpipac15e61c2424c903eedb">
5148 <tr id="rpip50109b54f8fe5d304e4f">
5149 <td class="memname" id="rpipe3bb7c8c7f60a87147ba">
5150 <a class="el" href="structasync__context__threadsafe__background__config.html" id="rpiped1fde65d75b1fe309fe">async_context_threadsafe_background_config_t</a> async_context_threadsafe_background_default_config </td>
5151 <td id="rpipe5047e700c219991ee2e">(</td>
5152 <td class="paramtype" id="rpipda2df0efb06f5c9a4c5b">void </td>
5153 <td class="paramname" id="rpip80703e26d3ac10eae1c1"></td>
5154 <td id="rpip8fa4f05c165a08972ad0">)</td>
5155 <td id="rpip40d84dbe4c867f3e1461"></td>
5159 <div class="memdoc" id="rpip1b5f1d213bb42e720d13">
5161 <p id="rpipc60aca132c8545f57c80">Return a copy of the default configuration object used by <a class="el" href="#gab8bc5211f18cbc3a6817b1bf82020f8e" id="rpipd223778596dfc63f9b59" data-adjusted="true">async_context_threadsafe_background_init_with_defaults()</a> </p>
5162 <p id="rpipae59dddb0331d440bd0e">The caller can then modify just the settings it cares about, and call <a class="el" href="#gabf48cafcbfa48c9fbef1aa7a18ded9e5" id="rpip301cf5bcd366c766fdc4" data-adjusted="true">async_context_threadsafe_background_init()</a> </p>
5163 <h4 class="label" id="rpip8d78f1feee165621cb34" data-parent-id="rpipe98e5f3821122fb9392f" data-target-for="rpip8d78f1feee165621cb34">Returns</h4>
5164 <p class="returns" id="rpip500c4de1b1758c16a9bc" data-parent-id="rpipe98e5f3821122fb9392f" data-target-for="rpip500c4de1b1758c16a9bc">the default configuration object </p>
5168 <a id="gabf48cafcbfa48c9fbef1aa7a18ded9e5" name="gabf48cafcbfa48c9fbef1aa7a18ded9e5"></a>
5171 <h5 id="rpip35d61a9db2623fee203c">
5172 <a class="anchor" href="#rpip35d61a9db2623fee203c"></a>◆ async_context_threadsafe_background_init()</h5>
5173 <div class="memitem" id="rpip0cfe8cdd7b5e6c7d7f5f">
5174 <div class="memproto" id="rpip3233ca87cc53f28784f6">
5175 <table class="memname" id="rpip1743c8de1399a6201c0d">
5176 <tr id="rpip13dc18150c560a7a1a70">
5177 <td class="memname" id="rpip02d120ef3990a7693560">bool async_context_threadsafe_background_init </td>
5178 <td id="rpip7f0f0b807c593e4f8b75">(</td>
5179 <td class="paramtype" id="rpip181a1066a9d0b1168635">
5180 <a class="el" href="structasync__context__threadsafe__background.html" id="rpip26cc8511fc0b8497a019">async_context_threadsafe_background_t</a> *Â </td>
5181 <td class="paramname" id="rpipaa6ee3d4c4f8d22f3a1f">
5182 <em id="rpipd93821d352841a059058">self</em>, </td>
5184 <tr id="rpip3f1f57a4d2cf630613eb">
5185 <td class="paramkey" id="rpip82f702609d65a5fbc8f2"></td>
5186 <td id="rpip6bdcfb96f24a742e67c1"></td>
5187 <td class="paramtype" id="rpipc75da3c0f9db9a657830">
5188 <a class="el" href="structasync__context__threadsafe__background__config.html" id="rpipd6acc6fa0bfb609f7f9b">async_context_threadsafe_background_config_t</a> *Â </td>
5189 <td class="paramname" id="rpip24d0a4dd26900cd74921">
5190 <em id="rpip14cbfd8b506a51701ad4">config</em>Â </td>
5192 <tr id="rpip7ab9816a28c667431d65">
5193 <td id="rpip07149f42d4bf93e31813"></td>
5194 <td id="rpipbaeacde4aca4eb409273">)</td>
5195 <td id="rpip2a5f8a02027aa3580107"></td>
5196 <td id="rpip2310fe536e0bce8b47de"></td>
5200 <div class="memdoc" id="rpipe0611609afeda5777724">
5202 <p id="rpip9bf83fb4ef91e230cd6e">Initialize an <a class="el" href="structasync__context__threadsafe__background.html" id="rpip9a9e09ac279e617dac79">async_context_threadsafe_background</a> instance using the specified configuration. </p>
5203 <p id="rpipa42d4bd9b9c3effdc1ee">If this method succeeds (returns true), then the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpipb4fec0dbdd3cc2a53941">async_context</a> is available for use and can be de-initialized by calling <a class="el" href="high_level.html#pico_async_context#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources." id="rpip4d7e0040818bae8482c8" data-adjusted="true">async_context_deinit()</a>.</p>
5204 <h4 id="rpip92536999b36e435f7eeb" data-parent-id="rpip150634d5813cff576f89" data-target-for="rpip92536999b36e435f7eeb">Parameters</h4>
5205 <p class="paragraph" id="rpip8d0abfbc7d415ad97b1f" data-parent-id="rpip150634d5813cff576f89" data-target-for="rpip8d0abfbc7d415ad97b1f">
5207 <table class="params" id="rpip66052b094ad17a61904c">
5208 <tr id="rpipb18ec48d69a23e1d4269">
5209 <td class="paramname" id="rpip4fefc843b66e570e7af8">self</td>
5210 <td id="rpip9a8bbce6812c40f64b4e">a pointer to <a class="el" href="structasync__context__threadsafe__background.html" id="rpip1baa188d5d7aec57b2e3">async_context_threadsafe_background</a> structure to initialize </td>
5212 <tr id="rpip82ea7e73ab834a360556">
5213 <td class="paramname" id="rpip1948c457ea1087117c4e">config</td>
5214 <td id="rpip5d2d9753c7b79bda08ce">the configuration object specifying characteristics for the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip51f0456ce58656e86bc6">async_context</a> </td>
5220 <h4 class="label" id="rpip253ee3ee61740a805676" data-parent-id="rpipe25507f89a75ad4302a3" data-target-for="rpip253ee3ee61740a805676">Returns</h4>
5221 <p class="returns" id="rpipcda55d7e14d8f48a815c" data-parent-id="rpipe25507f89a75ad4302a3" data-target-for="rpipcda55d7e14d8f48a815c">true if initialization is successful, false otherwise </p>
5225 <a id="gab8bc5211f18cbc3a6817b1bf82020f8e" name="gab8bc5211f18cbc3a6817b1bf82020f8e"></a>
5228 <h5 id="rpip67fca7f56f860e1fa0cb">
5229 <a class="anchor" href="#rpip67fca7f56f860e1fa0cb"></a>◆ async_context_threadsafe_background_init_with_defaults()</h5>
5230 <div class="memitem" id="rpip6511e522cb2965b48d81">
5231 <div class="memproto" id="rpip1d830357d52423a9dc59">
5232 <table class="mlabels" id="rpipc940e91509809c4c1ab4">
5233 <tr id="rpip3b3c50b505a40c83c98f">
5234 <td class="mlabels-left" id="rpipaea791941c0d3aceb219">
5235 <table class="memname" id="rpip0bc9173fd5c4980e011c">
5236 <tr id="rpip1cf0d65668cc4d6bb2ad">
5237 <td class="memname" id="rpipb9b9b664098bca031024">static bool async_context_threadsafe_background_init_with_defaults </td>
5238 <td id="rpip792a444173ec8f768dce">(</td>
5239 <td class="paramtype" id="rpip8f01e4942970427debac">
5240 <a class="el" href="structasync__context__threadsafe__background.html" id="rpip9da01480a48740058780">async_context_threadsafe_background_t</a> *Â </td>
5241 <td class="paramname" id="rpip01a398d24bb256cfe1dc"><em id="rpip1fffc7254ec4573d9ed0">self</em></td>
5242 <td id="rpipa6dec9415c6176015922">)</td>
5243 <td id="rpipa1b57b0d07360447becb"></td>
5247 <td class="mlabels-right" id="rpipea6e316f892413083e2d">
5248 <span class="mlabels" id="rpip37d512ef601f05ec678d"><span class="mlabel" id="rpip3d603d54d95512c1ab2a">inline</span><span class="mlabel" id="rpip89f76d9c974e5d6572fe">static</span></span> </td>
5252 <div class="memdoc" id="rpipb241324a3028ada52d32">
5254 <p id="rpip5df2a7db015c6e83efaa">Initialize an <a class="el" href="structasync__context__threadsafe__background.html" id="rpip55db853e541cc1b6fa0d">async_context_threadsafe_background</a> instance with default values. </p>
5255 <p id="rpipaa12338a2bab485fb961">If this method succeeds (returns true), then the <a class="el" href="structasync__context.html" title="Base structure type of all async_contexts. For details about its use, see pico_async_context." id="rpip15b4a4d4d5c59335d678">async_context</a> is available for use and can be de-initialized by calling <a class="el" href="high_level.html#pico_async_context#ga66d09e106e04d70971d4fb6f09d5d949" title="End async_context processing, and free any resources." id="rpip18a1fdb03af107c7c783" data-adjusted="true">async_context_deinit()</a>.</p>
5256 <h4 id="rpip3acf2fe92d7ba5478371" data-parent-id="rpip04f567f8d1f0fa0baee6" data-target-for="rpip3acf2fe92d7ba5478371">Parameters</h4>
5257 <p class="paragraph" id="rpip3a28051fcf6483f1e6f1" data-parent-id="rpip04f567f8d1f0fa0baee6" data-target-for="rpip3a28051fcf6483f1e6f1">
5259 <table class="params" id="rpipf2c688244fa78a9dc442">
5260 <tr id="rpip6ecfa1baa2acb8ce3071">
5261 <td class="paramname" id="rpipd8e841c2be94e38b32ee">self</td>
5262 <td id="rpip8a3d7e88cf5288380ed0">a pointer to <a class="el" href="structasync__context__threadsafe__background.html" id="rpip46c47755ff54f601a498">async_context_threadsafe_background</a> structure to initialize </td>
5268 <h4 class="label" id="rpip03bb5532891c899a55e1" data-parent-id="rpip8adee29c12858a1e627d" data-target-for="rpip03bb5532891c899a55e1">Returns</h4>
5269 <p class="returns" id="rpipc9327f3e6b07a5f5ec58" data-parent-id="rpip8adee29c12858a1e627d" data-target-for="rpipc9327f3e6b07a5f5ec58">true if initialization is successful, false otherwise </p>
5278 <h2 id="pico_flash">
5279 <a class="anchor" href="#pico_flash"></a>pico_flash</h2>
5280 <div class="sectionbody"></div>
5281 <div class="ingroups" id="rpipb9cc577e9aad351693ee">Part of: <a class="el" href="high_level.html" id="rpip93c38e643a7faef6e666">High Level APIs</a>
5284 <h3 id="rpipcb13fd2e8f843c73e3be">
5285 <a class="anchor" href="#rpipcb13fd2e8f843c73e3be"></a>Functions</h3>
5286 <ul class="memberdecls" id="rpip52b04e5151af6b09cf7a" data-parent-id="rpip0c4616cf8bd4287d5f97">
5287 <li class="memitem">
5288 <p data-target="true" data-target-for="rpip52b04e5151af6b09cf7a"><span class="memItemLeft" data-target="true" id="rpip15ba7d03ef03febadcc3" data-parent-id="rpip52b04e5151af6b09cf7a" data-target-for="rpip15ba7d03ef03febadcc3">bool </span><span class="memItemRight" data-target="true" id="rpipfe52f38922d323d1efc1" data-parent-id="rpip52b04e5151af6b09cf7a" data-target-for="rpipfe52f38922d323d1efc1"><a class="el" href="#ga2ad3247806ca16dec03e655eaec1775f" id="rpip6a1f695beae4a7ec3a0a" data-adjusted="true">flash_safe_execute_core_init</a> (void)</span></p>
5290 <li class="memitem">
5291 <p data-target="true" data-target-for="rpipf3e7accccbe59c427018"><span class="memItemLeft" data-target="true" id="rpip681347a5b8d2bb06f934" data-parent-id="rpipf3e7accccbe59c427018" data-target-for="rpip681347a5b8d2bb06f934">bool </span><span class="memItemRight" data-target="true" id="rpip87b8210303549358a6cb" data-parent-id="rpipf3e7accccbe59c427018" data-target-for="rpip87b8210303549358a6cb"><a class="el" href="#gaed14b762cb5fd483995bd36fc8ad338d" id="rpip5d87f979780599845eee" data-adjusted="true">flash_safe_execute_core_deinit</a> (void)</span></p>
5293 <li class="memitem">
5294 <p data-target="true" data-target-for="rpip09d1bb047caa987fa071"><span class="memItemLeft" data-target="true" id="rpip050c6d1d821b5cb71c62" data-parent-id="rpip09d1bb047caa987fa071" data-target-for="rpip050c6d1d821b5cb71c62">int </span><span class="memItemRight" data-target="true" id="rpip1fb8e7b072c199bdeb7f" data-parent-id="rpip09d1bb047caa987fa071" data-target-for="rpip1fb8e7b072c199bdeb7f"><a class="el" href="#ga679076dc10c5beb73d5f1abdb52d6735" id="rpip94277016ffc61ce7a2de" data-adjusted="true">flash_safe_execute</a> (void(*func)(void *), void *param, uint32_t enter_exit_timeout_ms)</span></p>
5296 <li class="memitem">
5297 <p data-target="true" data-target-for="rpipc04cea2cb8186f71fed7"><span class="memItemLeft" data-target="true" id="rpip64305213e1b3e204511c" data-parent-id="rpipc04cea2cb8186f71fed7" data-target-for="rpip64305213e1b3e204511c"><a class="el" href="structflash__safety__helper__t.html" id="rpip168a4b307da4196c570e">flash_safety_helper_t</a> *Â </span><span class="memItemRight" data-target="true" id="rpipec2d857cdd2a312e22ae" data-parent-id="rpipc04cea2cb8186f71fed7" data-target-for="rpipec2d857cdd2a312e22ae"><a class="el" href="#gaee44bd9bc42463f0521535825e8d90b2" id="rpip851ed73ca7b281f353c7" data-adjusted="true">get_flash_safety_helper</a> (void)</span></p>
5300 <a name="details" id="details"></a>
5303 <h3 id="rpip757f4a42c3de3c0b5283">
5304 <a class="anchor" href="#rpip757f4a42c3de3c0b5283"></a>Detailed Description</h3>
5305 <p id="rpip2af51cba4d15a4208a56">High level flash API</p>
5306 <p id="rpipd38124c2daca1125e04a">Flash cannot be erased or written to when in XIP mode. However the system cannot directly access memory in the flash address space when not in XIP mode.</p>
5307 <p id="rpipd419d7a9b52c9870fe72">It is therefore critical that no code or data is being read from flash while flash is been written or erased.</p>
5308 <p id="rpipaedd70082c3a30c845f1">If only one core is being used, then the problem is simple - just disable interrupts; however if code is running on the other core, then it has to be asked, nicely, to avoid flash for a bit. This is hard to do if you don't have complete control of the code running on that core at all times.</p>
5309 <p id="rpipca50c31a5f31378e5bcc">This library provides a <a class="el" href="#ga679076dc10c5beb73d5f1abdb52d6735" id="rpipa3d961ce69992feed236" data-adjusted="true">flash_safe_execute</a> method which calls a function back having sucessfully gotten into a state where interrupts are disabled, and the other core is not executing or reading from flash.</p>
5310 <p id="rpip4342ccd6a2cddf790357">How it does this is dependent on the supported environment (Free RTOS SMP or pico_multicore). Additionally the user can provide their own mechanism by providing a strong definition of <a class="el" href="#gaee44bd9bc42463f0521535825e8d90b2" id="rpipe3854e0c8e1644b15990" data-adjusted="true">get_flash_safety_helper()</a>.</p>
5311 <p id="rpipa75608470d1b3c24ef3e">Using the default settings, flash_safe_execute will only call the callback function if the state is safe otherwise returning an error (or an assert depending on PICO_FLASH_ASSERT_ON_UNSAFE).</p>
5312 <p id="rpip87281055f2c07f6e4bfa">There are conditions where safety would not be guaranteed:</p>
5313 <ol type="1" id="rpipbca5069218fde1c2cc07">
5314 <li id="rpipfa08f39468e043bb09a1"><p>FreeRTOS smp with <code id="rpip68401f63a32f70c88470">configNUM_CORES=1</code> - FreeRTOS still uses pico_multicore in this case, so <a class="el" href="#ga679076dc10c5beb73d5f1abdb52d6735" id="rpip5b29140b401a0002680f" data-adjusted="true">flash_safe_execute</a> cannot know what the other core is doing, and there is no way to force code execution between a FreeRTOS core and a non FreeRTOS core.</p></li>
5315 <li id="rpip7a8c6150996b11343fb5"><p>FreeRTOS non SMP with pico_multicore - Again, there is no way to force code execution between a FreeRTOS core and a non FreeRTOS core.</p></li>
5316 <li id="rpipf5f064f7fff907bfd917"><p>pico_multicore without <a class="el" href="#ga2ad3247806ca16dec03e655eaec1775f" id="rpip5ab6055d4da929aada86" data-adjusted="true">flash_safe_execute_core_init()</a> having been called on the other core - The <a class="el" href="#ga679076dc10c5beb73d5f1abdb52d6735" id="rpip8a85731c7a67f009e840" data-adjusted="true">flash_safe_execute</a> method does not know if code is executing on the other core, so it has to assume it is. Either way, it is not able to intervene if <a class="el" href="#ga2ad3247806ca16dec03e655eaec1775f" id="rpipaa018ab8e628adc50990" data-adjusted="true">flash_safe_execute_core_init()</a> has not been called on the other core.</p></li>
5318 <p id="rpip048a6ec682ef070f5d21">Fortunately, all is not lost in this situation, you may:</p>
5319 <div class="ulist" id="rpip33686b0bca12437dc647" data-parent-id="rpip6c842d9f8146a5a2f972">
5320 <ul data-target="true" data-target-for="rpip33686b0bca12437dc647">
5321 <li id="rpip5a95dc488d4ae2e7be7c"><p>Set PICO_FLASH_ASSUME_CORE0_SAFE=1 to explicitly say that core 0 is never using flash.</p></li>
5322 <li id="rpipeaf02586474b834fc61b"><p>Set PICO_FLASH_ASSUME_CORE1_SAFE=1 to explicitly say that core 1 is never using flash. </p></li>
5327 <h3 id="rpip984b61938ec2fe82b216">
5328 <a class="anchor" href="#rpip984b61938ec2fe82b216"></a>Function Documentation</h3>
5329 <a id="ga679076dc10c5beb73d5f1abdb52d6735" name="ga679076dc10c5beb73d5f1abdb52d6735"></a>
5331 <h4 id="rpip6d8e2df65b24b8db1bef">
5332 <a class="anchor" href="#rpip6d8e2df65b24b8db1bef"></a>◆ flash_safe_execute()</h4>
5333 <div class="memitem" id="rpipa823eab4a9fa3934ca88">
5334 <div class="memproto" id="rpip64faa5f6d4cd7b779240">
5335 <table class="memname" id="rpipbb9c5af5ec84976c526f">
5336 <tr id="rpip31bba136ad03da4d25d6">
5337 <td class="memname" id="rpipd1ffb31860dac225f8f8">int flash_safe_execute </td>
5338 <td id="rpip953b4e2120142338c3cc">(</td>
5339 <td class="paramtype" id="rpipe22261fdaa38cb2c953c">void(*)(void *)Â </td>
5340 <td class="paramname" id="rpipe111793b93a19b5c19ff">
5341 <em id="rpipfd7b2ef6690a6b614588">func</em>, </td>
5343 <tr id="rpipe1e761043785f756aab5">
5344 <td class="paramkey" id="rpip123c6a02f9eb5488f8ea"></td>
5345 <td id="rpipe0e09f3e012865686917"></td>
5346 <td class="paramtype" id="rpip6904e98db1d8d1abf055">void *Â </td>
5347 <td class="paramname" id="rpipd338e582aafbb09bdf81">
5348 <em id="rpipcbc3780e902385009c08">param</em>, </td>
5350 <tr id="rpipf90df5820e28f841ec73">
5351 <td class="paramkey" id="rpipd2f4e7ccc8eec13a32af"></td>
5352 <td id="rpip48ae2ea0f530e57447d4"></td>
5353 <td class="paramtype" id="rpipdc577595e65943a38a09">uint32_t </td>
5354 <td class="paramname" id="rpipf938e0c34bc0f208d3e4">
5355 <em id="rpip6217aaae12b6d56617d6">enter_exit_timeout_ms</em>Â </td>
5357 <tr id="rpip60ba6f9d6631e866ab41">
5358 <td id="rpip42114281d2840573e5f5"></td>
5359 <td id="rpip42aaebbfec35167bb316">)</td>
5360 <td id="rpip29d8109fc7334477884e"></td>
5361 <td id="rpip42cc43d0f0cd730af0d8"></td>
5365 <div class="memdoc" id="rpipd47a6d0928255da285cf">
5366 <p id="rpip618e76420e4da70033c0">Execute a function with IRQs disabled and with the other core also not executing/reading flash</p>
5367 <h4 id="rpip94772ab97cfc6d00b4fa" data-parent-id="rpip57d28f942674a77ce628" data-target-for="rpip94772ab97cfc6d00b4fa">Parameters</h4>
5368 <p class="paragraph" id="rpip54f99586fc6e3cffb458" data-parent-id="rpip57d28f942674a77ce628" data-target-for="rpip54f99586fc6e3cffb458">
5370 <table class="params" id="rpipf9510729ec43222de1e2">
5371 <tr id="rpipff2218eba9495b0f6d4a">
5372 <td class="paramname" id="rpip48cc10af6c2f7deaf904">func</td>
5373 <td id="rpip2e352119a8fc967de42e">the function to call </td>
5375 <tr id="rpipefe4826aa277ab3bbf14">
5376 <td class="paramname" id="rpip091a797d562549397305">param</td>
5377 <td id="rpipbe58f2c660cf040f7fe1">the parameter to pass to the function </td>
5379 <tr id="rpip470fab8787f034e43756">
5380 <td class="paramname" id="rpip062b65dbfbfebfa8b0c5">enter_exit_timeout_ms</td>
5381 <td id="rpip336d4e66d6ffdeafef65">the timeout for each of the enter/exit phases when coordinating with the other core</td>
5387 <h4 class="label" id="rpipfcd77da75dcdb53ac3af" data-parent-id="rpip9d35a5b168030c776de5" data-target-for="rpipfcd77da75dcdb53ac3af">Returns</h4>
5388 <p class="returns" id="rpip15724649ceb715ef8a63" data-parent-id="rpip9d35a5b168030c776de5" data-target-for="rpip15724649ceb715ef8a63">PICO_OK on success (the function will have been called). PICO_TIMEOUT on timeout (the function may have been called). PICO_ERROR_NOT_PERMITTED if safe execution is not possible (the function will not have been called). PICO_ERROR_INSUFFICIENT_RESOURCES if the method fails due to dynamic resource exhaustion (the function will not have been called) </p>
5389 <div class="admonitionblock note" id="rpipeed87cf6d52246ca4f1b" data-parent-id="rpipd47a6d0928255da285cf"><table>
5390 <tr data-target="true" data-target-for="rpipeed87cf6d52246ca4f1b">
5391 <td class="icon" id="rpip3e66c4cd2b78e850fda2" data-parent-id="rpipeed87cf6d52246ca4f1b"><div class="title" data-target="true" data-target-for="rpip3e66c4cd2b78e850fda2">Note</div></td>
5392 <td class="content" id="rpip24d038b9080105d77489" data-parent-id="rpipeed87cf6d52246ca4f1b" data-target-for="rpip24d038b9080105d77489">if PICO_FLASH_ASSERT_ON_UNSAFE is 1, this function will assert in debug mode vs returning PICO_ERROR_NOT_PERMITTED </td>
5399 <a id="gaed14b762cb5fd483995bd36fc8ad338d" name="gaed14b762cb5fd483995bd36fc8ad338d"></a>
5402 <h4 id="rpip342cd1e526ca8ecdb1d4">
5403 <a class="anchor" href="#rpip342cd1e526ca8ecdb1d4"></a>◆ flash_safe_execute_core_deinit()</h4>
5404 <div class="memitem" id="rpip7c22b44333ecc472da6f">
5405 <div class="memproto" id="rpip99fd6ad339216ef53a20">
5406 <table class="memname" id="rpip5f85de88b95526d7745d">
5407 <tr id="rpipf7bcc55038f41b85566f">
5408 <td class="memname" id="rpip847d8621205dceaafafa">bool flash_safe_execute_core_deinit </td>
5409 <td id="rpipd6f4d94b076a6a52ca6c">(</td>
5410 <td class="paramtype" id="rpip591f265dad60c58bc36d">void </td>
5411 <td class="paramname" id="rpip336cd99635f835c917ee"></td>
5412 <td id="rpip1824e0890ed70ea1e73f">)</td>
5413 <td id="rpip65f984890cdef91fa251"></td>
5417 <div class="memdoc" id="rpipd1f9f5e9f6af795cadf2">
5418 <p id="rpip04a419e0f0eef7c7393f">De-initialize work done by <a class="el" href="#ga2ad3247806ca16dec03e655eaec1775f" id="rpipde170c11ade5e8a7cf61" data-adjusted="true">flash_safe_execute_core_init</a></p>
5419 <h4 class="label" id="rpip04acfddb61cff27bb8e5" data-parent-id="rpipeb4c24444cba717fa2c1" data-target-for="rpip04acfddb61cff27bb8e5">Returns</h4>
5420 <p class="returns" id="rpipd971733985c9508bbc80" data-parent-id="rpipeb4c24444cba717fa2c1" data-target-for="rpipd971733985c9508bbc80">true on success </p>
5424 <a id="ga2ad3247806ca16dec03e655eaec1775f" name="ga2ad3247806ca16dec03e655eaec1775f"></a>
5427 <h4 id="rpipac01e787f6fb52d8827b">
5428 <a class="anchor" href="#rpipac01e787f6fb52d8827b"></a>◆ flash_safe_execute_core_init()</h4>
5429 <div class="memitem" id="rpip1507cb158a1cd6b6f231">
5430 <div class="memproto" id="rpip62024ccbc01f0426d91f">
5431 <table class="memname" id="rpip86d6976d9785fea3322e">
5432 <tr id="rpip8440b7ae667b7ab6c71f">
5433 <td class="memname" id="rpipef5a79ef7c1795fa6245">bool flash_safe_execute_core_init </td>
5434 <td id="rpip23a11f926a8898b76430">(</td>
5435 <td class="paramtype" id="rpip8d0fd5462b62f8e88926">void </td>
5436 <td class="paramname" id="rpip2a4139562d01cd20dcd9"></td>
5437 <td id="rpip7c322c7f664cad171eb1">)</td>
5438 <td id="rpip3fce491c9ff43b8c0279"></td>
5442 <div class="memdoc" id="rpip968a722fd60338ad0590">
5443 <p id="rpip7ed74c0e70858a32606d">Initialize a core such that the other core can lock it out during <a class="el" href="#ga679076dc10c5beb73d5f1abdb52d6735" id="rpip5bca3cc571d321a1796b" data-adjusted="true">flash_safe_execute</a>.</p>
5444 <div class="admonitionblock note" id="rpip196fd9e389fcd5c1307f" data-parent-id="rpip968a722fd60338ad0590"><table>
5445 <tr data-target="true" data-target-for="rpip196fd9e389fcd5c1307f">
5446 <td class="icon" id="rpip16992a440f094c02ec8a" data-parent-id="rpip196fd9e389fcd5c1307f"><div class="title" data-target="true" data-target-for="rpip16992a440f094c02ec8a">Note</div></td>
5447 <td class="content" id="rpip87f6fb4a0ac70df45a08" data-parent-id="rpip196fd9e389fcd5c1307f" data-target-for="rpip87f6fb4a0ac70df45a08">This is not necessary for FreeRTOS SMP, but should be used when launching via <a class="el" href="high_level.html#ga46ea5e2efc181aba1d4d1de06a375c59" id="rpipd94d0aff31bd9e89a073" data-adjusted="true">multicore_launch_core1</a> </td>
5450 <h4 class="label" id="rpipe9e5895eea6ab01d4ff1" data-parent-id="rpipf3bceeac216e0af91008" data-target-for="rpipe9e5895eea6ab01d4ff1">Returns</h4>
5451 <p class="returns" id="rpip41e0f5803052cb4edef3" data-parent-id="rpipf3bceeac216e0af91008" data-target-for="rpip41e0f5803052cb4edef3">true on success; there is no need to call <a class="el" href="#gaed14b762cb5fd483995bd36fc8ad338d" id="rpip07aebd80e15449377a42" data-adjusted="true">flash_safe_execute_core_deinit()</a> on failure. </p>
5455 <a id="gaee44bd9bc42463f0521535825e8d90b2" name="gaee44bd9bc42463f0521535825e8d90b2"></a>
5458 <h4 id="rpip7254e989c4cc1d7d766b">
5459 <a class="anchor" href="#rpip7254e989c4cc1d7d766b"></a>◆ get_flash_safety_helper()</h4>
5460 <div class="memitem" id="rpipb79f68f6dc1e6a40e59d">
5461 <div class="memproto" id="rpipcd4bdf520c1c1de8ff2d">
5462 <table class="memname" id="rpip309fcb485c2dfe328b0c">
5463 <tr id="rpip82d8d9be5774bcb7e978">
5464 <td class="memname" id="rpipa7f16fcb968cd265b70d">
5465 <a class="el" href="structflash__safety__helper__t.html" id="rpip5a84cf9eaf8e79463e8b">flash_safety_helper_t</a> * get_flash_safety_helper </td>
5466 <td id="rpipdc1f827e88745e503851">(</td>
5467 <td class="paramtype" id="rpip4cc0fc6ae8e5f8210247">void </td>
5468 <td class="paramname" id="rpip02d2c51f448eaa58b228"></td>
5469 <td id="rpip9455f5a32a3e48a55334">)</td>
5470 <td id="rpipc5bbb272134083d26dce"></td>
5474 <div class="memdoc" id="rpip7a8a4f40aa813defcd7b">
5475 <p id="rpip4312fc0b197a88829338">Internal method to return the flash safety helper implementation.</p>
5476 <p id="rpipd1e7aea23ac38b6bc89e">Advanced users can provide their own implementation of this function to perform different inter-core coordination before disabling XIP mode.</p>
5477 <h4 class="label" id="rpipa30a705b53fbbef2c726" data-parent-id="rpip409185e5c99e0cefebeb" data-target-for="rpipa30a705b53fbbef2c726">Returns</h4>
5478 <p class="returns" id="rpip3242674508f66a255639" data-parent-id="rpip409185e5c99e0cefebeb" data-target-for="rpip3242674508f66a255639">the <a class="el" href="structflash__safety__helper__t.html" id="rpipe8072ec3aceaf4b499f5">flash_safety_helper_t</a> </p>
5486 <h2 id="pico_i2c_slave">
5487 <a class="anchor" href="#pico_i2c_slave"></a>pico_i2c_slave</h2>
5488 <div class="sectionbody"></div>
5489 <div class="ingroups" id="rpip597e4041e5600bb01618">Part of: <a class="el" href="high_level.html" id="rpipa987c8e09b1aeceee312">High Level APIs</a>
5492 <h3 id="rpipff46d0780fe042bf707c">
5493 <a class="anchor" href="#rpipff46d0780fe042bf707c"></a>Typedefs</h3>
5494 <ul class="memberdecls" id="rpip6579a8e23ae8aba4655d" data-parent-id="rpip46adefa432175f0b8b58">
5495 <li class="memitem">
5496 <p data-target="true" data-target-for="rpip6579a8e23ae8aba4655d"><span class="memItemLeft" data-target="true" id="rpip6e89053f09b2a24000c9" data-parent-id="rpip6579a8e23ae8aba4655d" data-target-for="rpip6e89053f09b2a24000c9"><a id="ga8d4821831a9a533b701eca1016021c33" name="ga8d4821831a9a533b701eca1016021c33"></a>
5497 typedef enum <a class="el" href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpipbde689cf9e7c435a6220" data-adjusted="true">i2c_slave_event_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipadfb1d606a35dfd902e8" data-parent-id="rpip6579a8e23ae8aba4655d" data-target-for="rpipadfb1d606a35dfd902e8"><b id="rpipa45fbc862ef18247c625">i2c_slave_event_t</b></span></p>
5499 <li class="memdesc">
5500 <p data-target="true" data-target-for="rpip4b97ab25b097c220733a"><span class="mdescLeft" data-target="true" id="rpipc7eafa3ac36b9df6006b" data-parent-id="rpip4b97ab25b097c220733a" data-target-for="rpipc7eafa3ac36b9df6006b">Â </span><span class="mdescRight" data-target="true" id="rpip96491cc48e18688a5d98" data-parent-id="rpip4b97ab25b097c220733a" data-target-for="rpip96491cc48e18688a5d98">I2C slave event types. <br id="rpipba1780e42d3b8a01c125"></span></p>
5502 <li class="memitem">
5503 <p data-target="true" data-target-for="rpip912ae310697622ffc074"><span class="memItemLeft" data-target="true" id="rpipad93615cea6743f4583c" data-parent-id="rpip912ae310697622ffc074" data-target-for="rpipad93615cea6743f4583c">typedef void(*Â </span><span class="memItemRight" data-target="true" id="rpipb29326b9a70f53ee4148" data-parent-id="rpip912ae310697622ffc074" data-target-for="rpipb29326b9a70f53ee4148"><a class="el" href="#gaf1bb7bb1e79c309b290bf0e8ccd57dff" id="rpip139021b2fdf21953553a" data-adjusted="true">i2c_slave_handler_t</a>) (<a class="el" href="structi2c__inst.html" id="rpip4aff9da7c7ca61f0571b">i2c_inst_t</a> *i2c, <a class="el" href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpip73bcba854d07308783fe" data-adjusted="true">i2c_slave_event_t</a> event)</span></p>
5505 <li class="memdesc">
5506 <p data-target="true" data-target-for="rpip87664231fc85fbc5e8f1"><span class="mdescLeft" data-target="true" id="rpipbd8d537bf38e1fad0ea9" data-parent-id="rpip87664231fc85fbc5e8f1" data-target-for="rpipbd8d537bf38e1fad0ea9">Â </span><span class="mdescRight" data-target="true" id="rpip021a1b8c8c4c68672c9e" data-parent-id="rpip87664231fc85fbc5e8f1" data-target-for="rpip021a1b8c8c4c68672c9e">I2C slave event handler. <br id="rpip5e303a9a3679274caecf"></span></p>
5511 <h3 id="rpip44c693c1c2d88aff02f4">
5512 <a class="anchor" href="#rpip44c693c1c2d88aff02f4"></a>Enumerations</h3>
5513 <ul class="memberdecls" id="rpipc1819bc3ca2a506aec42" data-parent-id="rpip4af4422d9b760854ec56">
5514 <li class="memitem">
5515 <p data-target="true" data-target-for="rpipc1819bc3ca2a506aec42"><span class="memItemLeft" data-target="true" id="rpip8cb97c90e220d2cd7aa0" data-parent-id="rpipc1819bc3ca2a506aec42" data-target-for="rpip8cb97c90e220d2cd7aa0">enum  </span><span class="memItemRight" data-target="true" id="rpipe65272670f39c577fc32" data-parent-id="rpipc1819bc3ca2a506aec42" data-target-for="rpipe65272670f39c577fc32"><a class="el" href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpipc8669b127ccd2377603c" data-adjusted="true">i2c_slave_event_t</a> { <a class="el" href="#ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca7bc1a9bb9db707479c140a49c4d62a51" id="rpip0283e41b9d504032edae" data-adjusted="true">I2C_SLAVE_RECEIVE</a>
5516 , <a class="el" href="#ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca495a6f0ce75738519ac201349ac38c22" id="rpip62e0a8173748e75bc2be" data-adjusted="true">I2C_SLAVE_REQUEST</a>
5517 , <a class="el" href="#ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca857dc8c139941a8f8bb6888a84e4b83f" id="rpip0a6596b58c87cfb96abf" data-adjusted="true">I2C_SLAVE_FINISH</a>
5520 <li class="memdesc">
5521 <p data-target="true" data-target-for="rpip776acea66ff776ff9cb8"><span class="mdescLeft" data-target="true" id="rpip8303fccb459d7a0e311c" data-parent-id="rpip776acea66ff776ff9cb8" data-target-for="rpip8303fccb459d7a0e311c">Â </span><span class="mdescRight" data-target="true" id="rpip07add26d40651274ce52" data-parent-id="rpip776acea66ff776ff9cb8" data-target-for="rpip07add26d40651274ce52">I2C slave event types. <a href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpipba6402a9a8d871107534" data-adjusted="true">More...</a><br id="rpip3d0f7e2abac0f1b48fa1"></span></p>
5526 <h3 id="rpip7d4e1982831b9d4bc1be">
5527 <a class="anchor" href="#rpip7d4e1982831b9d4bc1be"></a>Functions</h3>
5528 <ul class="memberdecls" id="rpipa035d63282c2002b8410" data-parent-id="rpip4fc6ff3d5d6792a046e1">
5529 <li class="memitem">
5530 <p data-target="true" data-target-for="rpipa035d63282c2002b8410"><span class="memItemLeft" data-target="true" id="rpip12363e51c61b718378f1" data-parent-id="rpipa035d63282c2002b8410" data-target-for="rpip12363e51c61b718378f1">void </span><span class="memItemRight" data-target="true" id="rpipd53fcf27fe476f5fb464" data-parent-id="rpipa035d63282c2002b8410" data-target-for="rpipd53fcf27fe476f5fb464"><a class="el" href="#ga2ecc43ff4a3c673a704d0c7bd7d91db4" id="rpipe26cd7d7f8fba6166725" data-adjusted="true">i2c_slave_init</a> (<a class="el" href="structi2c__inst.html" id="rpip012cb7e3692eba5f2c79">i2c_inst_t</a> *i2c, uint8_t address, <a class="el" href="#gaf1bb7bb1e79c309b290bf0e8ccd57dff" id="rpipbf844f234fef354dcd33" data-adjusted="true">i2c_slave_handler_t</a> handler)</span></p>
5532 <li class="memdesc">
5533 <p data-target="true" data-target-for="rpip1a41ef30ba77a929a6d8"><span class="mdescLeft" data-target="true" id="rpip51a2aba901de9aa71a98" data-parent-id="rpip1a41ef30ba77a929a6d8" data-target-for="rpip51a2aba901de9aa71a98">Â </span><span class="mdescRight" data-target="true" id="rpipf5105c0bb15e5b8d73af" data-parent-id="rpip1a41ef30ba77a929a6d8" data-target-for="rpipf5105c0bb15e5b8d73af">Configure an I2C instance for slave mode. <br id="rpip4f249f834cb2793fe238"></span></p>
5535 <li class="memitem">
5536 <p data-target="true" data-target-for="rpipfd767cb61d8aac957dd0"><span class="memItemLeft" data-target="true" id="rpip57e298ac7c572431a27e" data-parent-id="rpipfd767cb61d8aac957dd0" data-target-for="rpip57e298ac7c572431a27e">void </span><span class="memItemRight" data-target="true" id="rpip4ff7a55d2b4a71cf778c" data-parent-id="rpipfd767cb61d8aac957dd0" data-target-for="rpip4ff7a55d2b4a71cf778c"><a class="el" href="#gaebbea8f5a707f23750ba3e0c8b5eb6ee" id="rpipb6799925fb12394b41ed" data-adjusted="true">i2c_slave_deinit</a> (<a class="el" href="structi2c__inst.html" id="rpip852d4508b0f8e8e78df6">i2c_inst_t</a> *i2c)</span></p>
5538 <li class="memdesc">
5539 <p data-target="true" data-target-for="rpip1dda140dcfef67500046"><span class="mdescLeft" data-target="true" id="rpipd5b861d45801bb01c893" data-parent-id="rpip1dda140dcfef67500046" data-target-for="rpipd5b861d45801bb01c893">Â </span><span class="mdescRight" data-target="true" id="rpip908ed5498b3dce1c93cd" data-parent-id="rpip1dda140dcfef67500046" data-target-for="rpip908ed5498b3dce1c93cd">Restore an I2C instance to master mode. <br id="rpip3f9faf889567b781ea2f"></span></p>
5542 <a name="details" id="details"></a>
5545 <h3 id="rpip9e01d206b833ed2d2422">
5546 <a class="anchor" href="#rpip9e01d206b833ed2d2422"></a>Detailed Description</h3>
5547 <p id="rpip22e4d198f85515059923">Functions providing an interrupt driven I2C slave interface.</p>
5548 <p id="rpipabc8401fbd6122df32d3">This I2C slave helper library configures slave mode and hooks the relevant I2C IRQ so that a user supplied handler is called with enumerated I2C events.</p>
5549 <p id="rpipdb9191dcba850928291a">An example application <code id="rpipaaa6956a1330236f04cc">slave_mem_i2c</code>, which makes use of this library, can be found in <a href="https://github.com/raspberrypi/pico-examples/blob/master/i2c/slave_mem_i2c/slave_mem_i2c.c" id="rpipc29078cb1b79748691b8">pico_examples</a>. </p>
5552 <h3 id="rpip64a0102e835d7a4aae09">
5553 <a class="anchor" href="#rpip64a0102e835d7a4aae09"></a>Typedef Documentation</h3>
5554 <a id="gaf1bb7bb1e79c309b290bf0e8ccd57dff" name="gaf1bb7bb1e79c309b290bf0e8ccd57dff"></a>
5556 <h4 id="rpipb936ac47ef1712bcbf40">
5557 <a class="anchor" href="#rpipb936ac47ef1712bcbf40"></a>◆ i2c_slave_handler_t</h4>
5558 <div class="memitem" id="rpipd35b7facee67a496e195">
5559 <div class="memproto" id="rpipe4cc67a6b5e2c0cf719a">
5560 <table class="memname" id="rpip5b592e7458031d833b47">
5561 <tr id="rpipf66f716ba5eff71f869c">
5562 <td class="memname" id="rpip6f8ae03979bfdcba5e06">typedef void(* i2c_slave_handler_t) (<a class="el" href="structi2c__inst.html" id="rpipbb91529157518942b846">i2c_inst_t</a> *i2c, <a class="el" href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpip0161f0d7a91f4b7ac5fb" data-adjusted="true">i2c_slave_event_t</a> event)</td>
5566 <div class="memdoc" id="rpip68f42ac663855caa02f5">
5568 <p id="rpip66f15455bcb7f36c12ac">I2C slave event handler. </p>
5569 <p id="rpip3c25c7892e1a4f28190e">The event handler will run from the I2C ISR, so it should return quickly (under 25 us at 400 kb/s). Avoid blocking inside the handler and split large data transfers across multiple calls for best results. When sending data to master, up to <a class="el" href="hardware.html#ga93f40022189e591521dd0ae5e29708ff" id="rpip44fab80e445291c80d3a" data-adjusted="true">i2c_get_write_available()</a> bytes can be written without blocking. When receiving data from master, up to <a class="el" href="hardware.html#ga5df361f77f110bbc2b63baa999507bde" id="rpip7a6825962b72a8340d68" data-adjusted="true">i2c_get_read_available()</a> bytes can be read without blocking.</p>
5570 <h4 id="rpipc225190eb830b9f43a33" data-parent-id="rpip09ad53559d6913b1abab" data-target-for="rpipc225190eb830b9f43a33">Parameters</h4>
5571 <p class="paragraph" id="rpip4242629eaff775ad7407" data-parent-id="rpip09ad53559d6913b1abab" data-target-for="rpip4242629eaff775ad7407">
5573 <table class="params" id="rpip96f4e06832c67776f596">
5574 <tr id="rpip813efd2d95a8aec03955">
5575 <td class="paramname" id="rpipdb87c980532e3e52691a">i2c</td>
5576 <td id="rpip105291cb883e383e78cf">Either <a class="el" href="rp2__common_2hardware__i2c_2include_2hardware_2i2c_8h.html#a46204d38a512926541fd8bac2b62c720" id="rpipd384edf6ba11ab0303a6" data-adjusted="true">i2c0</a> or <a class="el" href="rp2__common_2hardware__i2c_2include_2hardware_2i2c_8h.html#a87659b485d9e76dfc3bcef208ac4b573" id="rpip92fb63b95d3b5784a8de" data-adjusted="true">i2c1</a> </td>
5578 <tr id="rpip3071d65898b2728c984f">
5579 <td class="paramname" id="rpipf18b52754e7bea14a729">event</td>
5580 <td id="rpipf521a1a0f90e533a35ca">Event type. </td>
5592 <h3 id="rpipafb978c9dd3ec6082f80">
5593 <a class="anchor" href="#rpipafb978c9dd3ec6082f80"></a>Enumeration Type Documentation</h3>
5594 <a id="gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" name="gad8b613f0d4e9d1b9511ca0b6d6ab7e8c"></a>
5596 <h4 id="rpip08ec79dc4f82bb8007c4">
5597 <a class="anchor" href="#rpip08ec79dc4f82bb8007c4"></a>◆ i2c_slave_event_t</h4>
5598 <div class="memitem" id="rpip93357837c2e9727a4408">
5599 <div class="memproto" id="rpipb447c4800a8ff1ce6ee3">
5600 <table class="memname" id="rpip6469a33c8a6ec75f3127">
5601 <tr id="rpip82c18712d151216ea601">
5602 <td class="memname" id="rpip66b6c32f9aae3d22bee3">enum <a class="el" href="#gad8b613f0d4e9d1b9511ca0b6d6ab7e8c" id="rpipe30d9408a59f25b05f57" data-adjusted="true">i2c_slave_event_t</a>
5607 <div class="memdoc" id="rpip1656fe9f22b90368ddd9">
5609 <p id="rpip4ef19d8a616235eb0985">I2C slave event types. </p>
5610 <table class="tableblock frame-all grid-all stretch" id="rpip2820ac320995492daf78" data-parent-id="rpip1656fe9f22b90368ddd9" data-target-for="rpip2820ac320995492daf78">
5611 <tr id="rpip3dcf729395bfb9de6ad0"><th colspan="2" id="rpip2cfe7269a56d42145f0b">Enumerator</th></tr>
5612 <tr id="rpipbc06b6a76585a8302b00">
5613 <td class="tableblock" id="rpip06ed6c7c2033cc1095a0" data-parent-id="rpipbc06b6a76585a8302b00" data-target-for="rpip06ed6c7c2033cc1095a0">
5614 <a id="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca7bc1a9bb9db707479c140a49c4d62a51" name="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca7bc1a9bb9db707479c140a49c4d62a51"></a>I2C_SLAVE_RECEIVEÂ </td>
5615 <td class="tableblock" id="rpip1de30bc5299c56bdb558" data-parent-id="rpipbc06b6a76585a8302b00" data-target-for="rpip1de30bc5299c56bdb558">
5616 <p id="rpip3d1c59444a4f19a6050e">Data from master is available for reading. Slave must read from Rx FIFO. </p>
5619 <tr id="rpipf9f57d7ab883c31b95cc">
5620 <td class="tableblock" id="rpip379eaaad1ef53fc01a5a" data-parent-id="rpipf9f57d7ab883c31b95cc" data-target-for="rpip379eaaad1ef53fc01a5a">
5621 <a id="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca495a6f0ce75738519ac201349ac38c22" name="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca495a6f0ce75738519ac201349ac38c22"></a>I2C_SLAVE_REQUESTÂ </td>
5622 <td class="tableblock" id="rpip216de0e7ab7c6de49747" data-parent-id="rpipf9f57d7ab883c31b95cc" data-target-for="rpip216de0e7ab7c6de49747">
5623 <p id="rpip44b0e246006b39a8ecb0">Master is requesting data. Slave must write into Tx FIFO. </p>
5626 <tr id="rpipaeb5f8fa0b58a19acb3a">
5627 <td class="tableblock" id="rpipa360b8a516fd80b354fb" data-parent-id="rpipaeb5f8fa0b58a19acb3a" data-target-for="rpipa360b8a516fd80b354fb">
5628 <a id="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca857dc8c139941a8f8bb6888a84e4b83f" name="ggad8b613f0d4e9d1b9511ca0b6d6ab7e8ca857dc8c139941a8f8bb6888a84e4b83f"></a>I2C_SLAVE_FINISHÂ </td>
5629 <td class="tableblock" id="rpipa16fd64b4d6bbde1d959" data-parent-id="rpipaeb5f8fa0b58a19acb3a" data-target-for="rpipa16fd64b4d6bbde1d959">
5630 <p id="rpipdfdab76ad52857a183c6">Master has sent a Stop or Restart signal. Slave may prepare for the next transfer. </p>
5642 <h3 id="rpipbf5b82a0dc8d3d4bb2bf">
5643 <a class="anchor" href="#rpipbf5b82a0dc8d3d4bb2bf"></a>Function Documentation</h3>
5644 <a id="gaebbea8f5a707f23750ba3e0c8b5eb6ee" name="gaebbea8f5a707f23750ba3e0c8b5eb6ee"></a>
5646 <h4 id="rpip346c9df5420a2ba95b3f">
5647 <a class="anchor" href="#rpip346c9df5420a2ba95b3f"></a>◆ i2c_slave_deinit()</h4>
5648 <div class="memitem" id="rpip4155411e616a99c62af3">
5649 <div class="memproto" id="rpipd16119b6623ff0bab816">
5650 <table class="memname" id="rpipea0d91a38e2c28573439">
5651 <tr id="rpipd220812f03acb171af9b">
5652 <td class="memname" id="rpip351032fba4ee272d7e61">void i2c_slave_deinit </td>
5653 <td id="rpipa2156293c10c2a22e435">(</td>
5654 <td class="paramtype" id="rpipcc884318ca6757454e78">
5655 <a class="el" href="structi2c__inst.html" id="rpip06302341e4e7cca03009">i2c_inst_t</a> *Â </td>
5656 <td class="paramname" id="rpip5a09abecdd96e2eb6691"><em id="rpip5a4bd848b1ae7e778971">i2c</em></td>
5657 <td id="rpipd05901c67d4a4f45fc7d">)</td>
5658 <td id="rpipa1c5529f37ceb93e27b1"></td>
5662 <div class="memdoc" id="rpip75d6f5ee534ecaab7572">
5664 <p id="rpipcf6f7d1d96aa21eb7e2b">Restore an I2C instance to master mode. </p>
5665 <h4 id="rpip02bea7c9dd9ce25d3037" data-parent-id="rpip7201479019a1de956bb2" data-target-for="rpip02bea7c9dd9ce25d3037">Parameters</h4>
5666 <p class="paragraph" id="rpip3e30a6da9004e031b342" data-parent-id="rpip7201479019a1de956bb2" data-target-for="rpip3e30a6da9004e031b342">
5668 <table class="params" id="rpip5e14ea7f3f1d09750e9e">
5669 <tr id="rpip1d5e5f7801d8aaf15503">
5670 <td class="paramname" id="rpip779c1126ed995547b6bc">i2c</td>
5671 <td id="rpip2781a29bcff1dbaddb38">Either <a class="el" href="rp2__common_2hardware__i2c_2include_2hardware_2i2c_8h.html#a46204d38a512926541fd8bac2b62c720" id="rpipf422f469bd06895613be" data-adjusted="true">i2c0</a> or <a class="el" href="rp2__common_2hardware__i2c_2include_2hardware_2i2c_8h.html#a87659b485d9e76dfc3bcef208ac4b573" id="rpipbdfd5e815950506fd054" data-adjusted="true">i2c1</a> </td>
5680 <a id="ga2ecc43ff4a3c673a704d0c7bd7d91db4" name="ga2ecc43ff4a3c673a704d0c7bd7d91db4"></a>
5683 <h4 id="rpipf6155243e6ef8f650461">
5684 <a class="anchor" href="#rpipf6155243e6ef8f650461"></a>◆ i2c_slave_init()</h4>
5685 <div class="memitem" id="rpip0981c4a4ad4dd426ddd6">
5686 <div class="memproto" id="rpipd6c559ce8d1426ec9a7e">
5687 <table class="memname" id="rpipaf8ff77e22f917930991">
5688 <tr id="rpipcb4fb6239b4d3c5e2d28">
5689 <td class="memname" id="rpipd6094c80a227a2b02737">void i2c_slave_init </td>
5690 <td id="rpip1fb22bbf528dc49006e8">(</td>
5691 <td class="paramtype" id="rpipfb8bbf9346cb7eda9fb9">
5692 <a class="el" href="structi2c__inst.html" id="rpip28aa8682a40fc2ef72e5">i2c_inst_t</a> *Â </td>
5693 <td class="paramname" id="rpipb1d6e7a81d869a7b1831">
5694 <em id="rpipa83fa3c01a650428e8b6">i2c</em>, </td>
5696 <tr id="rpipe23dc643613d159ec9c1">
5697 <td class="paramkey" id="rpipf20ddc70e43fb5f5736e"></td>
5698 <td id="rpiped0f1e0c7e3e60fffafe"></td>
5699 <td class="paramtype" id="rpipda6083db44da458abb85">uint8_t </td>
5700 <td class="paramname" id="rpipbbffdc5d94bcd8bb2817">
5701 <em id="rpipffd1c1daad8d4f751b90">address</em>, </td>
5703 <tr id="rpipf286261c31f344be4431">
5704 <td class="paramkey" id="rpip1a6a5c54692ae414514d"></td>
5705 <td id="rpip3f4658ae4ae23d3f602b"></td>
5706 <td class="paramtype" id="rpipc7272f6e88051acd25c6">
5707 <a class="el" href="#gaf1bb7bb1e79c309b290bf0e8ccd57dff" id="rpip2b5d1dcbce571da2af6b" data-adjusted="true">i2c_slave_handler_t</a>Â </td>
5708 <td class="paramname" id="rpip4965c09076b3dcf6a695">
5709 <em id="rpipa72c88731c5f7a7c5b5e">handler</em>Â </td>
5711 <tr id="rpipacfe9652af611033dd4a">
5712 <td id="rpipd9079ebd92890ddebf64"></td>
5713 <td id="rpipa2020b867cadc3eccd55">)</td>
5714 <td id="rpip65c02644394326c41915"></td>
5715 <td id="rpip0685756bfd096617b1a7"></td>
5719 <div class="memdoc" id="rpip003327fc3d201fa676a4">
5721 <p id="rpipe96ff404b6e25dde7b4e">Configure an I2C instance for slave mode. </p>
5722 <h4 id="rpipbd149e02344fff8d0171" data-parent-id="rpip41a9686af0d7197d1a7d" data-target-for="rpipbd149e02344fff8d0171">Parameters</h4>
5723 <p class="paragraph" id="rpip107ac37185c9cdbdc793" data-parent-id="rpip41a9686af0d7197d1a7d" data-target-for="rpip107ac37185c9cdbdc793">
5725 <table class="params" id="rpipf4ee762bfe12f043d5c1">
5726 <tr id="rpip44042b184464cb14b5c4">
5727 <td class="paramname" id="rpipb98217767d6bb0058702">i2c</td>
5728 <td id="rpip1efae39fa868fcfb21c9">I2C instance. </td>
5730 <tr id="rpipf6daad7ec77737de51b0">
5731 <td class="paramname" id="rpip34e80f04e4864bb40127">address</td>
5732 <td id="rpipb8b44aae6fa0cad0748e">7-bit slave address. </td>
5734 <tr id="rpip801ffaf19f3ee68857f8">
5735 <td class="paramname" id="rpip1e240b8f70a48ee17569">handler</td>
5736 <td id="rpipbb122c3ee2968311cb03">Callback for events from I2C master. It will run from the I2C ISR, on the CPU core where the slave was initialised. </td>
5749 <h2 id="pico_multicore">
5750 <a class="anchor" href="#pico_multicore"></a>pico_multicore</h2>
5751 <div class="sectionbody"></div>
5752 <div class="ingroups" id="rpip84cc487f0e61a456450e">Part of: <a class="el" href="high_level.html" id="rpipab6cfbc52e0cec47f4cb">High Level APIs</a>
5755 <h3 id="rpip7baf405557a57f41b9de">
5756 <a class="anchor" href="#rpip7baf405557a57f41b9de"></a>Modules</h3>
5757 <ul class="memberdecls" id="rpipbb3a8cf599853a58c655" data-parent-id="rpip3b157c0bdbccfb9eaa27">
5758 <li class="memitem">
5759 <p data-target="true" data-target-for="rpipbb3a8cf599853a58c655"><span class="memItemLeft" data-target="true" id="rpip9a533e3e87947992344b" data-parent-id="rpipbb3a8cf599853a58c655" data-target-for="rpip9a533e3e87947992344b">Â </span><span class="memItemRight" data-target="true" id="rpipf9618e8fe52472b58921" data-parent-id="rpipbb3a8cf599853a58c655" data-target-for="rpipf9618e8fe52472b58921"><a class="el" href="high_level.html#multicore_fifo" id="rpip5e1dda0056268ce52ce4">fifo</a></span></p>
5761 <li class="memdesc">
5762 <p data-target="true" data-target-for="rpip0af2a98f9e7f4e9f324c"><span class="mdescLeft" data-target="true" id="rpip8a5e2058b008a6aa13db" data-parent-id="rpip0af2a98f9e7f4e9f324c" data-target-for="rpip8a5e2058b008a6aa13db">Â </span><span class="mdescRight" data-target="true" id="rpip4f1c202f846673c49224" data-parent-id="rpip0af2a98f9e7f4e9f324c" data-target-for="rpip4f1c202f846673c49224">Functions for the inter-core FIFOs. <br id="rpipf1c64e87497b1280d6f2"></span></p>
5764 <li class="memitem">
5765 <p data-target="true" data-target-for="rpip8887cc12a0c5357540d5"><span class="memItemLeft" data-target="true" id="rpip65a38832259fb952e325" data-parent-id="rpip8887cc12a0c5357540d5" data-target-for="rpip65a38832259fb952e325">Â </span><span class="memItemRight" data-target="true" id="rpip605863484828a6be8ad9" data-parent-id="rpip8887cc12a0c5357540d5" data-target-for="rpip605863484828a6be8ad9"><a class="el" href="high_level.html#multicore_lockout" id="rpipbc949e7a34eca3190f75">lockout</a></span></p>
5767 <li class="memdesc">
5768 <p data-target="true" data-target-for="rpip6bc0f55c0bf25aa05370"><span class="mdescLeft" data-target="true" id="rpipb6130be3f1a8413bb0a6" data-parent-id="rpip6bc0f55c0bf25aa05370" data-target-for="rpipb6130be3f1a8413bb0a6">Â </span><span class="mdescRight" data-target="true" id="rpip42efa29749d06ceb49d7" data-parent-id="rpip6bc0f55c0bf25aa05370" data-target-for="rpip42efa29749d06ceb49d7">Functions to enable one core to force the other core to pause execution in a known state. <br id="rpip471abb406b5a18034ac2"></span></p>
5773 <h3 id="rpipf840d967c7b8d6fef316">
5774 <a class="anchor" href="#rpipf840d967c7b8d6fef316"></a>Functions</h3>
5775 <ul class="memberdecls" id="rpip5b9650177744cd674293" data-parent-id="rpipfcd3bcfebafc82b3f2ab">
5776 <li class="memitem">
5777 <p data-target="true" data-target-for="rpip5b9650177744cd674293"><span class="memItemLeft" data-target="true" id="rpipe65d66795c4522a12857" data-parent-id="rpip5b9650177744cd674293" data-target-for="rpipe65d66795c4522a12857">void </span><span class="memItemRight" data-target="true" id="rpip1484015f7dfb5b99df0b" data-parent-id="rpip5b9650177744cd674293" data-target-for="rpip1484015f7dfb5b99df0b"><a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" id="rpip981b8a00bdbdab6ef472" data-adjusted="true">multicore_reset_core1</a> (void)</span></p>
5779 <li class="memdesc">
5780 <p data-target="true" data-target-for="rpip9c96f482e065d2e592ad"><span class="mdescLeft" data-target="true" id="rpipc8fdc5be060f03b8db4e" data-parent-id="rpip9c96f482e065d2e592ad" data-target-for="rpipc8fdc5be060f03b8db4e">Â </span><span class="mdescRight" data-target="true" id="rpip38c19297a70fa5daa441" data-parent-id="rpip9c96f482e065d2e592ad" data-target-for="rpip38c19297a70fa5daa441">Reset core 1. <br id="rpip75359a6e18b094a378c3"></span></p>
5782 <li class="memitem">
5783 <p data-target="true" data-target-for="rpipe55375e51144d4dcb211"><span class="memItemLeft" data-target="true" id="rpip487e2271a6f231d9f0b9" data-parent-id="rpipe55375e51144d4dcb211" data-target-for="rpip487e2271a6f231d9f0b9">void </span><span class="memItemRight" data-target="true" id="rpip22a068e9d0c43fd50359" data-parent-id="rpipe55375e51144d4dcb211" data-target-for="rpip22a068e9d0c43fd50359"><a class="el" href="#ga46ea5e2efc181aba1d4d1de06a375c59" id="rpip164133195a1109a8819a" data-adjusted="true">multicore_launch_core1</a> (void(*entry)(void))</span></p>
5785 <li class="memdesc">
5786 <p data-target="true" data-target-for="rpip4911d75568b4d01c982b"><span class="mdescLeft" data-target="true" id="rpipf7ce5edb2954ee318fd2" data-parent-id="rpip4911d75568b4d01c982b" data-target-for="rpipf7ce5edb2954ee318fd2">Â </span><span class="mdescRight" data-target="true" id="rpip81ee37af1f2afc0dab5e" data-parent-id="rpip4911d75568b4d01c982b" data-target-for="rpip81ee37af1f2afc0dab5e">Run code on core 1. <br id="rpip57ec5b8b5222dd4a2f96"></span></p>
5788 <li class="memitem">
5789 <p data-target="true" data-target-for="rpip51c112af1d830717b2a5"><span class="memItemLeft" data-target="true" id="rpip53b72fea64ce628be0b2" data-parent-id="rpip51c112af1d830717b2a5" data-target-for="rpip53b72fea64ce628be0b2">void </span><span class="memItemRight" data-target="true" id="rpipee1de48c48a77c39f277" data-parent-id="rpip51c112af1d830717b2a5" data-target-for="rpipee1de48c48a77c39f277"><a class="el" href="#gac1926bb2da43016e5d14eb52c8c123f4" id="rpip42507dc0019a4624228d" data-adjusted="true">multicore_launch_core1_with_stack</a> (void(*entry)(void), uint32_t *stack_bottom, size_t stack_size_bytes)</span></p>
5791 <li class="memdesc">
5792 <p data-target="true" data-target-for="rpipa7820caae56bf39ac6ab"><span class="mdescLeft" data-target="true" id="rpipc83897e58fd99a6bea60" data-parent-id="rpipa7820caae56bf39ac6ab" data-target-for="rpipc83897e58fd99a6bea60">Â </span><span class="mdescRight" data-target="true" id="rpip3109f50193b8fe551c2a" data-parent-id="rpipa7820caae56bf39ac6ab" data-target-for="rpip3109f50193b8fe551c2a">Launch code on core 1 with stack. <br id="rpip7aaf4125f6bb2420dfa6"></span></p>
5794 <li class="memitem">
5795 <p data-target="true" data-target-for="rpiped45857ba88bac535289"><span class="memItemLeft" data-target="true" id="rpipb914e53afce8e41f07a2" data-parent-id="rpiped45857ba88bac535289" data-target-for="rpipb914e53afce8e41f07a2">void </span><span class="memItemRight" data-target="true" id="rpip3e8c078a2ab5493fd910" data-parent-id="rpiped45857ba88bac535289" data-target-for="rpip3e8c078a2ab5493fd910"><a class="el" href="#gac3a24e275219229de49d1fb32e3c4ef0" id="rpip44db645dad9bd2fc9779" data-adjusted="true">multicore_launch_core1_raw</a> (void(*entry)(void), uint32_t *sp, uint32_t vector_table)</span></p>
5797 <li class="memdesc">
5798 <p data-target="true" data-target-for="rpipd3aa6c98c53436dfd5db"><span class="mdescLeft" data-target="true" id="rpipd5d69ac4b52b19e4e7e4" data-parent-id="rpipd3aa6c98c53436dfd5db" data-target-for="rpipd5d69ac4b52b19e4e7e4">Â </span><span class="mdescRight" data-target="true" id="rpip8f858f598aa4f7955106" data-parent-id="rpipd3aa6c98c53436dfd5db" data-target-for="rpip8f858f598aa4f7955106">Launch code on core 1 with no stack protection. <br id="rpip3f083ef68f7b391044a9"></span></p>
5801 <a name="details" id="details"></a>
5804 <h3 id="rpipc30c9f02735cb3003f42">
5805 <a class="anchor" href="#rpipc30c9f02735cb3003f42"></a>Detailed Description</h3>
5806 <p id="rpipb69e60909c093e3a8a20">Adds support for running code on the second processor core (core 1)</p>
5809 <h3 id="multicore_example">
5810 <a class="anchor" href="#multicore_example"></a>Example</h3>
5811 <div class="listingblock" id="rpip8ab6241cfe4ac751b528" data-parent-id="rpip2ca2967713f806df8c83">
5812 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
5813 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
5814 </div></button><div class="content" data-target="true" data-target-for="rpip8ab6241cfe4ac751b528">
5815 <div class="line" id="rpipfbde758a76b4da3a26f7"> </div>
5816 <div class="line" id="rpip11e03f14f9ee7517b33e"><span class="preprocessor" id="rpip2a718fad775150dc8023">#include <<a class="code" href="stdio_8h.html" id="rpip1d9ca45e57e439a2904b">stdio.h</a>></span></div>
5817 <div class="line" id="rpip2b7ea3472a858c9216a2"><span class="preprocessor" id="rpipbd43d42a9cf004a7d42b">#include "<a class="code" href="stdlib_8h.html" id="rpip54141b4d2a5f33610353">pico/stdlib.h</a>"</span></div>
5818 <div class="line" id="rpip55919bf63a7bc8f21e11"><span class="preprocessor" id="rpip2392b27ddb8e862d90fe">#include "<a class="code" href="multicore_8h.html" id="rpiped1b70cace7281953920">pico/multicore.h</a>"</span></div>
5819 <div class="line" id="rpip8638bba0d5cb4e6a534c"> </div>
5820 <div class="line" id="rpip770fcb66f0f8bb656f1c"><span class="preprocessor" id="rpip5652faf30eadb0e76d9b">#define FLAG_VALUE 123</span></div>
5821 <div class="line" id="rpip806996f069fc82f960b8"> </div>
5822 <div class="line" id="rpip363c3e540613a44d19c5">
5823 <span class="keywordtype" id="rpip8103834c3a4a6906fa64">void</span> core1_entry() {</div>
5824 <div class="line" id="rpipd565ff03c45379db2a6e"> </div>
5825 <div class="line" id="rpip6184b31b0ddb0f73949d"> <a class="code hl_function" href="high_level.html#multicore_fifo#ga134933a693c53c4f94c9d3cd3cabfc79" id="rpip45bdaffa99fc8a2ccd58" data-adjusted="true">multicore_fifo_push_blocking</a>(FLAG_VALUE);</div>
5826 <div class="line" id="rpip7a72a31a9d7b5cbcacf8"> </div>
5827 <div class="line" id="rpip2d03a26855fd1b2e71bf"> uint32_t g = <a class="code hl_function" href="high_level.html#multicore_fifo#ga929272dd1056d8ae05667beda4adb0fc" id="rpipe6a7bd6f4063fa1f0508" data-adjusted="true">multicore_fifo_pop_blocking</a>();</div>
5828 <div class="line" id="rpip528cc77ebed3b8a12123"> </div>
5829 <div class="line" id="rpip8e93bd7994a8aff033a6"> <span class="keywordflow" id="rpip9f81dcfff211c125001b">if</span> (g != FLAG_VALUE)</div>
5830 <div class="line" id="rpipe93fae3950bf118146ce"> printf(<span class="stringliteral" id="rpip5aa9a80efb69d05cf6be">"Hmm, that's not right on core 1!\n"</span>);</div>
5831 <div class="line" id="rpip15b24b8e7aff1396b6af"> <span class="keywordflow" id="rpipa84afde282a503199298">else</span>
5833 <div class="line" id="rpip49a6a5f9b7f6fa7ffccb"> printf(<span class="stringliteral" id="rpipc4c115f17330cb464ee3">"Its all gone well on core 1!"</span>);</div>
5834 <div class="line" id="rpipda82f8dd700275cc9b6e"> </div>
5835 <div class="line" id="rpip1b85fee5774fcaf1bacd"> <span class="keywordflow" id="rpipe784ac3f53a9896e6a7a">while</span> (1)</div>
5836 <div class="line" id="rpipfbf4b90f070c8eabc857"> <a class="code hl_function" href="runtime.html#gaf04e1c7eb32935a422d975abdec4f4b0" id="rpipc6f126a589954f1ab30d" data-adjusted="true">tight_loop_contents</a>();</div>
5837 <div class="line" id="rpip3e5fa7cfae263ea25445">}</div>
5838 <div class="line" id="rpip1e05dab8ff17dc775806"> </div>
5839 <div class="line" id="rpip28a2f5060e5eeebf568d">
5840 <span class="keywordtype" id="rpip57541c66f125941de4d1">int</span> main() {</div>
5841 <div class="line" id="rpip7a52f7052ef27e1d040a"> <a class="code hl_function" href="runtime.html#ga0e604311fb226dae91ff4eb17a19d67a" id="rpip088317658d947ded1023" data-adjusted="true">stdio_init_all</a>();</div>
5842 <div class="line" id="rpip0c36e08605e5d395a63c"> printf(<span class="stringliteral" id="rpip5073a5ea7782d7a97b76">"Hello, multicore!\n"</span>);</div>
5843 <div class="line" id="rpipd5ca10ddc1f4aaec6ec9"> </div>
5844 <div class="line" id="rpipcd4908e5a656ef98d501"> </div>
5845 <div class="line" id="rpip910d25c9ce377dc78452"> <a class="code hl_function" href="#ga46ea5e2efc181aba1d4d1de06a375c59" id="rpip12c9e1a04d6f9df4a3db" data-adjusted="true">multicore_launch_core1</a>(core1_entry);</div>
5846 <div class="line" id="rpip2f69330ba6354580b660"> </div>
5847 <div class="line" id="rpipfc57ea807af6524c8552"> <span class="comment" id="rpip531b6f069b8c9cf12a29">// Wait for it to start up</span>
5849 <div class="line" id="rpip987c4949fc3e321d6cf5"> </div>
5850 <div class="line" id="rpip8b8096dde740a6e49e86"> uint32_t g = <a class="code hl_function" href="high_level.html#multicore_fifo#ga929272dd1056d8ae05667beda4adb0fc" id="rpip237213220742938fe36d" data-adjusted="true">multicore_fifo_pop_blocking</a>();</div>
5851 <div class="line" id="rpip53fcbc826cc4b5599aec"> </div>
5852 <div class="line" id="rpipb56fd0f7098035245736"> <span class="keywordflow" id="rpip9051f6ced9b7c1eb846e">if</span> (g != FLAG_VALUE)</div>
5853 <div class="line" id="rpip6cbb8516decd95cdca18"> printf(<span class="stringliteral" id="rpip5e26b2b107f1338af8ba">"Hmm, that's not right on core 0!\n"</span>);</div>
5854 <div class="line" id="rpip69c9af03e529776e0e93"> <span class="keywordflow" id="rpipcbfe2bb3a8c30c727740">else</span> {</div>
5855 <div class="line" id="rpip622fb977fe4d02ba47a5"> <a class="code hl_function" href="high_level.html#multicore_fifo#ga134933a693c53c4f94c9d3cd3cabfc79" id="rpipc18526682fa5c79463f1" data-adjusted="true">multicore_fifo_push_blocking</a>(FLAG_VALUE);</div>
5856 <div class="line" id="rpip243bcb0e29c95d2b66a8"> printf(<span class="stringliteral" id="rpipc97f7084bbb966b3ef0d">"It's all gone well on core 0!"</span>);</div>
5857 <div class="line" id="rpipec9bb1c8df6fdacb7968"> }</div>
5858 <div class="line" id="rpip1bd19f2e54f91a5b5de1"> </div>
5859 <div class="line" id="rpipbeec826ff3ba6aedd236">}</div>
5860 <div class="ttc" id="ahigh_level.html#multicore_fifo_ga134933a693c53c4f94c9d3cd3cabfc79">
5861 <div class="ttname" id="rpipb5139d634bf81325f812"><a href="high_level.html#multicore_fifo#ga134933a693c53c4f94c9d3cd3cabfc79" id="rpipafb7742929d49df33533" data-adjusted="true">multicore_fifo_push_blocking</a></div>
5862 <div class="ttdeci" id="rpipd971c7adcb8ff935e50f">void multicore_fifo_push_blocking(uint32_t data)</div>
5863 <div class="ttdoc" id="rpip846760b5cbfdc290bb7d">Push data on to the write FIFO (data to the other core).</div>
5864 <div class="ttdef" id="rpipac257e8e63e946cc3d36">
5865 <b id="rpip25660bdc8a7b18965ab3">Definition:</b> multicore.c:37</div>
5867 <div class="ttc" id="ahigh_level.html#multicore_fifo_ga929272dd1056d8ae05667beda4adb0fc">
5868 <div class="ttname" id="rpip713f1b5de1b1f673c451"><a href="high_level.html#multicore_fifo#ga929272dd1056d8ae05667beda4adb0fc" id="rpipe04d028c7e2b006ed864" data-adjusted="true">multicore_fifo_pop_blocking</a></div>
5869 <div class="ttdeci" id="rpipf52826dbb1e339d14105">uint32_t multicore_fifo_pop_blocking(void)</div>
5870 <div class="ttdoc" id="rpip354d1a45194dcbea7559">Pop data from the read FIFO (data from the other core).</div>
5871 <div class="ttdef" id="rpip6fdde491860d9483a66c">
5872 <b id="rpipde41367ab31483cd689f">Definition:</b> multicore.c:65</div>
5874 <div class="ttc" id="agroup__pico__multicore_html_ga46ea5e2efc181aba1d4d1de06a375c59">
5875 <div class="ttname" id="rpip2d26e2e2751c24a01b20"><a href="#ga46ea5e2efc181aba1d4d1de06a375c59" id="rpip38c6df74664a7a4c7e2d" data-adjusted="true">multicore_launch_core1</a></div>
5876 <div class="ttdeci" id="rpipd4f2cd0a5d5408646323">void multicore_launch_core1(void(*entry)(void))</div>
5877 <div class="ttdoc" id="rpip2f5e406464e47a072626">Run code on core 1.</div>
5878 <div class="ttdef" id="rpip261aac34afc5e294e598">
5879 <b id="rpipfed22db1eba94ed789f8">Definition:</b> multicore.c:132</div>
5881 <div class="ttc" id="agroup__pico__platform_html_gaf04e1c7eb32935a422d975abdec4f4b0">
5882 <div class="ttname" id="rpip771bc44b36ed622a6237"><a href="runtime.html#gaf04e1c7eb32935a422d975abdec4f4b0" id="rpip4b75c07a689c2dacab99" data-adjusted="true">tight_loop_contents</a></div>
5883 <div class="ttdeci" id="rpip46325f0d508730434190">static __always_inline void tight_loop_contents(void)</div>
5884 <div class="ttdoc" id="rpip1dab660818555df3a6dc">No-op function for the body of tight loops.</div>
5885 <div class="ttdef" id="rpip9b4c0a2fdf31413948e8">
5886 <b id="rpipa036b8b500b54a411e06">Definition:</b> platform.h:434</div>
5888 <div class="ttc" id="agroup__pico__stdio_html_ga0e604311fb226dae91ff4eb17a19d67a">
5889 <div class="ttname" id="rpip44c5d46cd19406f6940a"><a href="runtime.html#ga0e604311fb226dae91ff4eb17a19d67a" id="rpip7f6e79b957386bab92ee" data-adjusted="true">stdio_init_all</a></div>
5890 <div class="ttdeci" id="rpipc51f2552a9b08c775d47">bool stdio_init_all(void)</div>
5891 <div class="ttdoc" id="rpip51d1354bcfd9b2767df7">Initialize all of the present standard stdio types that are linked into the binary.</div>
5892 <div class="ttdef" id="rpip12ea693a0575ba3339b3">
5893 <b id="rpip5e16857bf330576f4ef4">Definition:</b> stdio.c:283</div>
5895 <div class="ttc" id="amulticore_8h_html"><div class="ttname" id="rpip766c03f7c7d336a8399a"><a href="multicore_8h.html" id="rpipf77620313e8895d97c7d">multicore.h</a></div></div>
5896 <div class="ttc" id="astdio_8h_html"><div class="ttname" id="rpipd9e2e168a4ec9e879861"><a href="stdio_8h.html" id="rpipb068f8ce384860df188a">stdio.h</a></div></div>
5897 <div class="ttc" id="astdlib_8h_html"><div class="ttname" id="rpip24d274013c8e4b24c466"><a href="stdlib_8h.html" id="rpipfd152a1830ee4bdbd594">stdlib.h</a></div></div>
5903 <h3 id="rpipe803fe9ffd182f2af357">
5904 <a class="anchor" href="#rpipe803fe9ffd182f2af357"></a>Function Documentation</h3>
5905 <a id="ga46ea5e2efc181aba1d4d1de06a375c59" name="ga46ea5e2efc181aba1d4d1de06a375c59"></a>
5907 <h4 id="rpip6f66ef6e368932db29ff">
5908 <a class="anchor" href="#rpip6f66ef6e368932db29ff"></a>◆ multicore_launch_core1()</h4>
5909 <div class="memitem" id="rpip5e6ce8318e917d08b766">
5910 <div class="memproto" id="rpip70c1e30c2978c7b98eee">
5911 <table class="memname" id="rpip5e3add60947eba5a0117">
5912 <tr id="rpip77f40310e38188a86ff6">
5913 <td class="memname" id="rpip5a47a72d8439bfa27766">void multicore_launch_core1 </td>
5914 <td id="rpip8576b0b993449d4a1aad">(</td>
5915 <td class="paramtype" id="rpipaa3f12dbe77842cf8381">void(*)(void)Â </td>
5916 <td class="paramname" id="rpip1a95721d41448bf05e9b"><em id="rpipf6c490135ae0023530d0">entry</em></td>
5917 <td id="rpip231583a035c5e30d5bd8">)</td>
5918 <td id="rpip44b071c133aab37b4828"></td>
5922 <div class="memdoc" id="rpipfe8558fcb5e64d79a8c1">
5924 <p id="rpip6c79760500657aefca1c">Run code on core 1. </p>
5925 <p id="rpip3722c7aac10e19b2400b">Wake up (a previously reset) core 1 and enter the given function on core 1 using the default core 1 stack (below core 0 stack).</p>
5926 <p id="rpip1bc3cb81384dd06884bf">core 1 must previously have been reset either as a result of a system reset or by calling <a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" id="rpip62511c69013fae8bc555" data-adjusted="true">multicore_reset_core1</a></p>
5927 <p id="rpipe9f0c23c3e7d656766a9">core 1 will use the same vector table as core 0</p>
5928 <h4 id="rpip9cfda6da56528cef31c3" data-parent-id="rpipe1d1c13cf0e0ab524e0c" data-target-for="rpip9cfda6da56528cef31c3">Parameters</h4>
5929 <p class="paragraph" id="rpipc43cfd3f28237c7a7e58" data-parent-id="rpipe1d1c13cf0e0ab524e0c" data-target-for="rpipc43cfd3f28237c7a7e58">
5931 <table class="params" id="rpipbc0f378b477afeced889">
5932 <tr id="rpipb776e453f55204876724">
5933 <td class="paramname" id="rpipbaa5d660f79095e3479a">entry</td>
5934 <td id="rpipb47496d386994ad890ec">Function entry point </td>
5940 <p class="see" id="rpip426f121075197303a529" data-parent-id="rpipfe8558fcb5e64d79a8c1" data-target-for="rpip426f121075197303a529"><span class="label" id="rpipc0529a5c24eaa7a944fd" data-parent-id="rpip426f121075197303a529" data-target-for="rpipc0529a5c24eaa7a944fd">See also</span><span class="target" id="rpipd662ea85650359676966" data-parent-id="rpip426f121075197303a529" data-target-for="rpipd662ea85650359676966"><a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" title="Reset core 1." id="rpipb99268ef05ff674d6ec8" data-adjusted="true">multicore_reset_core1</a> </span></p>
5946 <a id="gac3a24e275219229de49d1fb32e3c4ef0" name="gac3a24e275219229de49d1fb32e3c4ef0"></a>
5949 <h4 id="rpip19024f7ead08cca5f927">
5950 <a class="anchor" href="#rpip19024f7ead08cca5f927"></a>◆ multicore_launch_core1_raw()</h4>
5951 <div class="memitem" id="rpip910944970611df845a47">
5952 <div class="memproto" id="rpipe59e1d30fed5b82cf516">
5953 <table class="memname" id="rpip9f9aa73fcc0d3ad7ae90">
5954 <tr id="rpip50fcf3b7c881af89e5dc">
5955 <td class="memname" id="rpip60be4a20a9a8ce90fa01">void multicore_launch_core1_raw </td>
5956 <td id="rpip23de5b4427a7528c6de9">(</td>
5957 <td class="paramtype" id="rpip4cf37e18195534fcf034">void(*)(void)Â </td>
5958 <td class="paramname" id="rpip13a59ea4e6489a19594a">
5959 <em id="rpipa13c67b0eaf780ae2dc4">entry</em>, </td>
5961 <tr id="rpipe125073699b654073857">
5962 <td class="paramkey" id="rpipcf70acc83dde5ec3bd27"></td>
5963 <td id="rpip317eb41955b8ceeb9ff2"></td>
5964 <td class="paramtype" id="rpip571e8811e722ddea66c5">uint32_t *Â </td>
5965 <td class="paramname" id="rpipc3267d7348c770c7c4e3">
5966 <em id="rpipbef4c620d739df559873">sp</em>, </td>
5968 <tr id="rpip9972d3d982c461106ba0">
5969 <td class="paramkey" id="rpip154f0d1089e150c234ec"></td>
5970 <td id="rpip829eef403c26b0e1b92a"></td>
5971 <td class="paramtype" id="rpipb9214fbced33699333de">uint32_t </td>
5972 <td class="paramname" id="rpip91041eff2da9b1c78c92">
5973 <em id="rpipf06a91ce553253fb0275">vector_table</em>Â </td>
5975 <tr id="rpip1fce09e73ab70c9341a1">
5976 <td id="rpipf9a0f74e952761be84bf"></td>
5977 <td id="rpip3deb0834103063874989">)</td>
5978 <td id="rpip4be9e7ac07543f2d492e"></td>
5979 <td id="rpip34f898e9c603b96cb5f8"></td>
5983 <div class="memdoc" id="rpipb756b8731f266dc07fa0">
5985 <p id="rpip7deab33e8f856c9cceda">Launch code on core 1 with no stack protection. </p>
5986 <p id="rpip54a06927f8a30245f840">Wake up (a previously reset) core 1 and start it executing with a specific entry point, stack pointer and vector table.</p>
5987 <p id="rpip18a8c17f1b98078c1b38">This is a low level function that does not provide a stack guard even if USE_STACK_GUARDS is defined</p>
5988 <p id="rpip30ef84204507fb265604">core 1 must previously have been reset either as a result of a system reset or by calling <a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" id="rpip844761368eebaf15fa2a" data-adjusted="true">multicore_reset_core1</a></p>
5989 <h4 id="rpipecbc466fa23e4e61f52f" data-parent-id="rpip13ebd897b0c58ea05602" data-target-for="rpipecbc466fa23e4e61f52f">Parameters</h4>
5990 <p class="paragraph" id="rpip5232b36d1e1a64d4ad6f" data-parent-id="rpip13ebd897b0c58ea05602" data-target-for="rpip5232b36d1e1a64d4ad6f">
5992 <table class="params" id="rpipb88319a145a8eeb509dd">
5993 <tr id="rpip589fcb5f00e059af9176">
5994 <td class="paramname" id="rpipabc2115677dcd3e82d48">entry</td>
5995 <td id="rpipa7b0165fb5959b96cba0">Function entry point </td>
5997 <tr id="rpipba78cd972ff3d3e9ded0">
5998 <td class="paramname" id="rpip01ce74e2e3249dfafcac">sp</td>
5999 <td id="rpip3ce2bb0fb29b577753e3">Pointer to the top of the core 1 stack </td>
6001 <tr id="rpip770f9ae7969345ec2d77">
6002 <td class="paramname" id="rpip1377f53891cae5797f6e">vector_table</td>
6003 <td id="rpip95790482c95b02ce7935">address of the vector table to use for core 1 </td>
6009 <p class="see" id="rpipe0ab8c21f67569c8a483" data-parent-id="rpipb756b8731f266dc07fa0" data-target-for="rpipe0ab8c21f67569c8a483"><span class="label" id="rpipcc37f4e9712d4ec24260" data-parent-id="rpipe0ab8c21f67569c8a483" data-target-for="rpipcc37f4e9712d4ec24260">See also</span><span class="target" id="rpip368f22c1aa278cb7d0c8" data-parent-id="rpipe0ab8c21f67569c8a483" data-target-for="rpip368f22c1aa278cb7d0c8"><a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" title="Reset core 1." id="rpipef8219d42e3c71310fb9" data-adjusted="true">multicore_reset_core1</a> </span></p>
6015 <a id="gac1926bb2da43016e5d14eb52c8c123f4" name="gac1926bb2da43016e5d14eb52c8c123f4"></a>
6018 <h4 id="rpip495cda9698faec59a011">
6019 <a class="anchor" href="#rpip495cda9698faec59a011"></a>◆ multicore_launch_core1_with_stack()</h4>
6020 <div class="memitem" id="rpipa59f2778a3a1425f8699">
6021 <div class="memproto" id="rpipe248832c0e4405ca35d0">
6022 <table class="memname" id="rpip4ec77ed087dfdabc99f8">
6023 <tr id="rpip90f7243d7668ea2c9d6a">
6024 <td class="memname" id="rpip1bdb55d11c4d5e1f60dc">void multicore_launch_core1_with_stack </td>
6025 <td id="rpip69bd5d9b993b4ef020b6">(</td>
6026 <td class="paramtype" id="rpipe658ee2264becf0147fe">void(*)(void)Â </td>
6027 <td class="paramname" id="rpipf19a15fd378e9a1e7719">
6028 <em id="rpip10b64f0a7f4c5052c694">entry</em>, </td>
6030 <tr id="rpipe82478bb04de1e69cb89">
6031 <td class="paramkey" id="rpipa44499e764fe8573212c"></td>
6032 <td id="rpipefde919fb68bfcc3242d"></td>
6033 <td class="paramtype" id="rpip727749b2341a9505d31a">uint32_t *Â </td>
6034 <td class="paramname" id="rpip38b9bf159d390ac88565">
6035 <em id="rpip32528545e1f2a8c33ab5">stack_bottom</em>, </td>
6037 <tr id="rpipc8334d8494a8511fb516">
6038 <td class="paramkey" id="rpip91a7aa3c0cd80947696c"></td>
6039 <td id="rpip8fd2ba7fb074d50b5e32"></td>
6040 <td class="paramtype" id="rpip28ee5bc7b3f6178a861e">size_t </td>
6041 <td class="paramname" id="rpipacf57fa70363eae1585a">
6042 <em id="rpipb230ac387dff901985ef">stack_size_bytes</em>Â </td>
6044 <tr id="rpip82b4b77bc359d0e4d7ea">
6045 <td id="rpip6af5a7e65637c2209622"></td>
6046 <td id="rpip1a0129028af65c9b2f05">)</td>
6047 <td id="rpip3c9b854ae46ff22ebd6f"></td>
6048 <td id="rpip10a27c6a36547041d20c"></td>
6052 <div class="memdoc" id="rpipdc12d516b3d81cf3d685">
6054 <p id="rpip192bff07e175ee1e963e">Launch code on core 1 with stack. </p>
6055 <p id="rpip34363b3eed812c82d75b">Wake up (a previously reset) core 1 and enter the given function on core 1 using the passed stack for core 1</p>
6056 <p id="rpipb03681edd1f4c6e92202">core 1 must previously have been reset either as a result of a system reset or by calling <a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" id="rpip043450d9405d1b3ea26b" data-adjusted="true">multicore_reset_core1</a></p>
6057 <p id="rpip1a97e04c5a115dae89c0">core 1 will use the same vector table as core 0</p>
6058 <h4 id="rpip5ee4e4d5ddf3cced8ca3" data-parent-id="rpip26983840eb6b9d83396d" data-target-for="rpip5ee4e4d5ddf3cced8ca3">Parameters</h4>
6059 <p class="paragraph" id="rpipd43c40dab37f04cfb680" data-parent-id="rpip26983840eb6b9d83396d" data-target-for="rpipd43c40dab37f04cfb680">
6061 <table class="params" id="rpip204528f0c8bc6a311a68">
6062 <tr id="rpipf7fa3820d6601a4dea95">
6063 <td class="paramname" id="rpip88a676ae53b6fd293928">entry</td>
6064 <td id="rpipa5d019c60a7c0991c5e8">Function entry point </td>
6066 <tr id="rpipe2f021eea3d5c03b8574">
6067 <td class="paramname" id="rpipcbef9fe247441937f935">stack_bottom</td>
6068 <td id="rpip8d1f68a67068a956c592">The bottom (lowest address) of the stack </td>
6070 <tr id="rpipca1d9073d7624831ab93">
6071 <td class="paramname" id="rpip98a9a30a1661ddd86979">stack_size_bytes</td>
6072 <td id="rpip78b32d92b461e8aa75d3">The size of the stack in bytes (must be a multiple of 4) </td>
6078 <p class="see" id="rpipe8a0a76d368d47a034de" data-parent-id="rpipdc12d516b3d81cf3d685" data-target-for="rpipe8a0a76d368d47a034de"><span class="label" id="rpip09110951839f0b8e3a53" data-parent-id="rpipe8a0a76d368d47a034de" data-target-for="rpip09110951839f0b8e3a53">See also</span><span class="target" id="rpipc60ec113652ec32d870f" data-parent-id="rpipe8a0a76d368d47a034de" data-target-for="rpipc60ec113652ec32d870f"><a class="el" href="#gad7a189a5f44f0124d74aa5b206f9a262" title="Reset core 1." id="rpip684af1f7e26ef38b13ac" data-adjusted="true">multicore_reset_core1</a> </span></p>
6084 <a id="gad7a189a5f44f0124d74aa5b206f9a262" name="gad7a189a5f44f0124d74aa5b206f9a262"></a>
6087 <h4 id="rpip90b4eadeb72ecdadde19">
6088 <a class="anchor" href="#rpip90b4eadeb72ecdadde19"></a>◆ multicore_reset_core1()</h4>
6089 <div class="memitem" id="rpipfc80fa34462aa04e1a10">
6090 <div class="memproto" id="rpip3a4426196dedcb973958">
6091 <table class="memname" id="rpipc7b0d8877d579dcea26d">
6092 <tr id="rpipd66141cf8b77d8d49c3b">
6093 <td class="memname" id="rpipeb8dcce77104eb400a8f">void multicore_reset_core1 </td>
6094 <td id="rpipd5442fe4fa695dc53641">(</td>
6095 <td class="paramtype" id="rpipfba4a4f5a466f1756b47">void </td>
6096 <td class="paramname" id="rpip9f6aee314b574756b71a"></td>
6097 <td id="rpip15edaaf5613b5ae9fcca">)</td>
6098 <td id="rpipb532ee51d2bc80736abd"></td>
6102 <div class="memdoc" id="rpipc2d16984d348afe07a0d">
6104 <p id="rpip5400b868376e32d1ffff">Reset core 1. </p>
6105 <p id="rpip2e54364e4a2e1743feb8">This function can be used to reset core 1 into its initial state (ready for launching code against via <a class="el" href="#ga46ea5e2efc181aba1d4d1de06a375c59" id="rpipfa6db7a91b0292f449e7" data-adjusted="true">multicore_launch_core1</a> and similar methods)</p>
6106 <div class="admonitionblock note" id="rpip1939922a920e8c9b1c18" data-parent-id="rpipc2d16984d348afe07a0d"><table>
6107 <tr data-target="true" data-target-for="rpip1939922a920e8c9b1c18">
6108 <td class="icon" id="rpipe680740950a6c0fbb007" data-parent-id="rpip1939922a920e8c9b1c18"><div class="title" data-target="true" data-target-for="rpipe680740950a6c0fbb007">Note</div></td>
6109 <td class="content" id="rpipfdda1521d884643e37e8" data-parent-id="rpip1939922a920e8c9b1c18" data-target-for="rpipfdda1521d884643e37e8">this function should only be called from core 0 </td>
6119 <h3 id="multicore_fifo">
6120 <a class="anchor" href="#multicore_fifo"></a>fifo</h3>
6121 <div class="ingroups" id="rpip19aa766ffa55d58a857d">Part of: <a class="el" href="high_level.html" id="rpipdb9a3e981db740884913">High Level APIs</a> » <a class="el" href="high_level.html#pico_multicore" id="rpip3e509e5b18fa0b38d46e">pico_multicore</a>
6123 <p id="rpip59a24aae2a9c30c1a14a">Functions for the inter-core FIFOs.
6124 <a href="#gab00028b9849e738cc38f" id="rpip8bcf0504adff7fedd63d" data-adjusted="true">More...</a></p>
6126 <h4 id="rpipb87dc9118987630d9b59">
6127 <a class="anchor" href="#rpipb87dc9118987630d9b59"></a>Functions</h4>
6128 <ul class="memberdecls" id="rpipfad7639e48e80f0fa3a2" data-parent-id="rpipca5247f37c6e6a7c88d9">
6129 <li class="memitem">
6130 <p data-target="true" data-target-for="rpipfad7639e48e80f0fa3a2"><span class="memItemLeft" data-target="true" id="rpip5647acc3b1fb75ec7e93" data-parent-id="rpipfad7639e48e80f0fa3a2" data-target-for="rpip5647acc3b1fb75ec7e93">static bool </span><span class="memItemRight" data-target="true" id="rpip37054e5405aebb0f1c75" data-parent-id="rpipfad7639e48e80f0fa3a2" data-target-for="rpip37054e5405aebb0f1c75"><a class="el" href="#gaffd246b81370d37fc13181a561303834" id="rpip07544ec0c086201ba4e1" data-adjusted="true">multicore_fifo_rvalid</a> (void)</span></p>
6132 <li class="memdesc">
6133 <p data-target="true" data-target-for="rpip93900f325fe1b31684ff"><span class="mdescLeft" data-target="true" id="rpip825073934037031b85e7" data-parent-id="rpip93900f325fe1b31684ff" data-target-for="rpip825073934037031b85e7">Â </span><span class="mdescRight" data-target="true" id="rpip2b7ea5403c4c091d6f72" data-parent-id="rpip93900f325fe1b31684ff" data-target-for="rpip2b7ea5403c4c091d6f72">Check the read FIFO to see if there is data available (sent by the other core) <br id="rpip302b0bff3089be42b223"></span></p>
6135 <li class="memitem">
6136 <p data-target="true" data-target-for="rpip8d6046b043cb6a1e9095"><span class="memItemLeft" data-target="true" id="rpipe4237b6dd74da821e775" data-parent-id="rpip8d6046b043cb6a1e9095" data-target-for="rpipe4237b6dd74da821e775">static bool </span><span class="memItemRight" data-target="true" id="rpipf419134edf914fabd059" data-parent-id="rpip8d6046b043cb6a1e9095" data-target-for="rpipf419134edf914fabd059"><a class="el" href="#ga6065367210695961c11ab3706140d3a9" id="rpip12915f3b07c1e4a5bb60" data-adjusted="true">multicore_fifo_wready</a> (void)</span></p>
6138 <li class="memdesc">
6139 <p data-target="true" data-target-for="rpip940606d9fe070765aaff"><span class="mdescLeft" data-target="true" id="rpipd3e4ae52616b3bd65b11" data-parent-id="rpip940606d9fe070765aaff" data-target-for="rpipd3e4ae52616b3bd65b11">Â </span><span class="mdescRight" data-target="true" id="rpip25da030c28e13b32027d" data-parent-id="rpip940606d9fe070765aaff" data-target-for="rpip25da030c28e13b32027d">Check the write FIFO to see if it has space for more data. <br id="rpip67dd293b27ab03b9fbe8"></span></p>
6141 <li class="memitem">
6142 <p data-target="true" data-target-for="rpip85eefc2238f234d2071c"><span class="memItemLeft" data-target="true" id="rpip7cc5e5b1f98308a4ee92" data-parent-id="rpip85eefc2238f234d2071c" data-target-for="rpip7cc5e5b1f98308a4ee92">void </span><span class="memItemRight" data-target="true" id="rpipe201ee7f38dc9bd02af2" data-parent-id="rpip85eefc2238f234d2071c" data-target-for="rpipe201ee7f38dc9bd02af2"><a class="el" href="#ga134933a693c53c4f94c9d3cd3cabfc79" id="rpip7016bda0fdbfc315998b" data-adjusted="true">multicore_fifo_push_blocking</a> (uint32_t data)</span></p>
6144 <li class="memdesc">
6145 <p data-target="true" data-target-for="rpipd508545abf2334902dbc"><span class="mdescLeft" data-target="true" id="rpip7444bb20af6e0f6c239f" data-parent-id="rpipd508545abf2334902dbc" data-target-for="rpip7444bb20af6e0f6c239f">Â </span><span class="mdescRight" data-target="true" id="rpip017da358b8e1a9e16977" data-parent-id="rpipd508545abf2334902dbc" data-target-for="rpip017da358b8e1a9e16977">Push data on to the write FIFO (data to the other core). <br id="rpip4e4b196ace3f28da7e49"></span></p>
6147 <li class="memitem">
6148 <p data-target="true" data-target-for="rpip1f0f2870e13bfa1f10bd"><span class="memItemLeft" data-target="true" id="rpip1291d778e39216c66ef0" data-parent-id="rpip1f0f2870e13bfa1f10bd" data-target-for="rpip1291d778e39216c66ef0">bool </span><span class="memItemRight" data-target="true" id="rpip33517bdadf9df7adbcf4" data-parent-id="rpip1f0f2870e13bfa1f10bd" data-target-for="rpip33517bdadf9df7adbcf4"><a class="el" href="#ga0c32cfcd182d5f1d3a25b6fb503352b7" id="rpipd8f689f71ab63256ee91" data-adjusted="true">multicore_fifo_push_timeout_us</a> (uint32_t data, uint64_t timeout_us)</span></p>
6150 <li class="memdesc">
6151 <p data-target="true" data-target-for="rpip1efe663593285e6b710d"><span class="mdescLeft" data-target="true" id="rpip9a2a56405f94086f6bca" data-parent-id="rpip1efe663593285e6b710d" data-target-for="rpip9a2a56405f94086f6bca">Â </span><span class="mdescRight" data-target="true" id="rpipc98dbda9bc46584c16ef" data-parent-id="rpip1efe663593285e6b710d" data-target-for="rpipc98dbda9bc46584c16ef">Push data on to the write FIFO (data to the other core) with timeout. <br id="rpip28d358634a8a9ca23ea2"></span></p>
6153 <li class="memitem">
6154 <p data-target="true" data-target-for="rpipeeb9f7ce728d454e2c9f"><span class="memItemLeft" data-target="true" id="rpip8c8aa78aa771bd23f946" data-parent-id="rpipeeb9f7ce728d454e2c9f" data-target-for="rpip8c8aa78aa771bd23f946">uint32_t </span><span class="memItemRight" data-target="true" id="rpip54a0d2ee7817770ff4f4" data-parent-id="rpipeeb9f7ce728d454e2c9f" data-target-for="rpip54a0d2ee7817770ff4f4"><a class="el" href="#ga929272dd1056d8ae05667beda4adb0fc" id="rpip266da64b0934b66db0cf" data-adjusted="true">multicore_fifo_pop_blocking</a> (void)</span></p>
6156 <li class="memdesc">
6157 <p data-target="true" data-target-for="rpipf461b14a1709117246df"><span class="mdescLeft" data-target="true" id="rpip958520cdf9306007cda2" data-parent-id="rpipf461b14a1709117246df" data-target-for="rpip958520cdf9306007cda2">Â </span><span class="mdescRight" data-target="true" id="rpip85e32153c435be8de58c" data-parent-id="rpipf461b14a1709117246df" data-target-for="rpip85e32153c435be8de58c">Pop data from the read FIFO (data from the other core). <br id="rpip262271035cc45a289d6f"></span></p>
6159 <li class="memitem">
6160 <p data-target="true" data-target-for="rpip3d4cbe66f437de030473"><span class="memItemLeft" data-target="true" id="rpipc1b6c80795724e12345a" data-parent-id="rpip3d4cbe66f437de030473" data-target-for="rpipc1b6c80795724e12345a">bool </span><span class="memItemRight" data-target="true" id="rpipf1b3eb1830d1203fa73d" data-parent-id="rpip3d4cbe66f437de030473" data-target-for="rpipf1b3eb1830d1203fa73d"><a class="el" href="#ga27824f253c72ae50ae97e6f516220c60" id="rpipe0707c065b5d4a5419a2" data-adjusted="true">multicore_fifo_pop_timeout_us</a> (uint64_t timeout_us, uint32_t *out)</span></p>
6162 <li class="memdesc">
6163 <p data-target="true" data-target-for="rpip4d9c0f4737e45d59ff77"><span class="mdescLeft" data-target="true" id="rpip7e1ab0dc11d9c8f5152c" data-parent-id="rpip4d9c0f4737e45d59ff77" data-target-for="rpip7e1ab0dc11d9c8f5152c">Â </span><span class="mdescRight" data-target="true" id="rpip05a4675286a8e39249a9" data-parent-id="rpip4d9c0f4737e45d59ff77" data-target-for="rpip05a4675286a8e39249a9">Pop data from the read FIFO (data from the other core) with timeout. <br id="rpipc6c67361c911a877c3ad"></span></p>
6165 <li class="memitem">
6166 <p data-target="true" data-target-for="rpip7caa8946c5518a952ba6"><span class="memItemLeft" data-target="true" id="rpip0dfba880fbf347b076db" data-parent-id="rpip7caa8946c5518a952ba6" data-target-for="rpip0dfba880fbf347b076db">static void </span><span class="memItemRight" data-target="true" id="rpip5d0ab41bc67802e2967c" data-parent-id="rpip7caa8946c5518a952ba6" data-target-for="rpip5d0ab41bc67802e2967c"><a class="el" href="#ga436e676544edeafb2f2f9e7245282cbf" id="rpipa32fb0f7bbba9c693aa8" data-adjusted="true">multicore_fifo_drain</a> (void)</span></p>
6168 <li class="memdesc">
6169 <p data-target="true" data-target-for="rpipf59b22413052069e770f"><span class="mdescLeft" data-target="true" id="rpip4080fc756e148b09de36" data-parent-id="rpipf59b22413052069e770f" data-target-for="rpip4080fc756e148b09de36">Â </span><span class="mdescRight" data-target="true" id="rpipb75c37bf9fd6cc0e98fe" data-parent-id="rpipf59b22413052069e770f" data-target-for="rpipb75c37bf9fd6cc0e98fe">Discard any data in the read FIFO. <br id="rpipc5ebb21d35170e681cd0"></span></p>
6171 <li class="memitem">
6172 <p data-target="true" data-target-for="rpip16a8589771c2c264adeb"><span class="memItemLeft" data-target="true" id="rpip3fff146a8e0de3641333" data-parent-id="rpip16a8589771c2c264adeb" data-target-for="rpip3fff146a8e0de3641333">static void </span><span class="memItemRight" data-target="true" id="rpip16a2f3c576c6ffd17fbe" data-parent-id="rpip16a8589771c2c264adeb" data-target-for="rpip16a2f3c576c6ffd17fbe"><a class="el" href="#ga96583311e8237cf590d9c78052b288eb" id="rpip022c02a07766d3ca973b" data-adjusted="true">multicore_fifo_clear_irq</a> (void)</span></p>
6174 <li class="memdesc">
6175 <p data-target="true" data-target-for="rpipdf13b4e6a41665051649"><span class="mdescLeft" data-target="true" id="rpip4ada4f33af279087b032" data-parent-id="rpipdf13b4e6a41665051649" data-target-for="rpip4ada4f33af279087b032">Â </span><span class="mdescRight" data-target="true" id="rpip759c9c10a1cd0061fe40" data-parent-id="rpipdf13b4e6a41665051649" data-target-for="rpip759c9c10a1cd0061fe40">Clear FIFO interrupt. <br id="rpip63d182bf72678771f705"></span></p>
6177 <li class="memitem">
6178 <p data-target="true" data-target-for="rpip631cd6ecce949bf8c68a"><span class="memItemLeft" data-target="true" id="rpip8ad9e67ef6b9838a4cab" data-parent-id="rpip631cd6ecce949bf8c68a" data-target-for="rpip8ad9e67ef6b9838a4cab">static uint32_t </span><span class="memItemRight" data-target="true" id="rpipa982150d0c95abe04f10" data-parent-id="rpip631cd6ecce949bf8c68a" data-target-for="rpipa982150d0c95abe04f10"><a class="el" href="#ga7c5944bf2b7266465dfe6d4bac4b1c58" id="rpip1594cec528b0a65f9952" data-adjusted="true">multicore_fifo_get_status</a> (void)</span></p>
6180 <li class="memdesc">
6181 <p data-target="true" data-target-for="rpip53aa76908ceb886de877"><span class="mdescLeft" data-target="true" id="rpip47cf53de674e5f8b6da0" data-parent-id="rpip53aa76908ceb886de877" data-target-for="rpip47cf53de674e5f8b6da0">Â </span><span class="mdescRight" data-target="true" id="rpip378aaf6fa679e24d106f" data-parent-id="rpip53aa76908ceb886de877" data-target-for="rpip378aaf6fa679e24d106f">Get FIFO statuses. <br id="rpipb9417eb9662dbfd20c3e"></span></p>
6184 <a name="details" id="gab00028b9849e738cc38f"></a>
6187 <h4 id="rpipbab3e4329a0aa3ad7deb">
6188 <a class="anchor" href="#rpipbab3e4329a0aa3ad7deb"></a>Detailed Description</h4>
6189 <p id="rpipeb021c94bf58401b95f2">Functions for the inter-core FIFOs. </p>
6190 <p id="rpipaa809a9e4ab074b6ce6f">The RP2040 contains two FIFOs for passing data, messages or ordered events between the two cores. Each FIFO is 32 bits wide, and 8 entries deep. One of the FIFOs can only be written by core 0, and read by core 1. The other can only be written by core 1, and read by core 0.</p>
6191 <div class="admonitionblock note" id="rpip36f0fd4a3c9bdcecb1c8" data-parent-id="rpip6ea06f32ae561e5a4fd2"><table>
6192 <tr data-target="true" data-target-for="rpip36f0fd4a3c9bdcecb1c8">
6193 <td class="icon" id="rpipd5761b43e50dea2645fb" data-parent-id="rpip36f0fd4a3c9bdcecb1c8"><div class="title" data-target="true" data-target-for="rpipd5761b43e50dea2645fb">Note</div></td>
6194 <td class="content" id="rpip6a8aead06cd934ec5801" data-parent-id="rpip36f0fd4a3c9bdcecb1c8" data-target-for="rpip6a8aead06cd934ec5801">The inter-core FIFOs are a very precious resource and are frequently used for SDK functionality (e.g. during core 1 launch or by the <a class="el" href="high_level.html#multicore_lockout" id="rpip5b262ff18b2d907bb239">lockout</a> functions). Additionally they are often required for the exclusive use of an RTOS (e.g. FreeRTOS SMP). For these reasons it is suggested that you do not use the FIFO for your own purposes unless none of the above concerns apply; the majority of cases for transferring data between cores can be eqaully well handled by using a <a class="el" href="high_level.html#queue" id="rpip3655ee723081d47f937f">queue</a> </td>
6199 <h4 id="rpip8f4035b616940f2af398">
6200 <a class="anchor" href="#rpip8f4035b616940f2af398"></a>Function Documentation</h4>
6201 <a id="ga96583311e8237cf590d9c78052b288eb" name="ga96583311e8237cf590d9c78052b288eb"></a>
6203 <h5 id="rpipad53abd40d86b08b3beb">
6204 <a class="anchor" href="#rpipad53abd40d86b08b3beb"></a>◆ multicore_fifo_clear_irq()</h5>
6205 <div class="memitem" id="rpip284b64e264d86c3ee8c4">
6206 <div class="memproto" id="rpip72b63b408129cc9899eb">
6207 <table class="mlabels" id="rpipee0e9816a3ba9c70da30">
6208 <tr id="rpip5a2fada40898303416fb">
6209 <td class="mlabels-left" id="rpipc6260ee89950895a9933">
6210 <table class="memname" id="rpipfcc600ea90bb4f4f83dc">
6211 <tr id="rpip52503fa2876613093dec">
6212 <td class="memname" id="rpip2406355c015a6a40e8fe">static void multicore_fifo_clear_irq </td>
6213 <td id="rpipef60ca15bdf7a8294cd2">(</td>
6214 <td class="paramtype" id="rpipa688a3e6bae679415e35">void </td>
6215 <td class="paramname" id="rpip740abdb800c268e78c23"></td>
6216 <td id="rpip92066f5a32a37642fac5">)</td>
6217 <td id="rpip0b98192fc5372786e302"></td>
6221 <td class="mlabels-right" id="rpipb088d52c3a036c915ced">
6222 <span class="mlabels" id="rpipafacac18ad6bd18d49ed"><span class="mlabel" id="rpip6b8a8a0f0c888951713b">inline</span><span class="mlabel" id="rpip3fee3048b2b1046506ab">static</span></span> </td>
6226 <div class="memdoc" id="rpip44ad19376e7ec7ded082">
6228 <p id="rpip8d97f6c14f37f8679133">Clear FIFO interrupt. </p>
6229 <p id="rpip538dbb4d164fd689c31e">Note that this only clears an interrupt that was caused by the ROE or WOF flags. To clear the VLD flag you need to use one of the 'pop' or 'drain' functions.</p>
6230 <p id="rpipe91bb66a70c681605565">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpipc749d4a8d28281ff05aa">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6231 <p class="see" id="rpip3a88a0725eb192add04b" data-parent-id="rpip44ad19376e7ec7ded082" data-target-for="rpip3a88a0725eb192add04b"><span class="label" id="rpipbd0b423b94916518c5bc" data-parent-id="rpip3a88a0725eb192add04b" data-target-for="rpipbd0b423b94916518c5bc">See also</span><span class="target" id="rpipa34556de85e90f36f674" data-parent-id="rpip3a88a0725eb192add04b" data-target-for="rpipa34556de85e90f36f674"><a class="el" href="#ga7c5944bf2b7266465dfe6d4bac4b1c58" title="Get FIFO statuses." id="rpipb096bd8eefbb5b70cd34" data-adjusted="true">multicore_fifo_get_status</a> </span></p>
6237 <a id="ga436e676544edeafb2f2f9e7245282cbf" name="ga436e676544edeafb2f2f9e7245282cbf"></a>
6240 <h5 id="rpipc148999571dfa3789860">
6241 <a class="anchor" href="#rpipc148999571dfa3789860"></a>◆ multicore_fifo_drain()</h5>
6242 <div class="memitem" id="rpip5f0320c27fa39f8750ec">
6243 <div class="memproto" id="rpip6b1320ff8d8af3f5faa9">
6244 <table class="mlabels" id="rpip7e8671dbe08642e394a9">
6245 <tr id="rpipbd113b84f06322ece418">
6246 <td class="mlabels-left" id="rpipb5d99ab1b3e5638ca31d">
6247 <table class="memname" id="rpip1a25e8338b89d3f9610c">
6248 <tr id="rpip2d4b3c3cda00e4ce1ac6">
6249 <td class="memname" id="rpipcbd92c3b83523d7d81d2">static void multicore_fifo_drain </td>
6250 <td id="rpipdc61d2f026d74f964eaf">(</td>
6251 <td class="paramtype" id="rpipcf2ceed33cb59e6ee1b6">void </td>
6252 <td class="paramname" id="rpip962ab9a1390301897856"></td>
6253 <td id="rpip7c4a1aa21886b678148e">)</td>
6254 <td id="rpipf021c6f308d623935bb5"></td>
6258 <td class="mlabels-right" id="rpip034f778239612df5fc5b">
6259 <span class="mlabels" id="rpip4ec9b19a4496575bf7f8"><span class="mlabel" id="rpipe4f44e5e34dad44f62f9">inline</span><span class="mlabel" id="rpipecaa2872f6912432925c">static</span></span> </td>
6263 <div class="memdoc" id="rpipf6dccb586d7d8b3db14c">
6265 <p id="rpipa566e5aaaf722cfa23fe">Discard any data in the read FIFO. </p>
6266 <p id="rpip2c6638cae89f2bd75825">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip6cdb2803d76657ba7204">fifo</a> section for considerations regarding use of the inter-core FIFOs </p>
6270 <a id="ga7c5944bf2b7266465dfe6d4bac4b1c58" name="ga7c5944bf2b7266465dfe6d4bac4b1c58"></a>
6273 <h5 id="rpipe0ea8b3dc9b1d7e04633">
6274 <a class="anchor" href="#rpipe0ea8b3dc9b1d7e04633"></a>◆ multicore_fifo_get_status()</h5>
6275 <div class="memitem" id="rpipeb8a7c90e038f8c8674f">
6276 <div class="memproto" id="rpipc665b9762f11ceccbb96">
6277 <table class="mlabels" id="rpip3a20372a463c9be3ad68">
6278 <tr id="rpipb868bae232aa6b360811">
6279 <td class="mlabels-left" id="rpipe440e6ae31b5cd8fe2b1">
6280 <table class="memname" id="rpip523c7d3f62de95d7810a">
6281 <tr id="rpip1f806bcb7f6424c1de0e">
6282 <td class="memname" id="rpipe5f6421bdebe45e1f9c9">static uint32_t multicore_fifo_get_status </td>
6283 <td id="rpip867459ae9718a46481a0">(</td>
6284 <td class="paramtype" id="rpipd6eb0e3d94d98b187d1e">void </td>
6285 <td class="paramname" id="rpip15c524e2d120261f66ce"></td>
6286 <td id="rpip3d0ddb5c515364febffe">)</td>
6287 <td id="rpip41d935fe4aad6b8e3461"></td>
6291 <td class="mlabels-right" id="rpip9ee5ef66c1146fc5d143">
6292 <span class="mlabels" id="rpip160a3830bd192688fcc8"><span class="mlabel" id="rpip6c96ab3a06db3fa7febe">inline</span><span class="mlabel" id="rpipae9e7885be6c73f840d0">static</span></span> </td>
6296 <div class="memdoc" id="rpip7e270f3f1fd56b66a7ce">
6298 <p id="rpip558aa686a301ab930084">Get FIFO statuses. </p>
6299 <h4 class="label" id="rpip617f44caa715ab82fe13" data-parent-id="rpipf1ddc049105e5fd9db81" data-target-for="rpip617f44caa715ab82fe13">Returns</h4>
6300 <p class="returns" id="rpip76ed9c8dfba4ed6fddd1" data-parent-id="rpipf1ddc049105e5fd9db81" data-target-for="rpip76ed9c8dfba4ed6fddd1">The statuses as a bitfield</p>
6301 <table class="tableblock frame-all grid-all stretch" id="rpipf0a7e49238bc0f9212db" data-parent-id="rpip7e270f3f1fd56b66a7ce" data-target-for="rpipf0a7e49238bc0f9212db">
6302 <tr class="markdownTableHead" id="rpip71ea65fde1b987410df8">
6303 <th class="markdownTableHeadNone" id="rpip15139a4d5f60e551f2ce">Bit </th>
6304 <th class="markdownTableHeadNone" id="rpip6e527c9dc8fc5a285989">Description </th>
6306 <tr class="markdownTableRowOdd" id="rpip9fb153c06b1b84543a52">
6307 <td class="tableblock" id="rpipb1774c3b1a42faa47799" data-parent-id="rpip9fb153c06b1b84543a52" data-target-for="rpipb1774c3b1a42faa47799">3 </td>
6308 <td class="tableblock" id="rpip1be63531a91394c1a9ac" data-parent-id="rpip9fb153c06b1b84543a52" data-target-for="rpip1be63531a91394c1a9ac">Sticky flag indicating the RX FIFO was read when empty (ROE). This read was ignored by the FIFO. </td>
6310 <tr class="markdownTableRowEven" id="rpipaeebc7ad3d57f9fece57">
6311 <td class="tableblock" id="rpip98e8353b424704f12726" data-parent-id="rpipaeebc7ad3d57f9fece57" data-target-for="rpip98e8353b424704f12726">2 </td>
6312 <td class="tableblock" id="rpip5a3e0b01cb2e3fd8b1aa" data-parent-id="rpipaeebc7ad3d57f9fece57" data-target-for="rpip5a3e0b01cb2e3fd8b1aa">Sticky flag indicating the TX FIFO was written when full (WOF). This write was ignored by the FIFO. </td>
6314 <tr class="markdownTableRowOdd" id="rpip542d6031fbd7ea3ae717">
6315 <td class="tableblock" id="rpip2a751f0dc7c7ea9a985f" data-parent-id="rpip542d6031fbd7ea3ae717" data-target-for="rpip2a751f0dc7c7ea9a985f">1 </td>
6316 <td class="tableblock" id="rpipd797ca4c754469286071" data-parent-id="rpip542d6031fbd7ea3ae717" data-target-for="rpipd797ca4c754469286071">Value is 1 if this core’s TX FIFO is not full (i.e. if FIFO_WR is ready for more data) </td>
6318 <tr class="markdownTableRowEven" id="rpip94cc1999dbf893622d10">
6319 <td class="tableblock" id="rpipaf858bd9ab383354fb65" data-parent-id="rpip94cc1999dbf893622d10" data-target-for="rpipaf858bd9ab383354fb65">0 </td>
6320 <td class="tableblock" id="rpipc0439227bcc3ef20a1f6" data-parent-id="rpip94cc1999dbf893622d10" data-target-for="rpipc0439227bcc3ef20a1f6">Value is 1 if this core’s RX FIFO is not empty (i.e. if FIFO_RD is valid) </td>
6324 <p id="rpip37fdf830dc308522d9ff">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip31165d8dc0cd4ec315a7">fifo</a> section for considerations regarding use of the inter-core FIFOs </p>
6328 <a id="ga929272dd1056d8ae05667beda4adb0fc" name="ga929272dd1056d8ae05667beda4adb0fc"></a>
6331 <h5 id="rpipde847863b2bc13a90058">
6332 <a class="anchor" href="#rpipde847863b2bc13a90058"></a>◆ multicore_fifo_pop_blocking()</h5>
6333 <div class="memitem" id="rpip4043c050c4aa194da2cf">
6334 <div class="memproto" id="rpipddbc333d9c0eeb640843">
6335 <table class="memname" id="rpip07aa1ff6d09c4f1d9b25">
6336 <tr id="rpip87df01e98e6af6827dea">
6337 <td class="memname" id="rpipb0120dfe92848aaf3bb2">uint32_t multicore_fifo_pop_blocking </td>
6338 <td id="rpipca4fbc62bb1f8e577b26">(</td>
6339 <td class="paramtype" id="rpip85bf725c378d79d1ab37">void </td>
6340 <td class="paramname" id="rpipe32e7ec7cb1de26796d8"></td>
6341 <td id="rpip97855b22c403f4862e38">)</td>
6342 <td id="rpip0f7e1025488030813f9e"></td>
6346 <div class="memdoc" id="rpip3c9abc1b6e2186529af5">
6348 <p id="rpip27d3d3e47ec825d80291">Pop data from the read FIFO (data from the other core). </p>
6349 <p id="rpipc84aca25c166dfd3a760">This function will block until there is data ready to be read Use <a class="el" href="#gaffd246b81370d37fc13181a561303834" title="Check the read FIFO to see if there is data available (sent by the other core)" id="rpip77b74e7f729c7282ede9" data-adjusted="true">multicore_fifo_rvalid()</a> to check if data is ready to be read if you don't want to block.</p>
6350 <p id="rpipb98db8a78c6f927c894e">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip153d61138b0a29e024ef">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6351 <h4 class="label" id="rpipee89ae27d6bfadd2cffe" data-parent-id="rpip6dd3d104cd5341be6962" data-target-for="rpipee89ae27d6bfadd2cffe">Returns</h4>
6352 <p class="returns" id="rpip9bf0f0d77ac1b047ebfa" data-parent-id="rpip6dd3d104cd5341be6962" data-target-for="rpip9bf0f0d77ac1b047ebfa">32 bit data from the read FIFO. </p>
6356 <a id="ga27824f253c72ae50ae97e6f516220c60" name="ga27824f253c72ae50ae97e6f516220c60"></a>
6359 <h5 id="rpipde0b702f3f137c1a160f">
6360 <a class="anchor" href="#rpipde0b702f3f137c1a160f"></a>◆ multicore_fifo_pop_timeout_us()</h5>
6361 <div class="memitem" id="rpipb95e754d02953f8affbd">
6362 <div class="memproto" id="rpip056af88ed2e1affbaa32">
6363 <table class="memname" id="rpipab7b45532ddaddde21b2">
6364 <tr id="rpipb10cecaa362b3ad14b2b">
6365 <td class="memname" id="rpip3a53aad77f820ccaddfe">bool multicore_fifo_pop_timeout_us </td>
6366 <td id="rpip22591ff1877f788004ae">(</td>
6367 <td class="paramtype" id="rpip78426ebb6e2644e4bf37">uint64_t </td>
6368 <td class="paramname" id="rpipa39a5cc4e87c6851bc77">
6369 <em id="rpipa3b8c424e29a12c16d9a">timeout_us</em>, </td>
6371 <tr id="rpip847e1cb1a90c45b745e5">
6372 <td class="paramkey" id="rpip215408fd9158fc67192a"></td>
6373 <td id="rpip69b5a34a88ec561a0143"></td>
6374 <td class="paramtype" id="rpip4497ecdc69adb1e1cc5c">uint32_t *Â </td>
6375 <td class="paramname" id="rpip2f737577c5b003049624">
6376 <em id="rpip3a737676919adb409317">out</em>Â </td>
6378 <tr id="rpip29ac2b9b20a62a583aa4">
6379 <td id="rpip480bfd7869ad04c72817"></td>
6380 <td id="rpip682bc5cda7c4a93eb925">)</td>
6381 <td id="rpipb6d34082518fdf2ddc00"></td>
6382 <td id="rpip4fe794e228e046e00a60"></td>
6386 <div class="memdoc" id="rpip9ff1620d1fe6c7a8b5d2">
6388 <p id="rpipe7297f89f932fabf2443">Pop data from the read FIFO (data from the other core) with timeout. </p>
6389 <p id="rpip8ac4d6cee4a7f6a6137a">This function will block until there is data ready to be read or the timeout is reached</p>
6390 <p id="rpipbf3bab97383de93d2840">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip0a6daadd3a0c7e618817">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6391 <h4 id="rpip7a4404337fb01018146d" data-parent-id="rpip4018606dc9a0c0630b2a" data-target-for="rpip7a4404337fb01018146d">Parameters</h4>
6392 <p class="paragraph" id="rpip0d5f1b9a274fc77da1de" data-parent-id="rpip4018606dc9a0c0630b2a" data-target-for="rpip0d5f1b9a274fc77da1de">
6394 <table class="params" id="rpipcabb54d203e55f26e84c">
6395 <tr id="rpipbe1c749a57380c0fb7a2">
6396 <td class="paramname" id="rpip62080f82f11a55268fd7">timeout_us</td>
6397 <td id="rpip47d4537cdcf7f5b9f665">the timeout in microseconds </td>
6399 <tr id="rpip2599fb48114ee198ccaa">
6400 <td class="paramname" id="rpipe0418955c1624a50054d">out</td>
6401 <td id="rpip49e335b543dd34446297">the location to store the popped data if available </td>
6407 <h4 class="label" id="rpip8231ea1e541934426e4d" data-parent-id="rpip66348981b971432ce7d3" data-target-for="rpip8231ea1e541934426e4d">Returns</h4>
6408 <p class="returns" id="rpipb39248b06447b841c30d" data-parent-id="rpip66348981b971432ce7d3" data-target-for="rpipb39248b06447b841c30d">true if the data was popped and a value copied into <code id="rpip4710baab0043c7eecf5d">out</code>, false if the timeout occurred before data could be popped </p>
6412 <a id="ga134933a693c53c4f94c9d3cd3cabfc79" name="ga134933a693c53c4f94c9d3cd3cabfc79"></a>
6415 <h5 id="rpip9669d84f2879f5032577">
6416 <a class="anchor" href="#rpip9669d84f2879f5032577"></a>◆ multicore_fifo_push_blocking()</h5>
6417 <div class="memitem" id="rpip83d6a0cca399ec4b3483">
6418 <div class="memproto" id="rpip5e07af9c0c67935e7ee4">
6419 <table class="memname" id="rpip0fccc2d61850fd0343bf">
6420 <tr id="rpip9e99dcc2683866191894">
6421 <td class="memname" id="rpip1b26c632aa157967a506">void multicore_fifo_push_blocking </td>
6422 <td id="rpip8860ba92e375036f9374">(</td>
6423 <td class="paramtype" id="rpip2e7526d1289b3d93daf2">uint32_t </td>
6424 <td class="paramname" id="rpip2139214a1888c09b3c5b"><em id="rpip89635932e92693ac433b">data</em></td>
6425 <td id="rpip14b7bb7e77e2963d60b7">)</td>
6426 <td id="rpipa2b48c401f8a8d56a513"></td>
6430 <div class="memdoc" id="rpipd929f32e381199a2cd65">
6432 <p id="rpipbc6de1b341cd6c513b6d">Push data on to the write FIFO (data to the other core). </p>
6433 <p id="rpipce8e331c3f8d542f3753">This function will block until there is space for the data to be sent. Use <a class="el" href="#ga6065367210695961c11ab3706140d3a9" title="Check the write FIFO to see if it has space for more data." id="rpipea45b783e774d6e6dbf9" data-adjusted="true">multicore_fifo_wready()</a> to check if it is possible to write to the FIFO if you don't want to block.</p>
6434 <p id="rpip4b24b4d1030c3b2b56b8">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip7f45369bfef08751a230">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6435 <h4 id="rpipc6656b46143346cb51a1" data-parent-id="rpip80c1957fcc0073db91d9" data-target-for="rpipc6656b46143346cb51a1">Parameters</h4>
6436 <p class="paragraph" id="rpip2e5e888b0140b30de566" data-parent-id="rpip80c1957fcc0073db91d9" data-target-for="rpip2e5e888b0140b30de566">
6438 <table class="params" id="rpip5cbe95aabd5daaee33e3">
6439 <tr id="rpip9afc536ab7d29eed811c">
6440 <td class="paramname" id="rpip42db3ade46c4698ed5a4">data</td>
6441 <td id="rpip0fdfc5c93fd3b26902a1">A 32 bit value to push on to the FIFO </td>
6450 <a id="ga0c32cfcd182d5f1d3a25b6fb503352b7" name="ga0c32cfcd182d5f1d3a25b6fb503352b7"></a>
6453 <h5 id="rpipc5d1f61fa6b1e335a758">
6454 <a class="anchor" href="#rpipc5d1f61fa6b1e335a758"></a>◆ multicore_fifo_push_timeout_us()</h5>
6455 <div class="memitem" id="rpip1e1e72215413483c65b5">
6456 <div class="memproto" id="rpipe380209d5ef2168c307a">
6457 <table class="memname" id="rpip6e4c2d6d076431c973b4">
6458 <tr id="rpip349b176a9fb22f33308f">
6459 <td class="memname" id="rpip8ea6260484186ad758a2">bool multicore_fifo_push_timeout_us </td>
6460 <td id="rpipfb0e19d74f14c3908549">(</td>
6461 <td class="paramtype" id="rpip4d9f96afa12469be6869">uint32_t </td>
6462 <td class="paramname" id="rpipa8127ec5f5d95b698fda">
6463 <em id="rpip91279088db9c94a61c6d">data</em>, </td>
6465 <tr id="rpip71cd4821095f4ed6d9a2">
6466 <td class="paramkey" id="rpip2a3960b9bcd766636377"></td>
6467 <td id="rpip2ceba57d7b8f1cecd2fe"></td>
6468 <td class="paramtype" id="rpip0abbb576ab8e20bd1c30">uint64_t </td>
6469 <td class="paramname" id="rpip86f3942d91a693032ee0">
6470 <em id="rpipfada7a8e5a0833838513">timeout_us</em>Â </td>
6472 <tr id="rpipd2e1df9a3d066f96be8a">
6473 <td id="rpipe3fa805aae674b3712bd"></td>
6474 <td id="rpip8ea23af38454a9b41ef0">)</td>
6475 <td id="rpipfb301c10286849415b96"></td>
6476 <td id="rpip0eba431b78336fc04d42"></td>
6480 <div class="memdoc" id="rpipd23b84c49a3eac490b8c">
6482 <p id="rpip6d4d0a422b5c66a141d7">Push data on to the write FIFO (data to the other core) with timeout. </p>
6483 <p id="rpipcfa4f28d9093c406d1cf">This function will block until there is space for the data to be sent or the timeout is reached</p>
6484 <h4 id="rpip9b8cd47afdad9395fb91" data-parent-id="rpip64704c5be8d54921afa1" data-target-for="rpip9b8cd47afdad9395fb91">Parameters</h4>
6485 <p class="paragraph" id="rpip976e56f2a2b495e813f4" data-parent-id="rpip64704c5be8d54921afa1" data-target-for="rpip976e56f2a2b495e813f4">
6487 <table class="params" id="rpip0d0f41b4b6ff78085479">
6488 <tr id="rpip13885bb9b66e6afdf62f">
6489 <td class="paramname" id="rpip555944be3eff4e8d0b8d">data</td>
6490 <td id="rpip1b68d7d6a80d560cac48">A 32 bit value to push on to the FIFO </td>
6492 <tr id="rpip10568e95321922ca99bf">
6493 <td class="paramname" id="rpipdb271fb6239606ca88d7">timeout_us</td>
6494 <td id="rpip8278d999fc6d39b14843">the timeout in microseconds </td>
6500 <h4 class="label" id="rpip0c96cf6f480086601a7b" data-parent-id="rpip8b72dcbcf9a955e0bb9d" data-target-for="rpip0c96cf6f480086601a7b">Returns</h4>
6501 <p class="returns" id="rpip9fee54210e6c8ad57240" data-parent-id="rpip8b72dcbcf9a955e0bb9d" data-target-for="rpip9fee54210e6c8ad57240">true if the data was pushed, false if the timeout occurred before data could be pushed </p>
6505 <a id="gaffd246b81370d37fc13181a561303834" name="gaffd246b81370d37fc13181a561303834"></a>
6508 <h5 id="rpipff4b13b9cc5be701f40d">
6509 <a class="anchor" href="#rpipff4b13b9cc5be701f40d"></a>◆ multicore_fifo_rvalid()</h5>
6510 <div class="memitem" id="rpipa60e5d832e3a22904255">
6511 <div class="memproto" id="rpip37805c08ef40a767ddee">
6512 <table class="mlabels" id="rpip99114dab6f957824fae6">
6513 <tr id="rpipefd390ccccce830c1055">
6514 <td class="mlabels-left" id="rpipdd0a0341c4310a240c5a">
6515 <table class="memname" id="rpip7e459be43ac56ba7883e">
6516 <tr id="rpip931e01e7681ff2879848">
6517 <td class="memname" id="rpip7b0b6b30f49e4bf1bdd2">static bool multicore_fifo_rvalid </td>
6518 <td id="rpip4ba4e7db7e7f4f7e8d47">(</td>
6519 <td class="paramtype" id="rpip61b72f8e619f397a2287">void </td>
6520 <td class="paramname" id="rpipcf517e020f81cf64a326"></td>
6521 <td id="rpip39ec710ec4f174c96cec">)</td>
6522 <td id="rpip8cdded49060fd6190067"></td>
6526 <td class="mlabels-right" id="rpipae7f61e2e6bcc51b9b49">
6527 <span class="mlabels" id="rpiped6806477b6b38d836fc"><span class="mlabel" id="rpip7587c591ab3ebcdf94cb">inline</span><span class="mlabel" id="rpip4aada08a9003dad91291">static</span></span> </td>
6531 <div class="memdoc" id="rpip14e501aaf99f1d2385bc">
6533 <p id="rpipd51651e5b663cd5840f5">Check the read FIFO to see if there is data available (sent by the other core) </p>
6534 <p id="rpip74252d0a615181c8dba5">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip8fffec975532c8847f2a">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6535 <h4 class="label" id="rpip8b414e11d9e6d2121835" data-parent-id="rpipa2b7f97fff3a2c41ced2" data-target-for="rpip8b414e11d9e6d2121835">Returns</h4>
6536 <p class="returns" id="rpip09c60fa269b2ceb61652" data-parent-id="rpipa2b7f97fff3a2c41ced2" data-target-for="rpip09c60fa269b2ceb61652">true if the FIFO has data in it, false otherwise </p>
6540 <a id="ga6065367210695961c11ab3706140d3a9" name="ga6065367210695961c11ab3706140d3a9"></a>
6543 <h5 id="rpip8c3ebd311c40789ce77f">
6544 <a class="anchor" href="#rpip8c3ebd311c40789ce77f"></a>◆ multicore_fifo_wready()</h5>
6545 <div class="memitem" id="rpip3ceb00ca595a2328450a">
6546 <div class="memproto" id="rpipeaf68f476104f48ed19c">
6547 <table class="mlabels" id="rpip53c1dffae03c7b075bf1">
6548 <tr id="rpip348df73a487bc1b479ca">
6549 <td class="mlabels-left" id="rpip0b283098bca858cd47e1">
6550 <table class="memname" id="rpip7ca6aabeaea1d064a8d4">
6551 <tr id="rpip3eb5dd97f2e582a89d86">
6552 <td class="memname" id="rpip5f4b671dcc26279fc036">static bool multicore_fifo_wready </td>
6553 <td id="rpipd061f40ff910eee63b93">(</td>
6554 <td class="paramtype" id="rpipca0bf7bfea0a406d3bbe">void </td>
6555 <td class="paramname" id="rpip5ec9f0e700bee22f3a83"></td>
6556 <td id="rpip935b8a2c1217650476f3">)</td>
6557 <td id="rpipe0b2d6e3ad1a37ad6405"></td>
6561 <td class="mlabels-right" id="rpip5096cd68e3666d69af90">
6562 <span class="mlabels" id="rpipe16cca30b571e0dedc45"><span class="mlabel" id="rpip06070636d4b7c7be304e">inline</span><span class="mlabel" id="rpip4aa076bfaace88d2c51f">static</span></span> </td>
6566 <div class="memdoc" id="rpipa552eb83d0355e0495e2">
6568 <p id="rpip0275923f55596d1df0d3">Check the write FIFO to see if it has space for more data. </p>
6569 <p id="rpipa220c16a6858fab90cd5">See the note in the <a class="el" href="high_level.html#multicore_fifo" id="rpip6d540101a3447817df6c">fifo</a> section for considerations regarding use of the inter-core FIFOs</p>
6570 <h4 class="label" id="rpip0c33597f082f1bcdc11a" data-parent-id="rpipc14417f5af28051fab3c" data-target-for="rpip0c33597f082f1bcdc11a">Returns</h4>
6571 <p class="returns" id="rpipe1dbb46dbafe2823933a" data-parent-id="rpipc14417f5af28051fab3c" data-target-for="rpipe1dbb46dbafe2823933a">true if the FIFO has room for more data, false otherwise </p>
6579 <h3 id="multicore_lockout">
6580 <a class="anchor" href="#multicore_lockout"></a>lockout</h3>
6581 <div class="ingroups" id="rpip0d86773773c5e198860a">Part of: <a class="el" href="high_level.html" id="rpipc8d0bd9c2becfc1e48eb">High Level APIs</a> » <a class="el" href="high_level.html#pico_multicore" id="rpip0b72246b043f82521c11">pico_multicore</a>
6583 <p id="rpipbbf593b495359d04e91b">Functions to enable one core to force the other core to pause execution in a known state.
6584 <a href="#ga566703bc8a6c1da8c6c4" id="rpipa0e68529cdb47caf524d" data-adjusted="true">More...</a></p>
6586 <h4 id="rpipf9837a2c2e4873ffe41c">
6587 <a class="anchor" href="#rpipf9837a2c2e4873ffe41c"></a>Functions</h4>
6588 <ul class="memberdecls" id="rpip074db79696a079e38226" data-parent-id="rpip16692f6aec41f577b144">
6589 <li class="memitem">
6590 <p data-target="true" data-target-for="rpip074db79696a079e38226"><span class="memItemLeft" data-target="true" id="rpipc784761a10ea1c51d072" data-parent-id="rpip074db79696a079e38226" data-target-for="rpipc784761a10ea1c51d072">void </span><span class="memItemRight" data-target="true" id="rpipb5da37b8aabd86d404c4" data-parent-id="rpip074db79696a079e38226" data-target-for="rpipb5da37b8aabd86d404c4"><a class="el" href="#ga4e969086bda6851bc8ce8199113fd595" id="rpip5659f6f7479212065797" data-adjusted="true">multicore_lockout_victim_init</a> (void)</span></p>
6592 <li class="memdesc">
6593 <p data-target="true" data-target-for="rpipfcb2d75412771529ef63"><span class="mdescLeft" data-target="true" id="rpip4907455a8bfc12b1e507" data-parent-id="rpipfcb2d75412771529ef63" data-target-for="rpip4907455a8bfc12b1e507">Â </span><span class="mdescRight" data-target="true" id="rpip447ebb411a57ebdbd7c7" data-parent-id="rpipfcb2d75412771529ef63" data-target-for="rpip447ebb411a57ebdbd7c7">Initialize the current core such that it can be a "victim" of lockout (i.e. forced to pause in a known state by the other core) <br id="rpip88245dcbb38c0ac082a6"></span></p>
6595 <li class="memitem">
6596 <p data-target="true" data-target-for="rpip5caa354ee0336d840118"><span class="memItemLeft" data-target="true" id="rpip371b4c00a087fa503ff7" data-parent-id="rpip5caa354ee0336d840118" data-target-for="rpip371b4c00a087fa503ff7">bool </span><span class="memItemRight" data-target="true" id="rpip5d66d1129ec745bb39c5" data-parent-id="rpip5caa354ee0336d840118" data-target-for="rpip5d66d1129ec745bb39c5"><a class="el" href="#ga3669ce9202da1860fcbbb11094778dd5" id="rpipdab936d94c73b71cd04b" data-adjusted="true">multicore_lockout_victim_is_initialized</a> (uint core_num)</span></p>
6598 <li class="memdesc">
6599 <p data-target="true" data-target-for="rpip88eaef6e44134b01f3d8"><span class="mdescLeft" data-target="true" id="rpip24e33fc9c941bad9ea06" data-parent-id="rpip88eaef6e44134b01f3d8" data-target-for="rpip24e33fc9c941bad9ea06">Â </span><span class="mdescRight" data-target="true" id="rpipebcd44667ad66451977a" data-parent-id="rpip88eaef6e44134b01f3d8" data-target-for="rpipebcd44667ad66451977a">Determine if multicore_victim_init() has been called on the specified core. <br id="rpip94a105083e6e0ab77486"></span></p>
6601 <li class="memitem">
6602 <p data-target="true" data-target-for="rpipecb86c5a9e807a68ea3e"><span class="memItemLeft" data-target="true" id="rpipe281ab2a49ca3f7a3967" data-parent-id="rpipecb86c5a9e807a68ea3e" data-target-for="rpipe281ab2a49ca3f7a3967">void </span><span class="memItemRight" data-target="true" id="rpip692ef9611723ebd7d12f" data-parent-id="rpipecb86c5a9e807a68ea3e" data-target-for="rpip692ef9611723ebd7d12f"><a class="el" href="#ga9a3f4df6b0e4140b0f40899a02c238d8" id="rpip9bc3b91f8b6c54923b50" data-adjusted="true">multicore_lockout_start_blocking</a> (void)</span></p>
6604 <li class="memdesc">
6605 <p data-target="true" data-target-for="rpipec28f595877ac6490456"><span class="mdescLeft" data-target="true" id="rpip1a1b7c3c25f2f649959e" data-parent-id="rpipec28f595877ac6490456" data-target-for="rpip1a1b7c3c25f2f649959e">Â </span><span class="mdescRight" data-target="true" id="rpipfe95af0edbae512f8936" data-parent-id="rpipec28f595877ac6490456" data-target-for="rpipfe95af0edbae512f8936">Request the other core to pause in a known state and wait for it to do so. <br id="rpip474791c288e9eb13f368"></span></p>
6607 <li class="memitem">
6608 <p data-target="true" data-target-for="rpip3db2dd98c017571cef39"><span class="memItemLeft" data-target="true" id="rpipdd97ee9a94b97f1f7944" data-parent-id="rpip3db2dd98c017571cef39" data-target-for="rpipdd97ee9a94b97f1f7944">bool </span><span class="memItemRight" data-target="true" id="rpip7c68181fc675332e258b" data-parent-id="rpip3db2dd98c017571cef39" data-target-for="rpip7c68181fc675332e258b"><a class="el" href="#gaaf40bf0b8b3a704f3178e38977d292be" id="rpip2b34de5400cbe8f69f87" data-adjusted="true">multicore_lockout_start_timeout_us</a> (uint64_t timeout_us)</span></p>
6610 <li class="memdesc">
6611 <p data-target="true" data-target-for="rpipcecd2e13b9b9015ccc6a"><span class="mdescLeft" data-target="true" id="rpip15d6f093d0b284dd0096" data-parent-id="rpipcecd2e13b9b9015ccc6a" data-target-for="rpip15d6f093d0b284dd0096">Â </span><span class="mdescRight" data-target="true" id="rpip81b7c022261b056ffd2e" data-parent-id="rpipcecd2e13b9b9015ccc6a" data-target-for="rpip81b7c022261b056ffd2e">Request the other core to pause in a known state and wait up to a time limit for it to do so. <br id="rpipbc9bcc2d2f55a33d274e"></span></p>
6613 <li class="memitem">
6614 <p data-target="true" data-target-for="rpip66457c6fbcfe9a51ac70"><span class="memItemLeft" data-target="true" id="rpip792fb93b54aa567978a9" data-parent-id="rpip66457c6fbcfe9a51ac70" data-target-for="rpip792fb93b54aa567978a9">void </span><span class="memItemRight" data-target="true" id="rpipf2993f9e01dde2d9b4cc" data-parent-id="rpip66457c6fbcfe9a51ac70" data-target-for="rpipf2993f9e01dde2d9b4cc"><a class="el" href="#gab1b7b6dc6f81ca9524467f5024681167" id="rpipf60ee7f86deaa7b088f1" data-adjusted="true">multicore_lockout_end_blocking</a> (void)</span></p>
6616 <li class="memdesc">
6617 <p data-target="true" data-target-for="rpip5fec2745f6de3492361f"><span class="mdescLeft" data-target="true" id="rpip38fbe4677a4706bdbf0b" data-parent-id="rpip5fec2745f6de3492361f" data-target-for="rpip38fbe4677a4706bdbf0b">Â </span><span class="mdescRight" data-target="true" id="rpip7ab8c7b5186ff969262c" data-parent-id="rpip5fec2745f6de3492361f" data-target-for="rpip7ab8c7b5186ff969262c">Release the other core from a locked out state amd wait for it to acknowledge. <br id="rpip6629fb41e6ffcf93bcb3"></span></p>
6619 <li class="memitem">
6620 <p data-target="true" data-target-for="rpipdc5bcedab62af45d252f"><span class="memItemLeft" data-target="true" id="rpipae794656f0ff6ae34d4c" data-parent-id="rpipdc5bcedab62af45d252f" data-target-for="rpipae794656f0ff6ae34d4c">bool </span><span class="memItemRight" data-target="true" id="rpipe5ccd9032e888f4c6300" data-parent-id="rpipdc5bcedab62af45d252f" data-target-for="rpipe5ccd9032e888f4c6300"><a class="el" href="#gad61a822f1b135db1be62c19754694fe2" id="rpip3030ae6a004e38895e60" data-adjusted="true">multicore_lockout_end_timeout_us</a> (uint64_t timeout_us)</span></p>
6622 <li class="memdesc">
6623 <p data-target="true" data-target-for="rpipfe2814bea001987dd65f"><span class="mdescLeft" data-target="true" id="rpip0071eb08ca1ebdc17880" data-parent-id="rpipfe2814bea001987dd65f" data-target-for="rpip0071eb08ca1ebdc17880">Â </span><span class="mdescRight" data-target="true" id="rpipa23b38079e21fba3ae11" data-parent-id="rpipfe2814bea001987dd65f" data-target-for="rpipa23b38079e21fba3ae11">Release the other core from a locked out state amd wait up to a time limit for it to acknowledge. <br id="rpipa48f47c31733087481a7"></span></p>
6626 <a name="details" id="ga566703bc8a6c1da8c6c4"></a>
6629 <h4 id="rpip1783b2b321d733422495">
6630 <a class="anchor" href="#rpip1783b2b321d733422495"></a>Detailed Description</h4>
6631 <p id="rpip0f20ffd94ab4da0af801">Functions to enable one core to force the other core to pause execution in a known state. </p>
6632 <p id="rpip3d1e5cd46107ff3b81b2">Sometimes it is useful to enter a critical section on both cores at once. On a single core system a critical section can trivially be entered by disabling interrupts, however on a multi-core system that is not sufficient, and unless the other core is polling in some way, then it will need to be interrupted in order to cooperatively enter a blocked state.</p>
6633 <p id="rpip6db47d5295952d147fd3">These "lockout" functions use the inter core FIFOs to cause an interrupt on one core from the other, and manage waiting for the other core to enter the "locked out" state.</p>
6634 <p id="rpip5ab77f96aeab47ccbf5f">The usage is that the "victim" core ... i.e the core that can be "locked out" by the other core calls <a class="el" href="#ga4e969086bda6851bc8ce8199113fd595" id="rpip13e8065524bd165c295f" data-adjusted="true">multicore_lockout_victim_init</a> to hook the FIFO interrupt. Note that either or both cores may do this.</p>
6635 <div class="admonitionblock note" id="rpipc3b8b0a9fedb8a02c0df" data-parent-id="rpipba41fc644bec32a2afae"><table>
6636 <tr data-target="true" data-target-for="rpipc3b8b0a9fedb8a02c0df">
6637 <td class="icon" id="rpipf9407e83a03ce6728e6b" data-parent-id="rpipc3b8b0a9fedb8a02c0df"><div class="title" data-target="true" data-target-for="rpipf9407e83a03ce6728e6b">Note</div></td>
6638 <td class="content" id="rpip9821c7cee22bbb4fa90a" data-parent-id="rpipc3b8b0a9fedb8a02c0df" data-target-for="rpip9821c7cee22bbb4fa90a">When "locked out" the victim core is paused (it is actually executing a tight loop with code in RAM) and has interrupts disabled. This makes the lockout functions suitable for use by code that wants to write to flash (at which point no code may be executing from flash)</td>
6641 <p id="rpip8fcae49ae172a71c1217">The core which wishes to lockout the other core calls <a class="el" href="#ga9a3f4df6b0e4140b0f40899a02c238d8" id="rpipcac2c7559779738ad5d2" data-adjusted="true">multicore_lockout_start_blocking</a> or <a class="el" href="#gaaf40bf0b8b3a704f3178e38977d292be" id="rpip559902542ff022f9b109" data-adjusted="true">multicore_lockout_start_timeout_us</a> to interrupt the other "victim" core and wait for it to be in a "locked out" state. Once the lockout is no longer needed it calls <a class="el" href="#gab1b7b6dc6f81ca9524467f5024681167" id="rpipdc8841ffe113c404e403" data-adjusted="true">multicore_lockout_end_blocking</a> or <a class="el" href="#gad61a822f1b135db1be62c19754694fe2" id="rpipd2ca9f3271adb6b8434a" data-adjusted="true">multicore_lockout_end_timeout_us</a> to release the lockout and wait for confirmation.</p>
6642 <div class="admonitionblock note" id="rpipda3919591036b75905c3" data-parent-id="rpipba41fc644bec32a2afae"><table>
6643 <tr data-target="true" data-target-for="rpipda3919591036b75905c3">
6644 <td class="icon" id="rpip9313c6149a66e7279564" data-parent-id="rpipda3919591036b75905c3"><div class="title" data-target="true" data-target-for="rpip9313c6149a66e7279564">Note</div></td>
6645 <td class="content" id="rpip24c74b054c7034c6eec7" data-parent-id="rpipda3919591036b75905c3" data-target-for="rpip24c74b054c7034c6eec7">Because multicore lockout uses the intercore FIFOs, the FIFOs <b id="rpipa5fa5e93f33a16d0542a">cannot</b> be used for any other purpose </td>
6650 <h4 id="rpip23d2825ffeec6628f642">
6651 <a class="anchor" href="#rpip23d2825ffeec6628f642"></a>Function Documentation</h4>
6652 <a id="gab1b7b6dc6f81ca9524467f5024681167" name="gab1b7b6dc6f81ca9524467f5024681167"></a>
6654 <h5 id="rpipdce4c71849587e07e480">
6655 <a class="anchor" href="#rpipdce4c71849587e07e480"></a>◆ multicore_lockout_end_blocking()</h5>
6656 <div class="memitem" id="rpip2fc87b177dcc426cbb50">
6657 <div class="memproto" id="rpipbc7b6867187bc3bbe7c4">
6658 <table class="memname" id="rpipdfe30471d51e0e4b0d39">
6659 <tr id="rpip8098ec8f05d907e1a9d0">
6660 <td class="memname" id="rpip9eae38176dfd40b73c60">void multicore_lockout_end_blocking </td>
6661 <td id="rpip6a925832614882ebdf5e">(</td>
6662 <td class="paramtype" id="rpipbfc8ff4e1cbcf24078cb">void </td>
6663 <td class="paramname" id="rpip690c4c12ac36e2ac9eed"></td>
6664 <td id="rpip1fe9bb32e65eed608a96">)</td>
6665 <td id="rpip44149d6d55c6de271727"></td>
6669 <div class="memdoc" id="rpipd868f2142abd3b32a252">
6671 <p id="rpipffac08ff0ddda53324af">Release the other core from a locked out state amd wait for it to acknowledge. </p>
6672 <div class="admonitionblock note" id="rpipf68d64f9b98ac0685aee" data-parent-id="rpipd868f2142abd3b32a252"><table>
6673 <tr data-target="true" data-target-for="rpipf68d64f9b98ac0685aee">
6674 <td class="icon" id="rpip2738ef85bf17f142b484" data-parent-id="rpipf68d64f9b98ac0685aee"><div class="title" data-target="true" data-target-for="rpip2738ef85bf17f142b484">Note</div></td>
6675 <td class="content" id="rpip60d90345521ba337a821" data-parent-id="rpipf68d64f9b98ac0685aee" data-target-for="rpip60d90345521ba337a821">The other core must previously have been "locked out" by calling a <code id="rpip6c2c2a6364bccd937b91">multicore_lockout_start_</code> function from this core </td>
6682 <a id="gad61a822f1b135db1be62c19754694fe2" name="gad61a822f1b135db1be62c19754694fe2"></a>
6685 <h5 id="rpip295c572252676737caad">
6686 <a class="anchor" href="#rpip295c572252676737caad"></a>◆ multicore_lockout_end_timeout_us()</h5>
6687 <div class="memitem" id="rpip1705772e7345fa83cb39">
6688 <div class="memproto" id="rpip5f66b4e191e2a9156070">
6689 <table class="memname" id="rpip9d4c18671405e78fc0ef">
6690 <tr id="rpip4c33d8f0d64c52d89fc8">
6691 <td class="memname" id="rpipe65c6c0bb88ef0cb9b71">bool multicore_lockout_end_timeout_us </td>
6692 <td id="rpip0611ce819c9c3dbed46e">(</td>
6693 <td class="paramtype" id="rpip9e95546a2d9aee9448d2">uint64_t </td>
6694 <td class="paramname" id="rpip0cd141070babea227aa5"><em id="rpip0ed1b38055d720e2f222">timeout_us</em></td>
6695 <td id="rpip6adda7e300bddbb3ef49">)</td>
6696 <td id="rpip9503fa31e1a2961a450f"></td>
6700 <div class="memdoc" id="rpip1fc16015e004404d92c3">
6702 <p id="rpipcb12dbc4a6c47d869290">Release the other core from a locked out state amd wait up to a time limit for it to acknowledge. </p>
6703 <p id="rpip89ad0b25660b40852b7c">The other core must previously have been "locked out" by calling a <code id="rpipb80d500d1c489ade74f4">multicore_lockout_start_</code> function from this core</p>
6704 <div class="admonitionblock note" id="rpip62e7ba380bdd9cb827fe" data-parent-id="rpip1fc16015e004404d92c3"><table>
6705 <tr data-target="true" data-target-for="rpip62e7ba380bdd9cb827fe">
6706 <td class="icon" id="rpipc07d3862414d428a8055" data-parent-id="rpip62e7ba380bdd9cb827fe"><div class="title" data-target="true" data-target-for="rpipc07d3862414d428a8055">Note</div></td>
6707 <td class="content" id="rpipeabbe829d60918a1378a" data-parent-id="rpip62e7ba380bdd9cb827fe" data-target-for="rpipeabbe829d60918a1378a">be very careful using small timeout values, as a timeout here will leave the "lockout" functionality in a bad state. It is probably preferable to use <a class="el" href="#gab1b7b6dc6f81ca9524467f5024681167" id="rpipb9c8948d9f250b97c438" data-adjusted="true">multicore_lockout_end_blocking</a> anyway as if you have already waited for the victim core to enter the lockout state, then the victim core will be ready to exit the lockout state very quickly.</td>
6710 <h4 id="rpipef22bdeda0b114986030" data-parent-id="rpip7613689fccf8488fa042" data-target-for="rpipef22bdeda0b114986030">Parameters</h4>
6711 <p class="paragraph" id="rpip8285dfe88d4e903d1be0" data-parent-id="rpip7613689fccf8488fa042" data-target-for="rpip8285dfe88d4e903d1be0">
6713 <table class="params" id="rpipcb50e3500d17ad3405e9">
6714 <tr id="rpipe5fd7eb3c0b5f148d65e">
6715 <td class="paramname" id="rpip3b2fb69fcdf9ba1193ff">timeout_us</td>
6716 <td id="rpip3612feced226c909a38c">the timeout in microseconds </td>
6722 <h4 class="label" id="rpipbada098be44fd04a059e" data-parent-id="rpip5ef43bc84535ada7ce42" data-target-for="rpipbada098be44fd04a059e">Returns</h4>
6723 <p class="returns" id="rpip462291878c8ec32111c1" data-parent-id="rpip5ef43bc84535ada7ce42" data-target-for="rpip462291878c8ec32111c1">true if the other core successfully exited locked out state within the timeout, false otherwise </p>
6727 <a id="ga9a3f4df6b0e4140b0f40899a02c238d8" name="ga9a3f4df6b0e4140b0f40899a02c238d8"></a>
6730 <h5 id="rpipb5dd83f65e3a6f909473">
6731 <a class="anchor" href="#rpipb5dd83f65e3a6f909473"></a>◆ multicore_lockout_start_blocking()</h5>
6732 <div class="memitem" id="rpip147494c9b6af8503360a">
6733 <div class="memproto" id="rpipf5b92c25bee8d4af08d0">
6734 <table class="memname" id="rpipdca7075b941fce33b380">
6735 <tr id="rpipfaacd55587c67c2efe7f">
6736 <td class="memname" id="rpip51bfa7da9be7b9742b48">void multicore_lockout_start_blocking </td>
6737 <td id="rpip6b88df07cc281ec01283">(</td>
6738 <td class="paramtype" id="rpip32cf5590053138849e31">void </td>
6739 <td class="paramname" id="rpip76708358fa36d5e5bea4"></td>
6740 <td id="rpip17aac760617ca45fcb7a">)</td>
6741 <td id="rpip975c9d8e946f0077e53e"></td>
6745 <div class="memdoc" id="rpipe3fab3eb15f9dd2e79a5">
6747 <p id="rpip1bb2ddd7e50ecb039be1">Request the other core to pause in a known state and wait for it to do so. </p>
6748 <p id="rpipb2101f071d558220c942">The other (victim) core must have previously executed <a class="el" href="#ga4e969086bda6851bc8ce8199113fd595" id="rpip620db846354b78f431d0" data-adjusted="true">multicore_lockout_victim_init()</a></p>
6749 <div class="admonitionblock note" id="rpip3afd7554d5187e3a12ac" data-parent-id="rpipe3fab3eb15f9dd2e79a5"><table>
6750 <tr data-target="true" data-target-for="rpip3afd7554d5187e3a12ac">
6751 <td class="icon" id="rpip423b192f97024909c0d1" data-parent-id="rpip3afd7554d5187e3a12ac"><div class="title" data-target="true" data-target-for="rpip423b192f97024909c0d1">Note</div></td>
6752 <td class="content" id="rpip07a4794aed2aba9b6422" data-parent-id="rpip3afd7554d5187e3a12ac" data-target-for="rpip07a4794aed2aba9b6422">multicore_lockout_start_ functions are not nestable, and must be paired with a call to a corresponding <a class="el" href="#gab1b7b6dc6f81ca9524467f5024681167" id="rpip9c21444fd6f416884f30" data-adjusted="true">multicore_lockout_end_blocking</a> </td>
6759 <a id="gaaf40bf0b8b3a704f3178e38977d292be" name="gaaf40bf0b8b3a704f3178e38977d292be"></a>
6762 <h5 id="rpipe971a36158545403efbd">
6763 <a class="anchor" href="#rpipe971a36158545403efbd"></a>◆ multicore_lockout_start_timeout_us()</h5>
6764 <div class="memitem" id="rpip80bd4377681aced5fab8">
6765 <div class="memproto" id="rpipc7c0aead6384197cf0db">
6766 <table class="memname" id="rpip8b812a21f83ecdd63874">
6767 <tr id="rpipc805aa230183e6a79b9b">
6768 <td class="memname" id="rpip2ac3b3c9c2d163d525ca">bool multicore_lockout_start_timeout_us </td>
6769 <td id="rpipb186ed29e52309e3b250">(</td>
6770 <td class="paramtype" id="rpipd1703eb0d45c3a7f27ca">uint64_t </td>
6771 <td class="paramname" id="rpip5332c586ead8657f5897"><em id="rpipc4485ba5df342ef95673">timeout_us</em></td>
6772 <td id="rpip4ddba16f14646aa59a8d">)</td>
6773 <td id="rpip7e020ec5306ab95fdee9"></td>
6777 <div class="memdoc" id="rpip6418efdbdf755340e8ff">
6779 <p id="rpipafae31d208b29e1cf14d">Request the other core to pause in a known state and wait up to a time limit for it to do so. </p>
6780 <p id="rpipca56e6f648fd23ff860c">The other core must have previously executed <a class="el" href="#ga4e969086bda6851bc8ce8199113fd595" id="rpip881727dda215325b5a37" data-adjusted="true">multicore_lockout_victim_init()</a></p>
6781 <div class="admonitionblock note" id="rpipd637edcb3322eb1e5099" data-parent-id="rpip6418efdbdf755340e8ff"><table>
6782 <tr data-target="true" data-target-for="rpipd637edcb3322eb1e5099">
6783 <td class="icon" id="rpip783817cf4407e88e43e3" data-parent-id="rpipd637edcb3322eb1e5099"><div class="title" data-target="true" data-target-for="rpip783817cf4407e88e43e3">Note</div></td>
6784 <td class="content" id="rpipcd6f0ab5240478eba32a" data-parent-id="rpipd637edcb3322eb1e5099" data-target-for="rpipcd6f0ab5240478eba32a">multicore_lockout_start_ functions are not nestable, and must be paired with a call to a corresponding <a class="el" href="#gab1b7b6dc6f81ca9524467f5024681167" id="rpipa3ce6c627bd96f1ff074" data-adjusted="true">multicore_lockout_end_blocking</a>
6788 <h4 id="rpip2c4586f3d8fb0cb04db0" data-parent-id="rpipf95934113f95fcf8f564" data-target-for="rpip2c4586f3d8fb0cb04db0">Parameters</h4>
6789 <p class="paragraph" id="rpipdb6ca0136ae53f0e5750" data-parent-id="rpipf95934113f95fcf8f564" data-target-for="rpipdb6ca0136ae53f0e5750">
6791 <table class="params" id="rpipf68bfccc7b395e9c711c">
6792 <tr id="rpip2b78886e02808036c452">
6793 <td class="paramname" id="rpipa05f5fba5a1ff0783b89">timeout_us</td>
6794 <td id="rpipf3435ffa47e88c7fe7c1">the timeout in microseconds </td>
6800 <h4 class="label" id="rpip98438d91ce34f442d348" data-parent-id="rpip4813fb7d8d6041cd339f" data-target-for="rpip98438d91ce34f442d348">Returns</h4>
6801 <p class="returns" id="rpip72f52b3318a7dee6c547" data-parent-id="rpip4813fb7d8d6041cd339f" data-target-for="rpip72f52b3318a7dee6c547">true if the other core entered the locked out state within the timeout, false otherwise </p>
6805 <a id="ga4e969086bda6851bc8ce8199113fd595" name="ga4e969086bda6851bc8ce8199113fd595"></a>
6808 <h5 id="rpip87b20871b5eb5ee079ef">
6809 <a class="anchor" href="#rpip87b20871b5eb5ee079ef"></a>◆ multicore_lockout_victim_init()</h5>
6810 <div class="memitem" id="rpip9acf2523baae0be5350c">
6811 <div class="memproto" id="rpipb363ad008b11cb5ca324">
6812 <table class="memname" id="rpip185ee834b01503f10c92">
6813 <tr id="rpip74b84aeac2e170df5797">
6814 <td class="memname" id="rpipc98f23a0b90d2278bc84">void multicore_lockout_victim_init </td>
6815 <td id="rpipc6ee45626e9c0f5d6fdc">(</td>
6816 <td class="paramtype" id="rpip99d108d9744ec1b7f79c">void </td>
6817 <td class="paramname" id="rpip4c6281fda39cce11eebd"></td>
6818 <td id="rpip203d54d4cf00c774420e">)</td>
6819 <td id="rpip15bf0f3efafe49364efc"></td>
6823 <div class="memdoc" id="rpip63d4a6ef218861b8f70d">
6825 <p id="rpipfe713b2aa1fc4e7cb78f">Initialize the current core such that it can be a "victim" of lockout (i.e. forced to pause in a known state by the other core) </p>
6826 <p id="rpip5620aede75a79f76b0f3">This code hooks the intercore FIFO IRQ, and the FIFO may not be used for any other purpose after this. </p>
6830 <a id="ga3669ce9202da1860fcbbb11094778dd5" name="ga3669ce9202da1860fcbbb11094778dd5"></a>
6833 <h5 id="rpipab6e54e7ce0734d73446">
6834 <a class="anchor" href="#rpipab6e54e7ce0734d73446"></a>◆ multicore_lockout_victim_is_initialized()</h5>
6835 <div class="memitem" id="rpip7dd70f31355e0e3e8f2a">
6836 <div class="memproto" id="rpip22fbc8460e0a06241e68">
6837 <table class="memname" id="rpip82e53d384a74befd5888">
6838 <tr id="rpip9d5e4d8ba97fb8d28996">
6839 <td class="memname" id="rpip35008d56f181184700d1">bool multicore_lockout_victim_is_initialized </td>
6840 <td id="rpip0ffebae525c29b239aab">(</td>
6841 <td class="paramtype" id="rpip7ae6b55679c28359d889">uint </td>
6842 <td class="paramname" id="rpipad2fe25fcc9bc3a433f0"><em id="rpipaff675ce032b676d6d05">core_num</em></td>
6843 <td id="rpip880e3f2effbb862b9845">)</td>
6844 <td id="rpipdb14434282eba128e04a"></td>
6848 <div class="memdoc" id="rpip3c300be90aacc35cdce1">
6850 <p id="rpipe500ad013c135a7850a9">Determine if multicore_victim_init() has been called on the specified core. </p>
6851 <div class="admonitionblock note" id="rpip9b0966529425aa170366" data-parent-id="rpip3c300be90aacc35cdce1"><table>
6852 <tr data-target="true" data-target-for="rpip9b0966529425aa170366">
6853 <td class="icon" id="rpip64aa549528d2ce9a8139" data-parent-id="rpip9b0966529425aa170366"><div class="title" data-target="true" data-target-for="rpip64aa549528d2ce9a8139">Note</div></td>
6854 <td class="content" id="rpip6b421d873e5cd705cb64" data-parent-id="rpip9b0966529425aa170366" data-target-for="rpip6b421d873e5cd705cb64">this state persists even if the core is subsequently reset; therefore you are advised to always call <a class="el" href="#ga4e969086bda6851bc8ce8199113fd595" id="rpipab98d7f3cf5644222d64" data-adjusted="true">multicore_lockout_victim_init()</a> again after resetting a core, which had previously been initialized.</td>
6857 <h4 id="rpip409b04817893adecf48b" data-parent-id="rpipc0cb05689dfb85c3e95a" data-target-for="rpip409b04817893adecf48b">Parameters</h4>
6858 <p class="paragraph" id="rpip12a87d7fcbc14684f6a0" data-parent-id="rpipc0cb05689dfb85c3e95a" data-target-for="rpip12a87d7fcbc14684f6a0">
6860 <table class="params" id="rpip2be326c12ff9d36ce54e">
6861 <tr id="rpip74eef7c5924049e6cd12">
6862 <td class="paramname" id="rpip28627502a2b1d780cb0b">core_num</td>
6863 <td id="rpip67361d3f5db8fbb8863d">the core number (0 or 1) </td>
6869 <h4 class="label" id="rpip0857969dd7d11b19ff0e" data-parent-id="rpip611a43cbd618b055d71b" data-target-for="rpip0857969dd7d11b19ff0e">Returns</h4>
6870 <p class="returns" id="rpip7b62bc60ec038949058b" data-parent-id="rpip611a43cbd618b055d71b" data-target-for="rpip7b62bc60ec038949058b">true if multicore_victim_init() has been called on the specified core, false otherwise. </p>
6880 <a class="anchor" href="#pico_rand"></a>pico_rand</h2>
6881 <div class="sectionbody"></div>
6882 <div class="ingroups" id="rpipc5c83396656cb260f786">Part of: <a class="el" href="high_level.html" id="rpip3874c8b93a21f15da50e">High Level APIs</a>
6885 <h3 id="rpip2ac37766eddd02aaed07">
6886 <a class="anchor" href="#rpip2ac37766eddd02aaed07"></a>Functions</h3>
6887 <ul class="memberdecls" id="rpip0498b60e64f466e6a4f5" data-parent-id="rpip8496382d46fb40b12a42">
6888 <li class="memitem">
6889 <p data-target="true" data-target-for="rpip0498b60e64f466e6a4f5"><span class="memItemLeft" data-target="true" id="rpip71083a31f3ca19f2a21e" data-parent-id="rpip0498b60e64f466e6a4f5" data-target-for="rpip71083a31f3ca19f2a21e">void </span><span class="memItemRight" data-target="true" id="rpip8a05c44b52d48b02762f" data-parent-id="rpip0498b60e64f466e6a4f5" data-target-for="rpip8a05c44b52d48b02762f"><a class="el" href="#ga97a9544b527a3ba865ab70142bdd5d1b" id="rpip9eeb65fe03ffacd6eea6" data-adjusted="true">get_rand_128</a> (<a class="el" href="structrng__128.html" id="rpip2cfc83e2a811fa3076d3">rng_128_t</a> *rand128)</span></p>
6891 <li class="memdesc">
6892 <p data-target="true" data-target-for="rpipb7ac1b4ed4c512452100"><span class="mdescLeft" data-target="true" id="rpipac91bd22d659e57b0421" data-parent-id="rpipb7ac1b4ed4c512452100" data-target-for="rpipac91bd22d659e57b0421">Â </span><span class="mdescRight" data-target="true" id="rpip83989b8636335d3d8751" data-parent-id="rpipb7ac1b4ed4c512452100" data-target-for="rpip83989b8636335d3d8751">Get 128-bit random number. <br id="rpip10efba2f59f16c607414"></span></p>
6894 <li class="memitem">
6895 <p data-target="true" data-target-for="rpip6a803b6af0ddf7b3abed"><span class="memItemLeft" data-target="true" id="rpipb52b3b885049fd385b3b" data-parent-id="rpip6a803b6af0ddf7b3abed" data-target-for="rpipb52b3b885049fd385b3b">uint64_t </span><span class="memItemRight" data-target="true" id="rpipe8512c51a2dd3745afa9" data-parent-id="rpip6a803b6af0ddf7b3abed" data-target-for="rpipe8512c51a2dd3745afa9"><a class="el" href="#ga783185fba81c03eb0c1d687d322b0112" id="rpipbde1e9ae24c56ed0940d" data-adjusted="true">get_rand_64</a> (void)</span></p>
6897 <li class="memdesc">
6898 <p data-target="true" data-target-for="rpipc18df66ea78a76d503fb"><span class="mdescLeft" data-target="true" id="rpip45a851b8f5c6c5cada87" data-parent-id="rpipc18df66ea78a76d503fb" data-target-for="rpip45a851b8f5c6c5cada87">Â </span><span class="mdescRight" data-target="true" id="rpipc14e461c4d1113c8c715" data-parent-id="rpipc18df66ea78a76d503fb" data-target-for="rpipc14e461c4d1113c8c715">Get 64-bit random number. <br id="rpip71d56e38cebb93dae292"></span></p>
6900 <li class="memitem">
6901 <p data-target="true" data-target-for="rpip1763777d47f83c781953"><span class="memItemLeft" data-target="true" id="rpip1af284b14c4fb2adb044" data-parent-id="rpip1763777d47f83c781953" data-target-for="rpip1af284b14c4fb2adb044">uint32_t </span><span class="memItemRight" data-target="true" id="rpipb6cf40b8dc7cb7f54219" data-parent-id="rpip1763777d47f83c781953" data-target-for="rpipb6cf40b8dc7cb7f54219"><a class="el" href="#gac446d739bd6818ee25b5c8644ef7c8e8" id="rpip28588d716218ad51af07" data-adjusted="true">get_rand_32</a> (void)</span></p>
6903 <li class="memdesc">
6904 <p data-target="true" data-target-for="rpip35318186e8ff6e8e7159"><span class="mdescLeft" data-target="true" id="rpip238ebdae0d741da75513" data-parent-id="rpip35318186e8ff6e8e7159" data-target-for="rpip238ebdae0d741da75513">Â </span><span class="mdescRight" data-target="true" id="rpipc178780a3189cea11ba0" data-parent-id="rpip35318186e8ff6e8e7159" data-target-for="rpipc178780a3189cea11ba0">Get 32-bit random number. <br id="rpipab6c12d4c4583d5bc09a"></span></p>
6907 <a name="details" id="details"></a>
6910 <h3 id="rpipd9cd1e107a6238a969b8">
6911 <a class="anchor" href="#rpipd9cd1e107a6238a969b8"></a>Detailed Description</h3>
6912 <p id="rpip76cd780db83d195e156b">Random Number Generator API</p>
6913 <p id="rpipe09cbc7970d1341b3f76">This module generates random numbers at runtime utilizing a number of possible entropy sources and uses those sources to modify the state of a 128-bit 'Pseudo Random Number Generator' implemented in software.</p>
6914 <p id="rpipd84873bd7279acbbe9c3">The random numbers (32 to 128 bit) to be supplied are read from the PRNG which is used to help provide a large number space.</p>
6915 <p id="rpip75d53ce37a71d09c3ddb">The following (multiple) sources of entropy are available (of varying quality), each enabled by a #define:</p>
6916 <div class="ulist" id="rpipb568b4d780dd4ee481dd" data-parent-id="rpipeae11146fe49e90df017">
6917 <ul data-target="true" data-target-for="rpipb568b4d780dd4ee481dd">
6918 <li id="rpip204fdfe0d5802098a3b5">
6919 <p>The Ring Oscillator (ROSC) (PICO_RAND_ENTROPY_SRC_ROSC == 1): PICO_RAND_ROSC_BIT_SAMPLE_COUNT bits are gathered from the ring oscillator "random bit" and mixed in each time. This should not be used if the ROSC is off, or the processor is running from the ROSC. </p>
6920 <div class="admonitionblock note" id="rpipb004d51445080ff43a55" data-parent-id="rpip204fdfe0d5802098a3b5"><table>
6921 <tr data-target="true" data-target-for="rpipb004d51445080ff43a55">
6922 <td class="icon" id="rpip2454bb71e4fd565d298b" data-parent-id="rpipb004d51445080ff43a55"><div class="title" data-target="true" data-target-for="rpip2454bb71e4fd565d298b">Note</div></td>
6923 <td class="content" id="rpipc940447b76ad7a835ca9" data-parent-id="rpipb004d51445080ff43a55" data-target-for="rpipc940447b76ad7a835ca9">the maximum throughput of ROSC bit sampling is controlled by PICO_RAND_MIN_ROSC_BIT_SAMPLE_TIME_US which defaults to 10us, i.e. 100,000 bits per second.</td>
6927 <li id="rpip2fb5d20a9e8764c47990"><p>Time (PICO_RAND_ENTROPY_SRC_TIME == 1): The 64-bit microsecond timer is mixed in each time.</p></li>
6928 <li id="rpipf00fe34fa4c7f4e82ac7"><p>Bus Performance Counter (PICO_RAND_ENTROPY_SRC_BUS_PERF_COUNTER == 1): One of the bus fabric's performance counters is mixed in each time.</p></li>
6931 <div class="admonitionblock note" id="rpip0e942be9aeec5131f1e7" data-parent-id="rpipeae11146fe49e90df017"><table>
6932 <tr data-target="true" data-target-for="rpip0e942be9aeec5131f1e7">
6933 <td class="icon" id="rpipaaa212876aa68df31ae2" data-parent-id="rpip0e942be9aeec5131f1e7"><div class="title" data-target="true" data-target-for="rpipaaa212876aa68df31ae2">Note</div></td>
6934 <td class="content" id="rpipc1a68f4245c1b9af150d" data-parent-id="rpip0e942be9aeec5131f1e7" data-target-for="rpipc1a68f4245c1b9af150d">All entropy sources are hashed before application to the PRNG state machine.</td>
6937 <p id="rpipb3a58c35803e37acb296">The <em id="rpip7a54368e0417b60ffb9b">first</em> time a random number is requested, the 128-bit PRNG state must be seeded. Multiple entropy sources are also available for the seeding operation:</p>
6938 <div class="ulist" id="rpipb0ac2503f709140428f9" data-parent-id="rpipeae11146fe49e90df017">
6939 <ul data-target="true" data-target-for="rpipb0ac2503f709140428f9">
6940 <li id="rpip2886ae8d5b22fe26c49c"><p>The Ring Oscillator (ROSC) (PICO_RAND_SEED_ENTROPY_SRC_ROSC == 1): 64 bits are gathered from the ring oscillator "random bit" and mixed into the seed.</p></li>
6941 <li id="rpipdcfd37361ec839448708"><p>Time (PICO_RAND_SEED_ENTROPY_SRC_TIME == 1): The 64-bit microsecond timer is mixed into the seed.</p></li>
6942 <li id="rpip5050572a26cf29d54b3d"><p>Board Identifier (PICO_RAND_SEED_ENTROPY_SRC_BOARD_ID == 1): The board id via <a class="el" href="high_level.html#gaf87ef8a55d8dc2520776e427a605b6fb" id="rpipb1fe8647dff6b147d445" data-adjusted="true">pico_get_unique_board_id</a> is mixed into the seed.</p></li>
6943 <li id="rpip4958e3914a82c8312268"><p>RAM hash (PICO_RAND_SEED_ENTROPY_SRC_RAM_HASH (PICO_RAND_SEED_ENTROPY_SRC_RAM_HASH): The hashed contents of a subset of RAM are mixed in. Initial RAM contents are undefined on power up, so provide a reasonable source of entropy. By default the last 1K of RAM (which usually contains the core 0 stack) is hashed, which may also provide for differences after each warm reset.</p></li>
6946 <p id="rpip59cace02a16e3df3fd1d">With default settings, the seed generation takes approximately 1 millisecond while subsequent random numbers generally take between 10 and 20 microseconds to generate.</p>
6947 <p id="rpip03c3ed675c1b343c9281">pico_rand methods may be safely called from either core or from an IRQ, but be careful in the latter case as the calls may block for a number of microseconds waiting on more entropy. </p>
6950 <h3 id="rpipaca07ee034d314acc4bf">
6951 <a class="anchor" href="#rpipaca07ee034d314acc4bf"></a>Function Documentation</h3>
6952 <a id="ga97a9544b527a3ba865ab70142bdd5d1b" name="ga97a9544b527a3ba865ab70142bdd5d1b"></a>
6954 <h4 id="rpipdd531b3ae2032bd5d73e">
6955 <a class="anchor" href="#rpipdd531b3ae2032bd5d73e"></a>◆ get_rand_128()</h4>
6956 <div class="memitem" id="rpipa4bda0f3720e6e7700e0">
6957 <div class="memproto" id="rpipa8234bae3eab34a3ff08">
6958 <table class="memname" id="rpipadf15b498a771c2afde6">
6959 <tr id="rpip1935af75e9b879d3bb6b">
6960 <td class="memname" id="rpipa3d8370bb4ca16d3dd35">void get_rand_128 </td>
6961 <td id="rpip669cbd21856a69ddd50c">(</td>
6962 <td class="paramtype" id="rpipfaa14a4e54925c63322f">
6963 <a class="el" href="structrng__128.html" id="rpipa9ef2803d74efc99856a">rng_128_t</a> *Â </td>
6964 <td class="paramname" id="rpip01fbccb013772315374b"><em id="rpipbce9e7bbfc2a4b3201e1">rand128</em></td>
6965 <td id="rpip9df2575c59da43beece9">)</td>
6966 <td id="rpip79dfcaab7a4d38751b89"></td>
6970 <div class="memdoc" id="rpip2a8b95499d851a695fb2">
6972 <p id="rpip2904f551c341f6dd5011">Get 128-bit random number. </p>
6973 <p id="rpip03e71256ad5685d02be5">This method may be safely called from either core or from an IRQ, but be careful in the latter case as the call may block for a number of microseconds waiting on more entropy.</p>
6974 <h4 id="rpip3cae275602a2058cfed2" data-parent-id="rpip9e92f580659e9aa1a59c" data-target-for="rpip3cae275602a2058cfed2">Parameters</h4>
6975 <p class="paragraph" id="rpipf6527f45fd2c9783cb90" data-parent-id="rpip9e92f580659e9aa1a59c" data-target-for="rpipf6527f45fd2c9783cb90">
6977 <table class="params" id="rpip38cc390c609f2873c572">
6978 <tr id="rpipe8fbbeda31c28309ec4a">
6979 <td class="paramname" id="rpipa8d0bcd877eca4596ea3">rand128</td>
6980 <td id="rpip215d80262563bd62520c">Pointer to storage to accept a 128-bit random number </td>
6989 <a id="gac446d739bd6818ee25b5c8644ef7c8e8" name="gac446d739bd6818ee25b5c8644ef7c8e8"></a>
6992 <h4 id="rpipbc91fced7ca25fef557d">
6993 <a class="anchor" href="#rpipbc91fced7ca25fef557d"></a>◆ get_rand_32()</h4>
6994 <div class="memitem" id="rpipa3bcbd28a763107afd8b">
6995 <div class="memproto" id="rpip5fa827345dfecc4994d2">
6996 <table class="memname" id="rpip5255dd9d192c9521190e">
6997 <tr id="rpip618be7db2eb78092b174">
6998 <td class="memname" id="rpipa314ec22427ac964bfd3">uint32_t get_rand_32 </td>
6999 <td id="rpip8a9c2d38f61e44b6fada">(</td>
7000 <td class="paramtype" id="rpip5d34bb0c2891e7fb7259">void </td>
7001 <td class="paramname" id="rpip8eee6188f0eb85ba4e61"></td>
7002 <td id="rpipcc3321cd88880236a199">)</td>
7003 <td id="rpip0dfaf473cb4094583036"></td>
7007 <div class="memdoc" id="rpip8257805cacd4acb8ded8">
7009 <p id="rpip485d24a33b260098aa7b">Get 32-bit random number. </p>
7010 <p id="rpipd2ecafba1fb8c5d6a49f">This method may be safely called from either core or from an IRQ, but be careful in the latter case as the call may block for a number of microseconds waiting on more entropy.</p>
7011 <h4 class="label" id="rpipe84d14cd131cbba35fc2" data-parent-id="rpipb49abb11dbfb15f08657" data-target-for="rpipe84d14cd131cbba35fc2">Returns</h4>
7012 <p class="returns" id="rpipdc53154d0bb2c2130c18" data-parent-id="rpipb49abb11dbfb15f08657" data-target-for="rpipdc53154d0bb2c2130c18">32-bit random number </p>
7016 <a id="ga783185fba81c03eb0c1d687d322b0112" name="ga783185fba81c03eb0c1d687d322b0112"></a>
7019 <h4 id="rpip872083f05275b8f937be">
7020 <a class="anchor" href="#rpip872083f05275b8f937be"></a>◆ get_rand_64()</h4>
7021 <div class="memitem" id="rpipd3a1f3a12c92907ce4f5">
7022 <div class="memproto" id="rpip8208082b4923b1ee6fde">
7023 <table class="memname" id="rpipfee50df426ca5f2f4493">
7024 <tr id="rpip15640b726122d43a7903">
7025 <td class="memname" id="rpip578d278c1a20a40cbc7a">uint64_t get_rand_64 </td>
7026 <td id="rpipbe04d48412997798483e">(</td>
7027 <td class="paramtype" id="rpip5320e9b3212e76667079">void </td>
7028 <td class="paramname" id="rpipeb09e8c45fbdd2fe1d7e"></td>
7029 <td id="rpip72aeaa76858b76897ff3">)</td>
7030 <td id="rpip170bd51ffff19865cd8c"></td>
7034 <div class="memdoc" id="rpip74474499cdfd18823f37">
7036 <p id="rpip589db3021e7a7eb0a429">Get 64-bit random number. </p>
7037 <p id="rpipa7fb563f0b1f6ebe69e6">This method may be safely called from either core or from an IRQ, but be careful in the latter case as the call may block for a number of microseconds waiting on more entropy.</p>
7038 <h4 class="label" id="rpipfe6817bbd914c4046cb6" data-parent-id="rpip70089d2660ae62db9b58" data-target-for="rpipfe6817bbd914c4046cb6">Returns</h4>
7039 <p class="returns" id="rpipa45af2267a834095ffa8" data-parent-id="rpip70089d2660ae62db9b58" data-target-for="rpipa45af2267a834095ffa8">64-bit random number </p>
7047 <h2 id="pico_stdlib">
7048 <a class="anchor" href="#pico_stdlib"></a>pico_stdlib</h2>
7049 <div class="sectionbody"></div>
7050 <div class="ingroups" id="rpipd5435e894997a985819c">Part of: <a class="el" href="high_level.html" id="rpip8d56d9b4eef8982f3412">High Level APIs</a>
7053 <h3 id="rpip04d09fa6ec88d8737403">
7054 <a class="anchor" href="#rpip04d09fa6ec88d8737403"></a>Functions</h3>
7055 <ul class="memberdecls" id="rpip377ed7bf93ded073ba6a" data-parent-id="rpip86c048ab4ed6192fca43">
7056 <li class="memitem">
7057 <p data-target="true" data-target-for="rpip377ed7bf93ded073ba6a"><span class="memItemLeft" data-target="true" id="rpipb944c763a5961e10e1a6" data-parent-id="rpip377ed7bf93ded073ba6a" data-target-for="rpipb944c763a5961e10e1a6">void </span><span class="memItemRight" data-target="true" id="rpip2834516e45c03881468c" data-parent-id="rpip377ed7bf93ded073ba6a" data-target-for="rpip2834516e45c03881468c"><a class="el" href="#gacf31cd777510116d829aea040b034c4c" id="rpip8680a2f5bb2d6f65f627" data-adjusted="true">setup_default_uart</a> (void)</span></p>
7059 <li class="memdesc">
7060 <p data-target="true" data-target-for="rpipb854935b497f73223f74"><span class="mdescLeft" data-target="true" id="rpipe9b0054bbe647e2355d7" data-parent-id="rpipb854935b497f73223f74" data-target-for="rpipe9b0054bbe647e2355d7">Â </span><span class="mdescRight" data-target="true" id="rpipea5a7ea3973244984723" data-parent-id="rpipb854935b497f73223f74" data-target-for="rpipea5a7ea3973244984723">Set up the default UART and assign it to the default GPIOs. <br id="rpip0f936e74dc01831263b4"></span></p>
7062 <li class="memitem">
7063 <p data-target="true" data-target-for="rpip27fe3a9591507ec1a0b5"><span class="memItemLeft" data-target="true" id="rpip666499f0af5f0654815b" data-parent-id="rpip27fe3a9591507ec1a0b5" data-target-for="rpip666499f0af5f0654815b">void </span><span class="memItemRight" data-target="true" id="rpipa623a73c10c48c410312" data-parent-id="rpip27fe3a9591507ec1a0b5" data-target-for="rpipa623a73c10c48c410312"><a class="el" href="#ga89efe34eab0b8b96954eb0e19a38c8be" id="rpip0849a3917323cc97cca0" data-adjusted="true">set_sys_clock_48mhz</a> (void)</span></p>
7065 <li class="memdesc">
7066 <p data-target="true" data-target-for="rpip53f7a23082ddc417effd"><span class="mdescLeft" data-target="true" id="rpipb2d4e9193a2f565f16f8" data-parent-id="rpip53f7a23082ddc417effd" data-target-for="rpipb2d4e9193a2f565f16f8">Â </span><span class="mdescRight" data-target="true" id="rpipb50b80d67575506099d7" data-parent-id="rpip53f7a23082ddc417effd" data-target-for="rpipb50b80d67575506099d7">Initialise the system clock to 48MHz. <br id="rpip8e4460ec4e5309df30e6"></span></p>
7068 <li class="memitem">
7069 <p data-target="true" data-target-for="rpip967bf0c4cf81b5787a2a"><span class="memItemLeft" data-target="true" id="rpipc4418857f07cfc4b2c2c" data-parent-id="rpip967bf0c4cf81b5787a2a" data-target-for="rpipc4418857f07cfc4b2c2c">void </span><span class="memItemRight" data-target="true" id="rpipc381b30f606e92df5b70" data-parent-id="rpip967bf0c4cf81b5787a2a" data-target-for="rpipc381b30f606e92df5b70"><a class="el" href="#ga44d5e0845d4f75f3b0c97c733e39f4c8" id="rpip642e0a9d8ff3d34ec0be" data-adjusted="true">set_sys_clock_pll</a> (uint32_t vco_freq, uint post_div1, uint post_div2)</span></p>
7071 <li class="memdesc">
7072 <p data-target="true" data-target-for="rpip60ee6b417c9dab32a4e0"><span class="mdescLeft" data-target="true" id="rpip96e0014131ca49453fa9" data-parent-id="rpip60ee6b417c9dab32a4e0" data-target-for="rpip96e0014131ca49453fa9">Â </span><span class="mdescRight" data-target="true" id="rpip92502504c1bb23192ce9" data-parent-id="rpip60ee6b417c9dab32a4e0" data-target-for="rpip92502504c1bb23192ce9">Initialise the system clock. <br id="rpip6463397be64d083a7210"></span></p>
7074 <li class="memitem">
7075 <p data-target="true" data-target-for="rpipe89f2d2d83e422b6f655"><span class="memItemLeft" data-target="true" id="rpip358360f8587089b15fcb" data-parent-id="rpipe89f2d2d83e422b6f655" data-target-for="rpip358360f8587089b15fcb">bool </span><span class="memItemRight" data-target="true" id="rpipaa0a97709960a227b4ce" data-parent-id="rpipe89f2d2d83e422b6f655" data-target-for="rpipaa0a97709960a227b4ce"><a class="el" href="#ga8553a9d91b581e0d3dbccd8d83b1a1b9" id="rpip3a377e6b24180ffbd310" data-adjusted="true">check_sys_clock_khz</a> (uint32_t freq_khz, uint *vco_freq_out, uint *post_div1_out, uint *post_div2_out)</span></p>
7077 <li class="memdesc">
7078 <p data-target="true" data-target-for="rpipc9bfe8b24e1c81c2f847"><span class="mdescLeft" data-target="true" id="rpip4749fbbe15236cb714da" data-parent-id="rpipc9bfe8b24e1c81c2f847" data-target-for="rpip4749fbbe15236cb714da">Â </span><span class="mdescRight" data-target="true" id="rpip59173a574cfedbc3d71e" data-parent-id="rpipc9bfe8b24e1c81c2f847" data-target-for="rpip59173a574cfedbc3d71e">Check if a given system clock frequency is valid/attainable. <br id="rpipb352194e5aaf4ac93e09"></span></p>
7080 <li class="memitem">
7081 <p data-target="true" data-target-for="rpipcbe50c0905f48969ce9f"><span class="memItemLeft" data-target="true" id="rpip7fcdd73209fc6daa2429" data-parent-id="rpipcbe50c0905f48969ce9f" data-target-for="rpip7fcdd73209fc6daa2429">static bool </span><span class="memItemRight" data-target="true" id="rpipa47206414c11b413bd30" data-parent-id="rpipcbe50c0905f48969ce9f" data-target-for="rpipa47206414c11b413bd30"><a class="el" href="#gab3a273e837ba1947bb5fd8fc97cf47e5" id="rpipe53369b1a6ada29b2194" data-adjusted="true">set_sys_clock_khz</a> (uint32_t freq_khz, bool required)</span></p>
7083 <li class="memdesc">
7084 <p data-target="true" data-target-for="rpip773c5c36e33cbf5f7bda"><span class="mdescLeft" data-target="true" id="rpip5ade35ea913eae8fa7ac" data-parent-id="rpip773c5c36e33cbf5f7bda" data-target-for="rpip5ade35ea913eae8fa7ac">Â </span><span class="mdescRight" data-target="true" id="rpipd93b9a11272a1f51b8ca" data-parent-id="rpip773c5c36e33cbf5f7bda" data-target-for="rpipd93b9a11272a1f51b8ca">Attempt to set a system clock frequency in khz. <br id="rpip1bb19451e34ac78dd6e2"></span></p>
7087 <a name="details" id="details"></a>
7090 <h3 id="rpip67e7d087a6d9d4177c9c">
7091 <a class="anchor" href="#rpip67e7d087a6d9d4177c9c"></a>Detailed Description</h3>
7092 <p id="rpip42ffb190338598712b4e">Aggregation of a core subset of Raspberry Pi Pico SDK libraries used by most executables along with some additional utility methods. Including pico_stdlib gives you everything you need to get a basic program running which prints to stdout or flashes a LED</p>
7093 <p id="rpipc743ac0135a27dc4265e">This library aggregates:</p>
7094 <div class="ulist" id="rpipf46d005e64a394b7e367" data-parent-id="rpipb872915eba2c30d53ca4">
7095 <ul data-target="true" data-target-for="rpipf46d005e64a394b7e367">
7096 <li id="rpip2e7f1056d4256713dc6d"><p><a class="el" href="hardware.html#hardware_uart" id="rpip112c71519dac6e2eb1ef">hardware_uart</a></p></li>
7097 <li id="rpip6eacc3f4c296e33b17d2"><p><a class="el" href="hardware.html#hardware_gpio" id="rpip0369ccf05e794a5622a9">hardware_gpio</a></p></li>
7098 <li id="rpip31dfa815c6b407f199f6"><p><a class="el" href="runtime.html#pico_binary_info" id="rpip37d8f9c47a46564ebd4a">pico_binary_info</a></p></li>
7099 <li id="rpip155f6ccccb14894d1e55"><p><a class="el" href="runtime.html#pico_runtime" id="rpipc5dbc401988e1b233e5a">pico_runtime</a></p></li>
7100 <li id="rpipcd982b6b280cc3f7437c"><p><a class="el" href="runtime.html#pico_platform" id="rpip6fc42c171d60b1ef54f7">pico_platform</a></p></li>
7101 <li id="rpip231d2422c50148c85a11"><p><a class="el" href="runtime.html#pico_printf" id="rpipc628b79af2ca8f3b155b">pico_printf</a></p></li>
7102 <li id="rpipd4e0539a14c7d43d56e5"><p><a class="el" href="runtime.html#pico_stdio" id="rpip291641f89500b624e314">pico_stdio</a></p></li>
7103 <li id="rpip408b7f3c37d982fcd54e"><p><a class="el" href="runtime.html#pico_standard_link" id="rpipf76f7d490dca0d219c16">pico_standard_link</a></p></li>
7104 <li id="rpip402b73d7cacd129f0ebd"><p><a class="el" href="high_level.html#pico_util" id="rpip6643cd8b73c29e6fc8b3">pico_util</a></p></li>
7107 <p id="rpip0403f8c8a7735d7fca8b">There are some basic default values used by these functions that will default to usable values, however, they can be customised in a board definition header via config.h or similar </p>
7110 <h3 id="rpip9d8a4958ff265de7762d">
7111 <a class="anchor" href="#rpip9d8a4958ff265de7762d"></a>Function Documentation</h3>
7112 <a id="ga8553a9d91b581e0d3dbccd8d83b1a1b9" name="ga8553a9d91b581e0d3dbccd8d83b1a1b9"></a>
7114 <h4 id="rpip44dddee711159c857f07">
7115 <a class="anchor" href="#rpip44dddee711159c857f07"></a>◆ check_sys_clock_khz()</h4>
7116 <div class="memitem" id="rpip842c3bf1013ae44b3c6a">
7117 <div class="memproto" id="rpip6f24133fbb4d96b14ae1">
7118 <table class="memname" id="rpip647d992f9d36439ec564">
7119 <tr id="rpipcca4ec5b2e045f313b19">
7120 <td class="memname" id="rpip1e849d033a7a696663a3">bool check_sys_clock_khz </td>
7121 <td id="rpipa7f76943944faa98cd43">(</td>
7122 <td class="paramtype" id="rpip9e786558ef5f3d75b363">uint32_t </td>
7123 <td class="paramname" id="rpip62968199980a95b588bb">
7124 <em id="rpipc04ec9bf8a1026434199">freq_khz</em>, </td>
7126 <tr id="rpip3f624fe03280d141d434">
7127 <td class="paramkey" id="rpip030b7eccaaa5413d9987"></td>
7128 <td id="rpip78fa17074a07c78ad4cf"></td>
7129 <td class="paramtype" id="rpip5b7f72901a90d1ddd287">uint *Â </td>
7130 <td class="paramname" id="rpip8bf2a968aafe7833d1bb">
7131 <em id="rpipcddcb67f5eb26ea5d16f">vco_freq_out</em>, </td>
7133 <tr id="rpip8d2c481c2cf4601c7c2c">
7134 <td class="paramkey" id="rpipf9be9c81e17743a68898"></td>
7135 <td id="rpip5e93d4cde7d502df91e6"></td>
7136 <td class="paramtype" id="rpipc38e6937876d29f77fbd">uint *Â </td>
7137 <td class="paramname" id="rpipf80f6dd4bbe28b3626cf">
7138 <em id="rpip93dcec9a0af7351fd2e1">post_div1_out</em>, </td>
7140 <tr id="rpipf64b6bd3d1e904852046">
7141 <td class="paramkey" id="rpip4ed1ba2a82739aaadbdd"></td>
7142 <td id="rpip74fec2330675e80bcce0"></td>
7143 <td class="paramtype" id="rpipfed280f11306df82c9dd">uint *Â </td>
7144 <td class="paramname" id="rpip459f4e1723fae6c6c3c9">
7145 <em id="rpip712015fee32afd288de1">post_div2_out</em>Â </td>
7147 <tr id="rpipee850818cd2884cbeddf">
7148 <td id="rpip087aaad398af261bc5e1"></td>
7149 <td id="rpip23e334bc57183fa9f39d">)</td>
7150 <td id="rpipd663ddef4d75b940e470"></td>
7151 <td id="rpip976e60332d14415526b8"></td>
7155 <div class="memdoc" id="rpip023d1caca30d189b8234">
7157 <p id="rpipe7a2a3ef4fd5b1e64138">Check if a given system clock frequency is valid/attainable. </p>
7158 <h4 id="rpipcf78860ba97374269db8" data-parent-id="rpip790bafaa7e9872122f90" data-target-for="rpipcf78860ba97374269db8">Parameters</h4>
7159 <p class="paragraph" id="rpip3889e70f55f327ea65f7" data-parent-id="rpip790bafaa7e9872122f90" data-target-for="rpip3889e70f55f327ea65f7">
7161 <table class="params" id="rpip01e642a6d00cada8921b">
7162 <tr id="rpipa71ad2e497621ab46379">
7163 <td class="paramname" id="rpip6dc2b5f0f5bca2f48d70">freq_khz</td>
7164 <td id="rpip5588d044bb256d39a4d5">Requested frequency </td>
7166 <tr id="rpipa685e7b8a00855ceaed6">
7167 <td class="paramname" id="rpipd67d5bb8a8246a77a8a6">vco_freq_out</td>
7168 <td id="rpip2ec92229c0a4de172618">On success, the voltage controlled oscillator frequency to be used by the SYS PLL </td>
7170 <tr id="rpip4bdd8ae7a0ab5ace4d44">
7171 <td class="paramname" id="rpip4c86841db3c48314af94">post_div1_out</td>
7172 <td id="rpipc278fc7e460117473a16">On success, The first post divider for the SYS PLL </td>
7174 <tr id="rpipfeec08e92e77c777acab">
7175 <td class="paramname" id="rpipd995c01fe4353c4c2195">post_div2_out</td>
7176 <td id="rpip776b1c5952086623b7d2">On success, The second post divider for the SYS PLL. </td>
7182 <h4 class="label" id="rpip009e6af93eb378113993" data-parent-id="rpip54de861841bc8e4183e8" data-target-for="rpip009e6af93eb378113993">Returns</h4>
7183 <p class="returns" id="rpipac855738bc90d164da62" data-parent-id="rpip54de861841bc8e4183e8" data-target-for="rpipac855738bc90d164da62">true if the frequency is possible and the output parameters have been written. </p>
7187 <a id="ga89efe34eab0b8b96954eb0e19a38c8be" name="ga89efe34eab0b8b96954eb0e19a38c8be"></a>
7190 <h4 id="rpipb7aceb30449c45f18f7c">
7191 <a class="anchor" href="#rpipb7aceb30449c45f18f7c"></a>◆ set_sys_clock_48mhz()</h4>
7192 <div class="memitem" id="rpip81f339cc3dce151f9d5e">
7193 <div class="memproto" id="rpip81f9082fa89b6fcd2bb4">
7194 <table class="memname" id="rpipcc94fa2ae83629644680">
7195 <tr id="rpip841f21e96df7b852d665">
7196 <td class="memname" id="rpipecd6453ef14755a7b880">void set_sys_clock_48mhz </td>
7197 <td id="rpip844ccf8aeaec3ccb5b1c">(</td>
7198 <td class="paramtype" id="rpip230bd1b0065fb734135a">void </td>
7199 <td class="paramname" id="rpip17d3f36acc827734b6ff"></td>
7200 <td id="rpip9cc337e54bbe412799ba">)</td>
7201 <td id="rpip4f1c6867e179b6f15dc7"></td>
7205 <div class="memdoc" id="rpip009a90f60314c50e1df7">
7207 <p id="rpip8e78f4f96d6396d31d1e">Initialise the system clock to 48MHz. </p>
7208 <p id="rpipb8a82b53462d969f31c6">Set the system clock to 48MHz, and set the peripheral clock to match. </p>
7212 <a id="gab3a273e837ba1947bb5fd8fc97cf47e5" name="gab3a273e837ba1947bb5fd8fc97cf47e5"></a>
7215 <h4 id="rpip247b75da507bbd9621ee">
7216 <a class="anchor" href="#rpip247b75da507bbd9621ee"></a>◆ set_sys_clock_khz()</h4>
7217 <div class="memitem" id="rpipa1cb48f4a58318bd1475">
7218 <div class="memproto" id="rpip5f8e9b354c87d415e0f8">
7219 <table class="mlabels" id="rpip924a1cd4f85c016d0125">
7220 <tr id="rpipd94c998c584b2dac2250">
7221 <td class="mlabels-left" id="rpipf22524cd40a4ec249daf">
7222 <table class="memname" id="rpip10d743b703fd1c7fabe8">
7223 <tr id="rpip4d5199350b7ea556fef0">
7224 <td class="memname" id="rpip751bf2ca6594e9b8c626">static bool set_sys_clock_khz </td>
7225 <td id="rpipd39cfe31400e41b61fac">(</td>
7226 <td class="paramtype" id="rpipb307b74176adcf0c2c78">uint32_t </td>
7227 <td class="paramname" id="rpip3b8454fe835c7a3fc68f">
7228 <em id="rpipc00dd262b6a8e8a63eeb">freq_khz</em>, </td>
7230 <tr id="rpip42095d3d754d326d7778">
7231 <td class="paramkey" id="rpipc217e9d399a45fc82ff5"></td>
7232 <td id="rpipd01c94c804969ba2993f"></td>
7233 <td class="paramtype" id="rpip24a1584f99724b3907f0">bool </td>
7234 <td class="paramname" id="rpip667021ae81491a0544c3">
7235 <em id="rpipe65412ebeb50539c310f">required</em>Â </td>
7237 <tr id="rpipfe60c692c55e13003d8f">
7238 <td id="rpip68989ebc58bdaf27d3b5"></td>
7239 <td id="rpipe3f84aebd3416fc7d259">)</td>
7240 <td id="rpipe6a5e6d262e1d037261e"></td>
7241 <td id="rpipac697610979c1290efe1"></td>
7245 <td class="mlabels-right" id="rpipecb9c8f5b01e09c276dc">
7246 <span class="mlabels" id="rpip2ad064f1a7e7afc9b80c"><span class="mlabel" id="rpip4a326426591541743499">inline</span><span class="mlabel" id="rpip888ffe817bee33f60db9">static</span></span> </td>
7250 <div class="memdoc" id="rpipeb6d9434be6d657370ee">
7252 <p id="rpip6256f158d652b8ed189f">Attempt to set a system clock frequency in khz. </p>
7253 <p id="rpip1894a7f40ed734e63af4">Note that not all clock frequencies are possible; it is preferred that you use src/rp2_common/hardware_clocks/scripts/vcocalc.py to calculate the parameters for use with set_sys_clock_pll</p>
7254 <h4 id="rpip4a81cac545184883934d" data-parent-id="rpip7eefce5d5b88227291bd" data-target-for="rpip4a81cac545184883934d">Parameters</h4>
7255 <p class="paragraph" id="rpip04545b5745e1b036b859" data-parent-id="rpip7eefce5d5b88227291bd" data-target-for="rpip04545b5745e1b036b859">
7257 <table class="params" id="rpip055f27df9565e1f988a5">
7258 <tr id="rpip4ed1f8d32899dc05cce2">
7259 <td class="paramname" id="rpipf10bfef92c4479f2b84b">freq_khz</td>
7260 <td id="rpipb05879f925143906b704">Requested frequency </td>
7262 <tr id="rpipbe0f665cb2fd2149b55d">
7263 <td class="paramname" id="rpip6f087f31c05c42952f33">required</td>
7264 <td id="rpipf1d8527b843422804785">if true then this function will assert if the frequency is not attainable. </td>
7270 <h4 class="label" id="rpip111c94ec2b47baac1c7a" data-parent-id="rpip39cccad154366d62419f" data-target-for="rpip111c94ec2b47baac1c7a">Returns</h4>
7271 <p class="returns" id="rpip79bae1d013825c98b8a0" data-parent-id="rpip39cccad154366d62419f" data-target-for="rpip79bae1d013825c98b8a0">true if the clock was configured </p>
7275 <a id="ga44d5e0845d4f75f3b0c97c733e39f4c8" name="ga44d5e0845d4f75f3b0c97c733e39f4c8"></a>
7278 <h4 id="rpip9641689f257d16a96cb0">
7279 <a class="anchor" href="#rpip9641689f257d16a96cb0"></a>◆ set_sys_clock_pll()</h4>
7280 <div class="memitem" id="rpip4e9047b00d58cbfac6f4">
7281 <div class="memproto" id="rpipc7c5e38d9885c1e3ddaf">
7282 <table class="memname" id="rpipf5fdc40a64f6bfaba76f">
7283 <tr id="rpip7393db2d91e7fc13710a">
7284 <td class="memname" id="rpip95719f46a6a328762477">void set_sys_clock_pll </td>
7285 <td id="rpipb15c90197fc4f8a1398d">(</td>
7286 <td class="paramtype" id="rpipaa20f1ebd681ce7e88b3">uint32_t </td>
7287 <td class="paramname" id="rpipe7a3d772c62ea0a84163">
7288 <em id="rpip600d6e7fd2e8763adca1">vco_freq</em>, </td>
7290 <tr id="rpipe43dea7a0aed8a2a01a3">
7291 <td class="paramkey" id="rpip909ab25907f4f66d9a9e"></td>
7292 <td id="rpipb697a043f724d8bcb87e"></td>
7293 <td class="paramtype" id="rpip85b21597e64553e9bf40">uint </td>
7294 <td class="paramname" id="rpipb38286ef9365e5e9f1b1">
7295 <em id="rpip995a74fdd97f645a67ed">post_div1</em>, </td>
7297 <tr id="rpip1e4c69d445e30e438005">
7298 <td class="paramkey" id="rpip1ea8189fe09584c240d6"></td>
7299 <td id="rpip3c427f36cf397425791c"></td>
7300 <td class="paramtype" id="rpip6abb939754d402cd82a4">uint </td>
7301 <td class="paramname" id="rpipf219e701b28da820c0a7">
7302 <em id="rpipcfb0deec091e730b7934">post_div2</em>Â </td>
7304 <tr id="rpip504a59140ad573976f89">
7305 <td id="rpip0b4eda9dad1046342031"></td>
7306 <td id="rpipce771f92297015641297">)</td>
7307 <td id="rpipd113162b56731c1f39d1"></td>
7308 <td id="rpip5d68d1fa33717af5eca1"></td>
7312 <div class="memdoc" id="rpipeae981197fd86f8eacf8">
7314 <p id="rpip4470ab4543a9ae6783db">Initialise the system clock. </p>
7315 <h4 id="rpip78d3fc0921d432299177" data-parent-id="rpipea488108f2b8f9a87381" data-target-for="rpip78d3fc0921d432299177">Parameters</h4>
7316 <p class="paragraph" id="rpipc9e1f0a759f0b7257d17" data-parent-id="rpipea488108f2b8f9a87381" data-target-for="rpipc9e1f0a759f0b7257d17">
7318 <table class="params" id="rpip8a86c2d39c4243e3a824">
7319 <tr id="rpip7950d1bc3f935d9ef4a8">
7320 <td class="paramname" id="rpip5590715fab9f3d3810ea">vco_freq</td>
7321 <td id="rpip0ed24cc9df802e3629b4">The voltage controller oscillator frequency to be used by the SYS PLL </td>
7323 <tr id="rpip3729be6fbec366b4a4b5">
7324 <td class="paramname" id="rpipaa2883d66c8d44a8214e">post_div1</td>
7325 <td id="rpip01ad6414b25d8567b354">The first post divider for the SYS PLL </td>
7327 <tr id="rpip5b22e238622238a1516b">
7328 <td class="paramname" id="rpip61802c2ec326d80adcaa">post_div2</td>
7329 <td id="rpip62b93f77e42f03c5e4f4">The second post divider for the SYS PLL.</td>
7335 <p id="rpip6888d432c339f66fe711">See the PLL documentation in the datasheet for details of driving the PLLs. </p>
7339 <a id="gacf31cd777510116d829aea040b034c4c" name="gacf31cd777510116d829aea040b034c4c"></a>
7342 <h4 id="rpip45944a6cb53a10ad6c8a">
7343 <a class="anchor" href="#rpip45944a6cb53a10ad6c8a"></a>◆ setup_default_uart()</h4>
7344 <div class="memitem" id="rpipb60a6d92cfb165abf07c">
7345 <div class="memproto" id="rpip270a8de20e2b0b04b26a">
7346 <table class="memname" id="rpipda023ef5d70584541e19">
7347 <tr id="rpip60826d8a5b74aff1acc5">
7348 <td class="memname" id="rpip29f1b52070f6e9b1be89">void setup_default_uart </td>
7349 <td id="rpipc1b93c5dd507268a2621">(</td>
7350 <td class="paramtype" id="rpipec215220ac00be2a8f72">void </td>
7351 <td class="paramname" id="rpipefd2ad2f51d724baeaa6"></td>
7352 <td id="rpip7e09b78547b2e15919c6">)</td>
7353 <td id="rpipc4e2474786653cbc54de"></td>
7357 <div class="memdoc" id="rpip769d611acf9500441158">
7359 <p id="rpipf75439a31745582fd4b1">Set up the default UART and assign it to the default GPIOs. </p>
7360 <p id="rpip64ec65bf726decfa756a">By default this will use UART 0, with TX to pin GPIO 0, RX to pin GPIO 1, and the baudrate to 115200</p>
7361 <p id="rpipe46a19c4a899f7e8ebb8">Calling this method also initializes stdin/stdout over UART if the <a class="el" href="runtime.html#pico_stdio_uart" id="rpipa78515a6478324736c24">pico_stdio_uart</a> library is linked.</p>
7362 <p id="rpip34debcb06237b0464abf">Defaults can be changed using configuration defines, PICO_DEFAULT_UART_INSTANCE, PICO_DEFAULT_UART_BAUD_RATE PICO_DEFAULT_UART_TX_PIN PICO_DEFAULT_UART_RX_PIN </p>
7371 <a class="anchor" href="#pico_sync"></a>pico_sync</h2>
7372 <div class="sectionbody"></div>
7373 <div class="ingroups" id="rpip172fcdffc2da28ed6d6d">Part of: <a class="el" href="high_level.html" id="rpipfb63535f2bb7156cd345">High Level APIs</a>
7376 <h3 id="rpip42988faa0a4de968a0fe">
7377 <a class="anchor" href="#rpip42988faa0a4de968a0fe"></a>Modules</h3>
7378 <ul class="memberdecls" id="rpipa295933d21a2c998fff2" data-parent-id="rpipb8d8d1468d12a4d143cd">
7379 <li class="memitem">
7380 <p data-target="true" data-target-for="rpipa295933d21a2c998fff2"><span class="memItemLeft" data-target="true" id="rpip7e9629c30767dd303dc7" data-parent-id="rpipa295933d21a2c998fff2" data-target-for="rpip7e9629c30767dd303dc7">Â </span><span class="memItemRight" data-target="true" id="rpip5cbb2aa2914af1520342" data-parent-id="rpipa295933d21a2c998fff2" data-target-for="rpip5cbb2aa2914af1520342"><a class="el" href="high_level.html#critical_section" id="rpip3a3a052d951def7bcc12">critical_section</a></span></p>
7382 <li class="memdesc">
7383 <p data-target="true" data-target-for="rpipf772c61d6924c444ce6d"><span class="mdescLeft" data-target="true" id="rpipaa6712a59473c2bdb3ff" data-parent-id="rpipf772c61d6924c444ce6d" data-target-for="rpipaa6712a59473c2bdb3ff">Â </span><span class="mdescRight" data-target="true" id="rpipb6f49552f96d664c24ce" data-parent-id="rpipf772c61d6924c444ce6d" data-target-for="rpipb6f49552f96d664c24ce">Critical Section API for short-lived mutual exclusion safe for IRQ and multi-core. <br id="rpipb0649905f45a6bc700ef"></span></p>
7385 <li class="memitem">
7386 <p data-target="true" data-target-for="rpip97ddc270cbea12aaf437"><span class="memItemLeft" data-target="true" id="rpip61e70a07b956ac1f3420" data-parent-id="rpip97ddc270cbea12aaf437" data-target-for="rpip61e70a07b956ac1f3420">Â </span><span class="memItemRight" data-target="true" id="rpipcb55af214fa2c8d79c98" data-parent-id="rpip97ddc270cbea12aaf437" data-target-for="rpipcb55af214fa2c8d79c98"><a class="el" href="high_level.html#lock_core" id="rpip7bc14bbe9a81a5f1e0ce">lock_core</a></span></p>
7388 <li class="memdesc">
7389 <p data-target="true" data-target-for="rpip565f1deae3114a74323a"><span class="mdescLeft" data-target="true" id="rpip91967b96d371c7faf161" data-parent-id="rpip565f1deae3114a74323a" data-target-for="rpip91967b96d371c7faf161">Â </span><span class="mdescRight" data-target="true" id="rpipca995f3d8edbdb6504c9" data-parent-id="rpip565f1deae3114a74323a" data-target-for="rpipca995f3d8edbdb6504c9">base synchronization/lock primitive support <br id="rpipea7061fe09195f08b0a7"></span></p>
7391 <li class="memitem">
7392 <p data-target="true" data-target-for="rpipc9a8c2ccf38f5b75ce80"><span class="memItemLeft" data-target="true" id="rpip406369bc18423e0e7ee7" data-parent-id="rpipc9a8c2ccf38f5b75ce80" data-target-for="rpip406369bc18423e0e7ee7">Â </span><span class="memItemRight" data-target="true" id="rpip24fdf73c8a6e5d7b60e0" data-parent-id="rpipc9a8c2ccf38f5b75ce80" data-target-for="rpip24fdf73c8a6e5d7b60e0"><a class="el" href="high_level.html#mutex" id="rpip4f3aa9fe5525d7fe563c">mutex</a></span></p>
7394 <li class="memdesc">
7395 <p data-target="true" data-target-for="rpipcb7e9ef27d919158a19b"><span class="mdescLeft" data-target="true" id="rpipd41b0b41e9787d9edfdb" data-parent-id="rpipcb7e9ef27d919158a19b" data-target-for="rpipd41b0b41e9787d9edfdb">Â </span><span class="mdescRight" data-target="true" id="rpipacc93c68f2a4e752775d" data-parent-id="rpipcb7e9ef27d919158a19b" data-target-for="rpipacc93c68f2a4e752775d">Mutex API for non IRQ mutual exclusion between cores. <br id="rpip3073ecba5ee3aed54698"></span></p>
7397 <li class="memitem">
7398 <p data-target="true" data-target-for="rpipa9095c5ebcb8bed228fe"><span class="memItemLeft" data-target="true" id="rpipe5c4d2c26820ed3df717" data-parent-id="rpipa9095c5ebcb8bed228fe" data-target-for="rpipe5c4d2c26820ed3df717">Â </span><span class="memItemRight" data-target="true" id="rpipb3943d49993c3e91b2ce" data-parent-id="rpipa9095c5ebcb8bed228fe" data-target-for="rpipb3943d49993c3e91b2ce"><a class="el" href="high_level.html#sem" id="rpipcea1c7daa6952a019ecd">sem</a></span></p>
7400 <li class="memdesc">
7401 <p data-target="true" data-target-for="rpipf3837823faf233ca6fa8"><span class="mdescLeft" data-target="true" id="rpipf646578be18949f452ac" data-parent-id="rpipf3837823faf233ca6fa8" data-target-for="rpipf646578be18949f452ac">Â </span><span class="mdescRight" data-target="true" id="rpip74dcded0c82bcba86419" data-parent-id="rpipf3837823faf233ca6fa8" data-target-for="rpip74dcded0c82bcba86419">Semaphore API for restricting access to a resource. <br id="rpip35bcae5259b1b2e45fba"></span></p>
7404 <a name="details" id="details"></a>
7407 <h3 id="rpip0a443d120465214bff04">
7408 <a class="anchor" href="#rpip0a443d120465214bff04"></a>Detailed Description</h3>
7409 <p id="rpip0f3c9152c71020d483ca">Synchronization primitives and mutual exclusion </p>
7412 <h3 id="critical_section">
7413 <a class="anchor" href="#critical_section"></a>critical_section</h3>
7414 <div class="ingroups" id="rpipd5a9b1fd63091f89ccdb">Part of: <a class="el" href="high_level.html" id="rpip1b8ea81349d5e9dd247f">High Level APIs</a> » <a class="el" href="high_level.html#pico_sync" id="rpip9cfa9075cb3749eec6d1">pico_sync</a>
7416 <p id="rpipeddaba7e96dbf52ee9cd">Critical Section API for short-lived mutual exclusion safe for IRQ and multi-core.
7417 <a href="#ga9099a2128c96bedffa14" id="rpip049a13b22319de4a256a" data-adjusted="true">More...</a></p>
7419 <h4 id="rpipad1d0d0f8938510e0868">
7420 <a class="anchor" href="#rpipad1d0d0f8938510e0868"></a>Functions</h4>
7421 <ul class="memberdecls" id="rpipba3221a14d5d3bc93f93" data-parent-id="rpipd324313899e7495b59a1">
7422 <li class="memitem">
7423 <p data-target="true" data-target-for="rpipba3221a14d5d3bc93f93"><span class="memItemLeft" data-target="true" id="rpipfe3c20e7709a83bb4a41" data-parent-id="rpipba3221a14d5d3bc93f93" data-target-for="rpipfe3c20e7709a83bb4a41">void </span><span class="memItemRight" data-target="true" id="rpip11a5bb267a51212ffdce" data-parent-id="rpipba3221a14d5d3bc93f93" data-target-for="rpip11a5bb267a51212ffdce"><a class="el" href="#ga22cd2722a96179036820e87b29209cfd" id="rpip245a894dbfe15499a0d3" data-adjusted="true">critical_section_init</a> (critical_section_t *crit_sec)</span></p>
7425 <li class="memdesc">
7426 <p data-target="true" data-target-for="rpipb3b04de80810370584ae"><span class="mdescLeft" data-target="true" id="rpip2e719355df3d92d3966a" data-parent-id="rpipb3b04de80810370584ae" data-target-for="rpip2e719355df3d92d3966a">Â </span><span class="mdescRight" data-target="true" id="rpip424b6f2cb3dafe05a209" data-parent-id="rpipb3b04de80810370584ae" data-target-for="rpip424b6f2cb3dafe05a209">Initialise a <a class="el" href="structcritical__section.html" id="rpip730f4a81c1428aea4ebb">critical_section</a> structure allowing the system to assign a spin lock number. <br id="rpip0b6fc4dcc5499acaf0bf"></span></p>
7428 <li class="memitem">
7429 <p data-target="true" data-target-for="rpipf24add2c6070e7c6bf9a"><span class="memItemLeft" data-target="true" id="rpipebeee8a4fb88c7850843" data-parent-id="rpipf24add2c6070e7c6bf9a" data-target-for="rpipebeee8a4fb88c7850843">void </span><span class="memItemRight" data-target="true" id="rpip920e59d16360be34fa45" data-parent-id="rpipf24add2c6070e7c6bf9a" data-target-for="rpip920e59d16360be34fa45"><a class="el" href="#gae1b4eb5dcab9ac679970ac43d618de2c" id="rpipa8ba7bebe8e3ec4f09d4" data-adjusted="true">critical_section_init_with_lock_num</a> (critical_section_t *crit_sec, uint lock_num)</span></p>
7431 <li class="memdesc">
7432 <p data-target="true" data-target-for="rpipe0ed3b00f16c915aae79"><span class="mdescLeft" data-target="true" id="rpip92b9a0c86a5485dc3745" data-parent-id="rpipe0ed3b00f16c915aae79" data-target-for="rpip92b9a0c86a5485dc3745">Â </span><span class="mdescRight" data-target="true" id="rpip277dcdf6af959153f34c" data-parent-id="rpipe0ed3b00f16c915aae79" data-target-for="rpip277dcdf6af959153f34c">Initialise a <a class="el" href="structcritical__section.html" id="rpip60ad4ed312ed1c130c4f">critical_section</a> structure assigning a specific spin lock number. <br id="rpip8e2ca415617c6aad3f97"></span></p>
7434 <li class="memitem">
7435 <p data-target="true" data-target-for="rpipa959d63835aa936759d6"><span class="memItemLeft" data-target="true" id="rpipbc8bc5f01ab27ef957e9" data-parent-id="rpipa959d63835aa936759d6" data-target-for="rpipbc8bc5f01ab27ef957e9">static void </span><span class="memItemRight" data-target="true" id="rpip323baf99ae0954107bb0" data-parent-id="rpipa959d63835aa936759d6" data-target-for="rpip323baf99ae0954107bb0"><a class="el" href="#ga15e4552b4e1419faad51eba026a39aad" id="rpipc58ef445b7f35cee5224" data-adjusted="true">critical_section_enter_blocking</a> (critical_section_t *crit_sec)</span></p>
7437 <li class="memdesc">
7438 <p data-target="true" data-target-for="rpip94d048fb009f1e1143a0"><span class="mdescLeft" data-target="true" id="rpip46f36a80c9a650fa638f" data-parent-id="rpip94d048fb009f1e1143a0" data-target-for="rpip46f36a80c9a650fa638f">Â </span><span class="mdescRight" data-target="true" id="rpipd83b1f0791baca565dab" data-parent-id="rpip94d048fb009f1e1143a0" data-target-for="rpipd83b1f0791baca565dab">Enter a <a class="el" href="structcritical__section.html" id="rpipa337c2216de88fce671a">critical_section</a>. <br id="rpip52b1a1a6b345a4078b3c"></span></p>
7440 <li class="memitem">
7441 <p data-target="true" data-target-for="rpipa6b7d60c17d24a8f1985"><span class="memItemLeft" data-target="true" id="rpip30d7937d0b133fa26570" data-parent-id="rpipa6b7d60c17d24a8f1985" data-target-for="rpip30d7937d0b133fa26570">static void </span><span class="memItemRight" data-target="true" id="rpip7712bf0fc4d086283ca7" data-parent-id="rpipa6b7d60c17d24a8f1985" data-target-for="rpip7712bf0fc4d086283ca7"><a class="el" href="#gab57fcee3973b26dced4601e6018a227c" id="rpipebbc1fbee05e3a0dea91" data-adjusted="true">critical_section_exit</a> (critical_section_t *crit_sec)</span></p>
7443 <li class="memdesc">
7444 <p data-target="true" data-target-for="rpip71c4af0bbf61a2b1f376"><span class="mdescLeft" data-target="true" id="rpipf18d754c0a5f017f0a01" data-parent-id="rpip71c4af0bbf61a2b1f376" data-target-for="rpipf18d754c0a5f017f0a01">Â </span><span class="mdescRight" data-target="true" id="rpip8912de8f69eac4790566" data-parent-id="rpip71c4af0bbf61a2b1f376" data-target-for="rpip8912de8f69eac4790566">Release a <a class="el" href="structcritical__section.html" id="rpip9fec9ba99848cf3e5b11">critical_section</a>. <br id="rpip63d946f38b5bcaf5ac19"></span></p>
7446 <li class="memitem">
7447 <p data-target="true" data-target-for="rpip74a2111a498d8d2bfb7e"><span class="memItemLeft" data-target="true" id="rpipd784c88b96a6ce5aed98" data-parent-id="rpip74a2111a498d8d2bfb7e" data-target-for="rpipd784c88b96a6ce5aed98">void </span><span class="memItemRight" data-target="true" id="rpip66ff97d6fe2f8634681d" data-parent-id="rpip74a2111a498d8d2bfb7e" data-target-for="rpip66ff97d6fe2f8634681d"><a class="el" href="#ga08444ba7879fae8813dd5573a13f0351" id="rpip44d154e0a8c25eac8b4f" data-adjusted="true">critical_section_deinit</a> (critical_section_t *crit_sec)</span></p>
7449 <li class="memdesc">
7450 <p data-target="true" data-target-for="rpipd49d7007638941b86584"><span class="mdescLeft" data-target="true" id="rpipbdb10c1b690b23c64720" data-parent-id="rpipd49d7007638941b86584" data-target-for="rpipbdb10c1b690b23c64720">Â </span><span class="mdescRight" data-target="true" id="rpip37f534d08b98b67f8945" data-parent-id="rpipd49d7007638941b86584" data-target-for="rpip37f534d08b98b67f8945">De-Initialise a <a class="el" href="structcritical__section.html" id="rpip81da166150307b781e22">critical_section</a> created by the critical_section_init method. <br id="rpipb25129395c9f89341b60"></span></p>
7453 <a name="details" id="ga9099a2128c96bedffa14"></a>
7456 <h4 id="rpip163cbaa1899522be25d4">
7457 <a class="anchor" href="#rpip163cbaa1899522be25d4"></a>Detailed Description</h4>
7458 <p id="rpip35b971c3311fdbea2f72">Critical Section API for short-lived mutual exclusion safe for IRQ and multi-core. </p>
7459 <p id="rpip657a3575e0d5e5d2f301">A critical section is non-reentrant, and provides mutual exclusion using a spin-lock to prevent access from the other core, and from (higher priority) interrupts on the same core. It does the former using a spin lock and the latter by disabling interrupts on the calling core.</p>
7460 <p id="rpip7a3e7d3622bde205ce85">Because interrupts are disabled when a <a class="el" href="structcritical__section.html" id="rpip8793e039f7549462151b">critical_section</a> is owned, uses of the <a class="el" href="structcritical__section.html" id="rpipc96042840c7578e59d1b">critical_section</a> should be as short as possible. </p>
7463 <h4 id="rpipbb4e73ca48d3157c2e9d">
7464 <a class="anchor" href="#rpipbb4e73ca48d3157c2e9d"></a>Function Documentation</h4>
7465 <a id="ga08444ba7879fae8813dd5573a13f0351" name="ga08444ba7879fae8813dd5573a13f0351"></a>
7467 <h5 id="rpipc5f71f96b109c8a74fbc">
7468 <a class="anchor" href="#rpipc5f71f96b109c8a74fbc"></a>◆ critical_section_deinit()</h5>
7469 <div class="memitem" id="rpip90862b46f92d428bc0f5">
7470 <div class="memproto" id="rpip19e35e1b5f7b889ffde8">
7471 <table class="memname" id="rpipbaed95615823b69bdd34">
7472 <tr id="rpipc111245d0815bd167e71">
7473 <td class="memname" id="rpipc1aab12fc615673c4197">void critical_section_deinit </td>
7474 <td id="rpip2997fde4c7845003b64d">(</td>
7475 <td class="paramtype" id="rpipd240bce2ae8f4018ab53">critical_section_t *Â </td>
7476 <td class="paramname" id="rpip4f729116222d0af73d65"><em id="rpipc5b4ba0e60d7636d0712">crit_sec</em></td>
7477 <td id="rpip63ecb02a63e7e56ba428">)</td>
7478 <td id="rpipe7451610bdf971dc9a03"></td>
7482 <div class="memdoc" id="rpipba57f9aad0226ef168c3">
7484 <p id="rpip24315af77fad1dad222a">De-Initialise a <a class="el" href="structcritical__section.html" id="rpip68f2bcc195a442fa6aa7">critical_section</a> created by the critical_section_init method. </p>
7485 <p id="rpip0c3ac574cb5c3de0cc37">This method is only used to free the associated spin lock allocated via the critical_section_init method (it should not be used to de-initialize a spin lock created via critical_section_init_with_lock_num). After this call, the critical section is invalid</p>
7486 <h4 id="rpip6f9fca537eaec2f958e2" data-parent-id="rpipcbecde6f7f4a6176e7f4" data-target-for="rpip6f9fca537eaec2f958e2">Parameters</h4>
7487 <p class="paragraph" id="rpip8646739d675439d68f18" data-parent-id="rpipcbecde6f7f4a6176e7f4" data-target-for="rpip8646739d675439d68f18">
7489 <table class="params" id="rpip8f0d88c93c404c3af3af">
7490 <tr id="rpip6782a5c372e67d5deafd">
7491 <td class="paramname" id="rpipf6e36ef06066942f5572">crit_sec</td>
7492 <td id="rpip636bdd26d07a5ce4267c">Pointer to <a class="el" href="structcritical__section.html" id="rpip6e9d6935b4523a3a5eda">critical_section</a> structure </td>
7501 <a id="ga15e4552b4e1419faad51eba026a39aad" name="ga15e4552b4e1419faad51eba026a39aad"></a>
7504 <h5 id="rpip853cd780a1d1eedad086">
7505 <a class="anchor" href="#rpip853cd780a1d1eedad086"></a>◆ critical_section_enter_blocking()</h5>
7506 <div class="memitem" id="rpip23066a4e480cba1c8e40">
7507 <div class="memproto" id="rpipb65bf9c9dfd2341c30d8">
7508 <table class="mlabels" id="rpip15df77d84c97927f18b5">
7509 <tr id="rpip7905d22b17553a8a94e9">
7510 <td class="mlabels-left" id="rpip71eafeb4a76d0d8681ae">
7511 <table class="memname" id="rpipb1d219a793308639979d">
7512 <tr id="rpipcc2ae6ba51a23a56c485">
7513 <td class="memname" id="rpip036e395e5d22529f3f6e">static void critical_section_enter_blocking </td>
7514 <td id="rpip6cac7dba60ab761e7ecc">(</td>
7515 <td class="paramtype" id="rpip3c0f6698a099da997ed5">critical_section_t *Â </td>
7516 <td class="paramname" id="rpip3253b01fa5c9cf1fe931"><em id="rpipc64187e1d9d5e37b2a2f">crit_sec</em></td>
7517 <td id="rpip5e29f242edf8b6cbba9d">)</td>
7518 <td id="rpipe2100f61700054aa434d"></td>
7522 <td class="mlabels-right" id="rpip5ea56f22912670b4dc3e">
7523 <span class="mlabels" id="rpip0d9d00bec9d1593a2066"><span class="mlabel" id="rpip6061781e8885253afd92">inline</span><span class="mlabel" id="rpip7417a5fd583c3a73c3ee">static</span></span> </td>
7527 <div class="memdoc" id="rpip8245e0822ffa9e243090">
7529 <p id="rpip26a4d2f86ffa81625ee7">Enter a <a class="el" href="structcritical__section.html" id="rpipca20196c59bb9b40bc51">critical_section</a>. </p>
7530 <p id="rpip149e601985e074e316eb">If the spin lock associated with this critical section is in use, then this method will block until it is released.</p>
7531 <h4 id="rpip11c4bc7d0935d655ae29" data-parent-id="rpip11e581da6eebae46c1a7" data-target-for="rpip11c4bc7d0935d655ae29">Parameters</h4>
7532 <p class="paragraph" id="rpip5d28bb41383cef941c21" data-parent-id="rpip11e581da6eebae46c1a7" data-target-for="rpip5d28bb41383cef941c21">
7534 <table class="params" id="rpipc15c5db70507ee6bd606">
7535 <tr id="rpipc03292994c27fb458bd3">
7536 <td class="paramname" id="rpipcaf9b0798d1f5bc27af2">crit_sec</td>
7537 <td id="rpip31ea3e5e5a33acdba38f">Pointer to <a class="el" href="structcritical__section.html" id="rpipeb96f25f15b86e6954c6">critical_section</a> structure </td>
7546 <a id="gab57fcee3973b26dced4601e6018a227c" name="gab57fcee3973b26dced4601e6018a227c"></a>
7549 <h5 id="rpip64331b97238d120d40b0">
7550 <a class="anchor" href="#rpip64331b97238d120d40b0"></a>◆ critical_section_exit()</h5>
7551 <div class="memitem" id="rpip13c16ce0ede9cd9dbc82">
7552 <div class="memproto" id="rpip02fb5147b8000b44d79d">
7553 <table class="mlabels" id="rpipf3397fe90932e1540c08">
7554 <tr id="rpip4c676e388c0f4e2b7ba4">
7555 <td class="mlabels-left" id="rpipa62ed175633d4c70bc4b">
7556 <table class="memname" id="rpip2cb8fb491a300839ead3">
7557 <tr id="rpip51a3b6d0a905fbe07f2c">
7558 <td class="memname" id="rpip53e43412854cc60d5a9a">static void critical_section_exit </td>
7559 <td id="rpip608db071a74f094425e3">(</td>
7560 <td class="paramtype" id="rpip4a2a03cbe42058beb3f9">critical_section_t *Â </td>
7561 <td class="paramname" id="rpip375f3f1f72c4c26c5ddf"><em id="rpip9b6abf5c6b7671843da9">crit_sec</em></td>
7562 <td id="rpipb66bc6b732e998a0b2d8">)</td>
7563 <td id="rpipea1f23bd62ef58d0edd2"></td>
7567 <td class="mlabels-right" id="rpipac5159014740c6f88f01">
7568 <span class="mlabels" id="rpipd0b4010d26cf7b3c6e5a"><span class="mlabel" id="rpip5947451fa034596a6b33">inline</span><span class="mlabel" id="rpip140da85a6a22525722a9">static</span></span> </td>
7572 <div class="memdoc" id="rpip89979ff164e6f7fdff4f">
7574 <p id="rpip97742d057c5c27806358">Release a <a class="el" href="structcritical__section.html" id="rpip48d4960acde2a0205774">critical_section</a>. </p>
7575 <h4 id="rpip31b254a08c0fba880c4d" data-parent-id="rpip6cb5d7361221631b97d4" data-target-for="rpip31b254a08c0fba880c4d">Parameters</h4>
7576 <p class="paragraph" id="rpip7bad196b33f66fcb041b" data-parent-id="rpip6cb5d7361221631b97d4" data-target-for="rpip7bad196b33f66fcb041b">
7578 <table class="params" id="rpipd2bc9bd31686c683b006">
7579 <tr id="rpip2227e610ff686bfa5155">
7580 <td class="paramname" id="rpipc6b1838646ef8401bbb6">crit_sec</td>
7581 <td id="rpipd36b1ee0f9f5ddb4c542">Pointer to <a class="el" href="structcritical__section.html" id="rpip1f80d95828ce1a2e98bf">critical_section</a> structure </td>
7590 <a id="ga22cd2722a96179036820e87b29209cfd" name="ga22cd2722a96179036820e87b29209cfd"></a>
7593 <h5 id="rpip3956178f962366f96828">
7594 <a class="anchor" href="#rpip3956178f962366f96828"></a>◆ critical_section_init()</h5>
7595 <div class="memitem" id="rpipc5c21884d61be54933d8">
7596 <div class="memproto" id="rpip8199c121210927b8dc2b">
7597 <table class="memname" id="rpipdfd2fe4e90ddd73cf3ff">
7598 <tr id="rpipb1732efefba7c9f52fd0">
7599 <td class="memname" id="rpip79843c4ca8c3d343adec">void critical_section_init </td>
7600 <td id="rpip3f67f0cc0ec8fd79242b">(</td>
7601 <td class="paramtype" id="rpipd0bb894f2241fd53cba0">critical_section_t *Â </td>
7602 <td class="paramname" id="rpipfb9efdb43000bd622643"><em id="rpipa751ee585c4072855eda">crit_sec</em></td>
7603 <td id="rpip833c85b1389b9d679e9a">)</td>
7604 <td id="rpip98ce2193c429ffc4cc5a"></td>
7608 <div class="memdoc" id="rpip794dab4cb02cc56a4cb1">
7610 <p id="rpip53d4d86e5ecb877f10cc">Initialise a <a class="el" href="structcritical__section.html" id="rpip7d885cff326a1bf624df">critical_section</a> structure allowing the system to assign a spin lock number. </p>
7611 <p id="rpipc3211d9ab6ef9822d016">The critical section is initialized ready for use, and will use a (possibly shared) spin lock number assigned by the system. Note that in general it is unlikely that you would be nesting critical sections, however if you do so you <em id="rpip661a73fa9a15ec4670a7">must</em> use <a class="el" href="#gae1b4eb5dcab9ac679970ac43d618de2c" id="rpip8238ab7c148ace468bbf" data-adjusted="true">critical_section_init_with_lock_num</a> to ensure that the spin locks used are different.</p>
7612 <h4 id="rpipdf63a7efed99e84c23fd" data-parent-id="rpipbd3b53e696a7a3e4fe42" data-target-for="rpipdf63a7efed99e84c23fd">Parameters</h4>
7613 <p class="paragraph" id="rpip826c1e61f4042a9788c0" data-parent-id="rpipbd3b53e696a7a3e4fe42" data-target-for="rpip826c1e61f4042a9788c0">
7615 <table class="params" id="rpipf8fac6cd10d13cdb4d8e">
7616 <tr id="rpipc2a39afa71d3f59d854d">
7617 <td class="paramname" id="rpip159eb01ac86b46dfc53a">crit_sec</td>
7618 <td id="rpip016e3455461e65ed190b">Pointer to <a class="el" href="structcritical__section.html" id="rpip99f1774418c88118d2a3">critical_section</a> structure </td>
7627 <a id="gae1b4eb5dcab9ac679970ac43d618de2c" name="gae1b4eb5dcab9ac679970ac43d618de2c"></a>
7630 <h5 id="rpip9cf2bce8f3da7605668b">
7631 <a class="anchor" href="#rpip9cf2bce8f3da7605668b"></a>◆ critical_section_init_with_lock_num()</h5>
7632 <div class="memitem" id="rpipab18cfb0de1ed47b956d">
7633 <div class="memproto" id="rpip3e097c605e9047f4c22a">
7634 <table class="memname" id="rpipedd05ef4fff65b8b4c0d">
7635 <tr id="rpipbbf3830530ff35e62f3e">
7636 <td class="memname" id="rpip4c4711cd6dd5b38aec64">void critical_section_init_with_lock_num </td>
7637 <td id="rpipb79a79c51147ff30c5fb">(</td>
7638 <td class="paramtype" id="rpip1c9d8088be3189242448">critical_section_t *Â </td>
7639 <td class="paramname" id="rpipab27ede57a209dc8cdd1">
7640 <em id="rpip0268bab124bba8f12967">crit_sec</em>, </td>
7642 <tr id="rpip4415c5c49314b35bab71">
7643 <td class="paramkey" id="rpip9fc166ec7832ecc7b8db"></td>
7644 <td id="rpipcc97cf98cab62dccc351"></td>
7645 <td class="paramtype" id="rpipbb847fc1bd9deff83592">uint </td>
7646 <td class="paramname" id="rpip5a142d8b790e816dcf71">
7647 <em id="rpip5ec15bf0a2aea13a5695">lock_num</em>Â </td>
7649 <tr id="rpip7da426dab12a55360c1c">
7650 <td id="rpip6ffd38198e2e74850e38"></td>
7651 <td id="rpipfd197a1bea91c8464991">)</td>
7652 <td id="rpip19d92c4719e7b5cae5c9"></td>
7653 <td id="rpip09253791c098c9555aba"></td>
7657 <div class="memdoc" id="rpip9986011ce71b215085f0">
7659 <p id="rpip98513ceba316577c4124">Initialise a <a class="el" href="structcritical__section.html" id="rpipf396d0f7805b988334b1">critical_section</a> structure assigning a specific spin lock number. </p>
7660 <h4 id="rpip69fc7cd918015aa2958d" data-parent-id="rpipe6ee69ad7000552f6739" data-target-for="rpip69fc7cd918015aa2958d">Parameters</h4>
7661 <p class="paragraph" id="rpipc24f11a1f610004c9257" data-parent-id="rpipe6ee69ad7000552f6739" data-target-for="rpipc24f11a1f610004c9257">
7663 <table class="params" id="rpip7a79420761ad012e1bce">
7664 <tr id="rpip12525626d450a5f5ec17">
7665 <td class="paramname" id="rpip312113b5d2660f8cc32c">crit_sec</td>
7666 <td id="rpipac4202469a2906d90115">Pointer to <a class="el" href="structcritical__section.html" id="rpip01266ced371150d16771">critical_section</a> structure </td>
7668 <tr id="rpip9aee2efdc456ca1f09d6">
7669 <td class="paramname" id="rpip3e10b77cf75934a75c19">lock_num</td>
7670 <td id="rpip7edf9e537e46ffbd174b">the specific spin lock number to use </td>
7684 <a class="anchor" href="#lock_core"></a>lock_core</h3>
7685 <div class="ingroups" id="rpip4d1b06a09022f9b1333a">Part of: <a class="el" href="high_level.html" id="rpip1175f42b96470b77921f">High Level APIs</a> » <a class="el" href="high_level.html#pico_sync" id="rpip0faf64afc342d4b723c1">pico_sync</a>
7687 <p id="rpip16b56deb22e0c611c0d4">base synchronization/lock primitive support
7688 <a href="#gae2ef31d8c947aae00d66" id="rpip88973a05d987f6ed91cc" data-adjusted="true">More...</a></p>
7690 <h4 id="rpip10b48471f34ef90e4423">
7691 <a class="anchor" href="#rpip10b48471f34ef90e4423"></a>Files</h4>
7692 <ul class="memberdecls" id="rpipb80793d94489e573b658" data-parent-id="rpip2cabe76f8ccda8ca8b59"><li class="memitem">
7693 <p data-target="true" data-target-for="rpipb80793d94489e573b658"><span class="memItemLeft" data-target="true" id="rpip1227fae5de4d9175e5b4" data-parent-id="rpipb80793d94489e573b658" data-target-for="rpip1227fae5de4d9175e5b4">file  </span><span class="memItemRight" data-target="true" id="rpip0da21fc6c2c568c5e44a" data-parent-id="rpipb80793d94489e573b658" data-target-for="rpip0da21fc6c2c568c5e44a"><a class="el" href="lock__core_8h.html" id="rpipfab24f72ffbb570074e4">lock_core.h</a></span></p>
7697 <h4 id="rpip048866680e6289529297">
7698 <a class="anchor" href="#rpip048866680e6289529297"></a>Macros</h4>
7699 <ul class="memberdecls" id="rpip9c30744324762134ff20" data-parent-id="rpip9263da1a935d27e600cf">
7700 <li class="memitem">
7701 <p data-target="true" data-target-for="rpip9c30744324762134ff20"><span class="memItemLeft" data-target="true" id="rpip84be0f31361f9df2548c" data-parent-id="rpip9c30744324762134ff20" data-target-for="rpip84be0f31361f9df2548c"><a id="ga7e5b614312aabaada704b6a2350d39bc" name="ga7e5b614312aabaada704b6a2350d39bc"></a>
7702 #define </span><span class="memItemRight" data-target="true" id="rpipe19f1d355412c02bf411" data-parent-id="rpip9c30744324762134ff20" data-target-for="rpipe19f1d355412c02bf411"><b id="rpipfe81df3917ff483685fc">lock_owner_id_t</b>   int8_t</span></p>
7704 <li class="memdesc">
7705 <p data-target="true" data-target-for="rpip1642196a0b0ee0e5beb3"><span class="mdescLeft" data-target="true" id="rpip4d31cbcb05dcecfaa8fd" data-parent-id="rpip1642196a0b0ee0e5beb3" data-target-for="rpip4d31cbcb05dcecfaa8fd">Â </span><span class="mdescRight" data-target="true" id="rpipc816e578256cf7c808f6" data-parent-id="rpip1642196a0b0ee0e5beb3" data-target-for="rpipc816e578256cf7c808f6">type to use to store the 'owner' of a lock.By default this is int8_t as it only needs to store the core number or -1, however it may be overridden if a larger type is required (e.g. for an RTOS task id) <br id="rpip900e4b336190c8f0920b"></span></p>
7707 <li class="memitem">
7708 <p data-target="true" data-target-for="rpip73f66cfcea3bb9b1d865"><span class="memItemLeft" data-target="true" id="rpip9c5b6e55d1592b735337" data-parent-id="rpip73f66cfcea3bb9b1d865" data-target-for="rpip9c5b6e55d1592b735337"><a id="ga56aa223ceb22fdc4f0a3464fff119e14" name="ga56aa223ceb22fdc4f0a3464fff119e14"></a>
7709 #define </span><span class="memItemRight" data-target="true" id="rpip6b2170b7e2c5b50ad53c" data-parent-id="rpip73f66cfcea3bb9b1d865" data-target-for="rpip6b2170b7e2c5b50ad53c"><b id="rpipc328db0c094f8c23f70e">LOCK_INVALID_OWNER_ID</b>   ((<a class="el" href="#ga7e5b614312aabaada704b6a2350d39bc" id="rpip00aecd4cfaaece5bcf07" data-adjusted="true">lock_owner_id_t</a>)-1)</span></p>
7711 <li class="memdesc">
7712 <p data-target="true" data-target-for="rpip824213bfb95a1e209d63"><span class="mdescLeft" data-target="true" id="rpip4adb5f47f41fd348bc43" data-parent-id="rpip824213bfb95a1e209d63" data-target-for="rpip4adb5f47f41fd348bc43">Â </span><span class="mdescRight" data-target="true" id="rpip7811778328c8e8d51a0a" data-parent-id="rpip824213bfb95a1e209d63" data-target-for="rpip7811778328c8e8d51a0a">marker value to use for a lock_owner_id_t which does not refer to any valid owner <br id="rpip2c0d281d85d9f09caa93"></span></p>
7714 <li class="memitem">
7715 <p data-target="true" data-target-for="rpip55412770fa42851784d9"><span class="memItemLeft" data-target="true" id="rpipb04f6543e941ca3c18ee" data-parent-id="rpip55412770fa42851784d9" data-target-for="rpipb04f6543e941ca3c18ee"><a id="gae28f1d974cf1f1b973127500a764245c" name="gae28f1d974cf1f1b973127500a764245c"></a>
7716 #define </span><span class="memItemRight" data-target="true" id="rpip27829cc92a004360576e" data-parent-id="rpip55412770fa42851784d9" data-target-for="rpip27829cc92a004360576e"><b id="rpip0adc8c8dbf992fa54525">lock_get_caller_owner_id</b>()   ((<a class="el" href="#ga7e5b614312aabaada704b6a2350d39bc" id="rpipca6c190e2c26de4d9bbd" data-adjusted="true">lock_owner_id_t</a>)<a class="el" href="runtime.html#ga974b4945ae0ac8892717cb5f05e83c53" id="rpip304e8f61d81102426edd" data-adjusted="true">get_core_num</a>())</span></p>
7718 <li class="memdesc">
7719 <p data-target="true" data-target-for="rpipa52f4d122fef04f2484e"><span class="mdescLeft" data-target="true" id="rpip0ce95f9d7811dc12aba7" data-parent-id="rpipa52f4d122fef04f2484e" data-target-for="rpip0ce95f9d7811dc12aba7">Â </span><span class="mdescRight" data-target="true" id="rpip3f5fa7520da7ab155ab3" data-parent-id="rpipa52f4d122fef04f2484e" data-target-for="rpip3f5fa7520da7ab155ab3">return the owner id for the callerBy default this returns the calling core number, but may be overridden (e.g. to return an RTOS task id) <br id="rpipb4441cffe243d9a4a211"></span></p>
7721 <li class="memitem">
7722 <p data-target="true" data-target-for="rpipf819ef45c14c61176f55"><span class="memItemLeft" data-target="true" id="rpip33b829a5d09d6c78ff1e" data-parent-id="rpipf819ef45c14c61176f55" data-target-for="rpip33b829a5d09d6c78ff1e">#define </span><span class="memItemRight" data-target="true" id="rpip4bc02582d4f5f058a080" data-parent-id="rpipf819ef45c14c61176f55" data-target-for="rpip4bc02582d4f5f058a080"><a class="el" href="#gaaea64ba43b0ff683739ba136fe5a2b29" id="rpip550f5c7b98c3e18ec68b" data-adjusted="true">lock_internal_spin_unlock_with_wait</a>(lock, save)   <a class="el" href="hardware.html#ga281ce69786da23cab7ba6c42537d4e87" id="rpip5c6c41fe948837ae1083" data-adjusted="true">spin_unlock</a>((lock)->spin_lock, save), <a class="el" href="hardware.html#ga7799a0b9fc6444d463170266392f5fcd" id="rpipc1dc2ab49e8bc672a022" data-adjusted="true">__wfe</a>()</span></p>
7724 <li class="memdesc">
7725 <p data-target="true" data-target-for="rpip905d290591e8ff9b5d1f"><span class="mdescLeft" data-target="true" id="rpipe2e248bdcb9b56743478" data-parent-id="rpip905d290591e8ff9b5d1f" data-target-for="rpipe2e248bdcb9b56743478">Â </span><span class="mdescRight" data-target="true" id="rpip72ff3569e388f816addd" data-parent-id="rpip905d290591e8ff9b5d1f" data-target-for="rpip72ff3569e388f816addd">Atomically unlock the lock's spin lock, and wait for a notification. <br id="rpip0eca1562afe245cee276"></span></p>
7727 <li class="memitem">
7728 <p data-target="true" data-target-for="rpip8fc188c87761c4d921e6"><span class="memItemLeft" data-target="true" id="rpip66274c05521a8c97206c" data-parent-id="rpip8fc188c87761c4d921e6" data-target-for="rpip66274c05521a8c97206c">#define </span><span class="memItemRight" data-target="true" id="rpip6bec5e4aa3718a820401" data-parent-id="rpip8fc188c87761c4d921e6" data-target-for="rpip6bec5e4aa3718a820401"><a class="el" href="#ga298f38f465c9115393f0f35f56c13279" id="rpip8bdae7b4498d253baad1" data-adjusted="true">lock_internal_spin_unlock_with_notify</a>(lock, save)   <a class="el" href="hardware.html#ga281ce69786da23cab7ba6c42537d4e87" id="rpipeb17cf98ff49349386d4" data-adjusted="true">spin_unlock</a>((lock)->spin_lock, save), <a class="el" href="hardware.html#ga486eada32246494118f8273a80ae6856" id="rpip634576af4d8e0e6b1497" data-adjusted="true">__sev</a>()</span></p>
7730 <li class="memdesc">
7731 <p data-target="true" data-target-for="rpip350124756739d94c81c7"><span class="mdescLeft" data-target="true" id="rpip162d5cce9a7fec1d2eeb" data-parent-id="rpip350124756739d94c81c7" data-target-for="rpip162d5cce9a7fec1d2eeb">Â </span><span class="mdescRight" data-target="true" id="rpip64a90a8cecf13110c7fc" data-parent-id="rpip350124756739d94c81c7" data-target-for="rpip64a90a8cecf13110c7fc">Atomically unlock the lock's spin lock, and send a notification. <br id="rpip3a1996c9123b879d4a43"></span></p>
7733 <li class="memitem">
7734 <p data-target="true" data-target-for="rpipd2bc8ee57d70cbdea0c3"><span class="memItemLeft" data-target="true" id="rpipc39b891cabbdd41b030c" data-parent-id="rpipd2bc8ee57d70cbdea0c3" data-target-for="rpipc39b891cabbdd41b030c">#define </span><span class="memItemRight" data-target="true" id="rpip7078360ae52c0743ffbd" data-parent-id="rpipd2bc8ee57d70cbdea0c3" data-target-for="rpip7078360ae52c0743ffbd"><a class="el" href="#ga627a09221ed61634d6dfea6f406e104e" id="rpipfa90311084d3d7c1f51d" data-adjusted="true">lock_internal_spin_unlock_with_best_effort_wait_or_timeout</a>(lock, save, until)</span></p>
7736 <li class="memdesc">
7737 <p data-target="true" data-target-for="rpip87b15a0d9133b612a251"><span class="mdescLeft" data-target="true" id="rpipd77f49fb4c1a8abf76cf" data-parent-id="rpip87b15a0d9133b612a251" data-target-for="rpipd77f49fb4c1a8abf76cf">Â </span><span class="mdescRight" data-target="true" id="rpipd2c72def3581765baf41" data-parent-id="rpip87b15a0d9133b612a251" data-target-for="rpipd2c72def3581765baf41">Atomically unlock the lock's spin lock, and wait for a notification or a timeout. <br id="rpipe3e39709dbbd45166206"></span></p>
7739 <li class="memitem">
7740 <p data-target="true" data-target-for="rpip7fa1ed5eb4941f94585f"><span class="memItemLeft" data-target="true" id="rpip42707c0c6e7b5603443e" data-parent-id="rpip7fa1ed5eb4941f94585f" data-target-for="rpip42707c0c6e7b5603443e">#define </span><span class="memItemRight" data-target="true" id="rpip111f776d7c40823035fe" data-parent-id="rpip7fa1ed5eb4941f94585f" data-target-for="rpip111f776d7c40823035fe"><a class="el" href="#ga133eb482d67637b8b4e947dee5133513" id="rpipeed2712b606a8d6525da" data-adjusted="true">sync_internal_yield_until_before</a>(until)   ((void)0)</span></p>
7742 <li class="memdesc">
7743 <p data-target="true" data-target-for="rpip372577fcad4288776af2"><span class="mdescLeft" data-target="true" id="rpipb5abfe21e68db11bf1a5" data-parent-id="rpip372577fcad4288776af2" data-target-for="rpipb5abfe21e68db11bf1a5">Â </span><span class="mdescRight" data-target="true" id="rpipbbb1710c79b2036afbdf" data-parent-id="rpip372577fcad4288776af2" data-target-for="rpipbbb1710c79b2036afbdf">yield to other processing until some time before the requested time <br id="rpip91233a61209737fe0448"></span></p>
7748 <h4 id="rpip36381b2ba9d910aa2b91">
7749 <a class="anchor" href="#rpip36381b2ba9d910aa2b91"></a>Functions</h4>
7750 <ul class="memberdecls" id="rpip7a8becc6c258b00b3b70" data-parent-id="rpip5e1afd1605f417d13e5f">
7751 <li class="memitem">
7752 <p data-target="true" data-target-for="rpip7a8becc6c258b00b3b70"><span class="memItemLeft" data-target="true" id="rpipc218e6489e5db1b3e725" data-parent-id="rpip7a8becc6c258b00b3b70" data-target-for="rpipc218e6489e5db1b3e725">void </span><span class="memItemRight" data-target="true" id="rpip7afe704832c0ee60006a" data-parent-id="rpip7a8becc6c258b00b3b70" data-target-for="rpip7afe704832c0ee60006a"><a class="el" href="#gabc062dfb52c8f7f17ec8427d1c4414d9" id="rpip26a1886efdbd34ec4d4d" data-adjusted="true">lock_init</a> (<a class="el" href="structlock__core.html" id="rpip8bb3af4d92238906739d">lock_core_t</a> *core, uint lock_num)</span></p>
7754 <li class="memdesc">
7755 <p data-target="true" data-target-for="rpip3427202d81128de02c5b"><span class="mdescLeft" data-target="true" id="rpipcb74bc8457d82a13d48a" data-parent-id="rpip3427202d81128de02c5b" data-target-for="rpipcb74bc8457d82a13d48a">Â </span><span class="mdescRight" data-target="true" id="rpip264a5422277877c26302" data-parent-id="rpip3427202d81128de02c5b" data-target-for="rpip264a5422277877c26302">Initialise a lock structure. <br id="rpipd16a53a32558bb64da20"></span></p>
7758 <a name="details" id="gae2ef31d8c947aae00d66"></a>
7761 <h4 id="rpip3ae8af7a4662882d5ded">
7762 <a class="anchor" href="#rpip3ae8af7a4662882d5ded"></a>Detailed Description</h4>
7763 <p id="rpip1f011d911235df2ff1a5">base synchronization/lock primitive support </p>
7764 <p id="rpip8ae5e0c98dc01e2a13ff">Most of the pico_sync locking primitives contain a lock_core_t structure member. This currently just holds a spin lock which is used only to protect the contents of the rest of the structure as part of implementing the synchronization primitive. As such, the spin_lock member of lock core is never still held on return from any function for the primitive.</p>
7765 <p id="rpip4820caa2c9a533932d01"><a class="el" href="high_level.html#critical_section" id="rpipa5a92736ed3d9b58ec5b">critical_section</a> is an exceptional case in that it does not have a lock_core_t and simply wraps a spin lock, providing methods to lock and unlock said spin lock.</p>
7766 <p id="rpip9f48a7a8a562c703ab73"><a class="el" href="structlock__core.html" id="rpip1058cc7e6c230b90a4d9">lock_core</a> based structures work by locking the spin lock, checking state, and then deciding whether they additionally need to block or notify when the spin lock is released. In the blocking case, they will wake up again in the future, and try the process again.</p>
7767 <p id="rpipdde9f040ce2bc57b7fe7">By default the SDK just uses the processors' events via SEV and WEV for notification and blocking as these are sufficient for cross core, and notification from interrupt handlers. However macros are defined in this file that abstract the wait and notify mechanisms to allow the SDK locking functions to effectively be used within an RTOS or other environment.</p>
7768 <p id="rpipcc56961d1722d93a9be6">When implementing an RTOS, it is desirable for the SDK synchronization primitives that wait, to block the calling task (and immediately yield), and those that notify, to wake a blocked task which isn't on processor. At least the wait macro implementation needs to be atomic with the protecting spin_lock unlock from the callers point of view; i.e. the task should unlock the spin lock when it starts its wait. Such implementation is up to the RTOS integration, however the macros are defined such that such operations are always combined into a single call (so they can be perfomed atomically) even though the default implementation does not need this, as a WFE which starts following the corresponding SEV is not missed. </p>
7771 <h4 id="rpipdc865d1c80d127e9ced8">
7772 <a class="anchor" href="#rpipdc865d1c80d127e9ced8"></a>Macro Definition Documentation</h4>
7773 <a id="ga627a09221ed61634d6dfea6f406e104e" name="ga627a09221ed61634d6dfea6f406e104e"></a>
7775 <h5 id="rpip5743a5166b46761e1f81">
7776 <a class="anchor" href="#rpip5743a5166b46761e1f81"></a>◆ lock_internal_spin_unlock_with_best_effort_wait_or_timeout</h5>
7777 <div class="memitem" id="rpipbd7e781d9948762114ca">
7778 <div class="memproto" id="rpip64e35cd613d48551ac23">
7779 <table class="memname" id="rpipe6af3a688e3a2f579aa1">
7780 <tr id="rpipe7fcd4f7e0d13d28c6e8">
7781 <td class="memname" id="rpipd5c0d57924917cea5a2c">#define lock_internal_spin_unlock_with_best_effort_wait_or_timeout</td>
7782 <td id="rpip65fa78c7231d1a5867ff">(</td>
7783 <td class="paramtype" id="rpip8cf01c7940ec3b73b028">Â </td>
7784 <td class="paramname" id="rpip1e143836eabf19c3cb4a">lock, </td>
7786 <tr id="rpipa898dddf8f3d23f7a71f">
7787 <td class="paramkey" id="rpip86348b4db976d54026b8"></td>
7788 <td id="rpipa7158f14d780b223f036"></td>
7789 <td class="paramtype" id="rpipb7ff7f778875021f7def">Â </td>
7790 <td class="paramname" id="rpip4031033225d2afa1b7ed">save, </td>
7792 <tr id="rpip7b7cb5fafaa7623fece7">
7793 <td class="paramkey" id="rpip421abf56ba4b04a6ae3b"></td>
7794 <td id="rpip90b6deb5d4176048cc19"></td>
7795 <td class="paramtype" id="rpipd42e8f5946e90501e764">Â </td>
7796 <td class="paramname" id="rpip42813a1090e075e99d3d">until </td>
7798 <tr id="rpipf85ff4d36f700683d6cd">
7799 <td id="rpip3be1370715fab928ea9e"></td>
7800 <td id="rpip841c52dbd605a4e5a2a7">)</td>
7801 <td id="rpip520a74cc3c14e29c34de"></td>
7802 <td id="rpipd12a44e6812e07e292cb"></td>
7806 <div class="memdoc" id="rpipee0b046b8cd22571d848">
7807 <b id="rpip1d0e12d0db61792c1b3b">Value:</b><div class="listingblock" id="rpip237da38b09aa592ebd6e" data-parent-id="rpipee0b046b8cd22571d848">
7808 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
7809 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
7810 </div></button><div class="content" data-target="true" data-target-for="rpip237da38b09aa592ebd6e">
7811 <div class="line" id="rpipd4a0e61c7344e7e198d0"> ({ \</div>
7812 <div class="line" id="rpip0a4dc38ad288b87825d0"> spin_unlock((lock)->spin_lock, save); \</div>
7813 <div class="line" id="rpipcf0820d4d08519bad394"> best_effort_wfe_or_timeout(until); \</div>
7814 <div class="line" id="rpipe81c441833286e290abb">})</div>
7818 <p id="rpip35a9cbaef05e9e026abe">Atomically unlock the lock's spin lock, and wait for a notification or a timeout. </p>
7819 <p id="rpip146bda5b35153569b77b"><em id="rpipa6641f444bfe89f1c463">Atomic</em> here refers to the fact that it should not be possible for a concurrent lock_internal_spin_unlock_with_notify to insert itself between the spin unlock and this wait in a way that the wait does not see the notification (i.e. causing a missed notification). In other words this method should always wake up in response to a lock_internal_spin_unlock_with_notify for the same lock, which completes after this call starts.</p>
7820 <p id="rpipb54a47af5c05d395844c">In an ideal implementation, this method would return exactly after the corresponding lock_internal_spin_unlock_with_notify has subsequently been called on the same lock instance or the timeout has been reached, however this method is free to return at <em id="rpip27f91bee6cd0b919d8b5">any</em> point before that; this macro is <em id="rpipd50dbfd713a58fb4a001">always</em> used in a loop which locks the spin lock, checks the internal locking primitive state and then waits again if the calling thread should not proceed.</p>
7821 <p id="rpip5da5aeb5595ae6ca0ddc">By default this simply unlocks the spin lock, and then calls <a class="el" href="high_level.html#gaedc0ed51a5e908ddd660a5d279009abc" id="rpipafd7404c2a9bbbf0065b" data-adjusted="true">best_effort_wfe_or_timeout</a> but may be overridden (e.g. to actually block the RTOS task with a timeout).</p>
7822 <h4 id="rpip5da20f4e0072f80ab4c7" data-parent-id="rpip28f5dcf528c0df250216" data-target-for="rpip5da20f4e0072f80ab4c7">Parameters</h4>
7823 <p class="paragraph" id="rpipa5c47826ecdf4a3c8a9d" data-parent-id="rpip28f5dcf528c0df250216" data-target-for="rpipa5c47826ecdf4a3c8a9d">
7825 <table class="params" id="rpip9aa73b46f257bd75049d">
7826 <tr id="rpip7d86e82dabcc5881073f">
7827 <td class="paramname" id="rpipb363ca5a3ea91ba9c014">lock</td>
7828 <td id="rpip74e23ae2950056287929">the <a class="el" href="structlock__core.html" id="rpip05a73b3707623ddb4e4d">lock_core</a> for the primitive which needs to block </td>
7830 <tr id="rpipef647e468ba29a72db0b">
7831 <td class="paramname" id="rpip1d9a0b4474e42ec004c1">save</td>
7832 <td id="rpip14309e83f36a1704ebea">the uint32_t value that should be passed to spin_unlock when the spin lock is unlocked. (i.e. the PRIMASK state when the spin lock was acquire) </td>
7834 <tr id="rpip7ce2b7833d3eef34563d">
7835 <td class="paramname" id="rpip1230637d38c913834db4">until</td>
7836 <td id="rpipea2b1b664636c2f476e5">the <a class="el" href="structabsolute__time__t.html" id="rpipfa775beccbde7de0364d">absolute_time_t</a> value </td>
7842 <h4 class="label" id="rpip360c7aeedf0485ba8211" data-parent-id="rpip0f196ee4a8dcf0cf40c9" data-target-for="rpip360c7aeedf0485ba8211">Returns</h4>
7843 <p class="returns" id="rpipda1131279cd4ce12f731" data-parent-id="rpip0f196ee4a8dcf0cf40c9" data-target-for="rpipda1131279cd4ce12f731">true if the timeout has been reached </p>
7847 <a id="ga298f38f465c9115393f0f35f56c13279" name="ga298f38f465c9115393f0f35f56c13279"></a>
7850 <h5 id="rpipdc0a41e341535605f747">
7851 <a class="anchor" href="#rpipdc0a41e341535605f747"></a>◆ lock_internal_spin_unlock_with_notify</h5>
7852 <div class="memitem" id="rpip4098a53811b29a8a14f1">
7853 <div class="memproto" id="rpip5a3d035fa51f98efa0e1">
7854 <table class="memname" id="rpipd7789c877d6164bc7e56">
7855 <tr id="rpip5b66a4253ce172c206b8">
7856 <td class="memname" id="rpip111e8b9044aed032f882">#define lock_internal_spin_unlock_with_notify</td>
7857 <td id="rpipd11d126012a1a4d48b15">(</td>
7858 <td class="paramtype" id="rpip34d53c1b30c24a9fb9f9">Â </td>
7859 <td class="paramname" id="rpip12ce8c76875cd2fc23b0">lock, </td>
7861 <tr id="rpip34fa3cb48ea1c24fccc7">
7862 <td class="paramkey" id="rpipa989dd2faed3b6842aac"></td>
7863 <td id="rpip451d5f19d8b1e1d00350"></td>
7864 <td class="paramtype" id="rpipaa0bbf33e030305a8924">Â </td>
7865 <td class="paramname" id="rpipd08daa80f15d60cc0c6d">save </td>
7867 <tr id="rpip8eda6f400e6aff1ccb3b">
7868 <td id="rpip1feda02d1716925b21db"></td>
7869 <td id="rpip997512df4f5b908b72b3">)</td>
7870 <td id="rpip145709d67608c8e3256f"></td>
7871 <td id="rpip3eaef44885a740f76021">Â Â Â <a class="el" href="hardware.html#ga281ce69786da23cab7ba6c42537d4e87" id="rpip68a689e0f0592c246845" data-adjusted="true">spin_unlock</a>((lock)->spin_lock, save), <a class="el" href="hardware.html#ga486eada32246494118f8273a80ae6856" id="rpipe53bfcaf2d9c4d3ed8d5" data-adjusted="true">__sev</a>()</td>
7875 <div class="memdoc" id="rpip1966c56377958b6ff6eb">
7877 <p id="rpip033b62e9f28493da365a">Atomically unlock the lock's spin lock, and send a notification. </p>
7878 <p id="rpip2ea094ca450698f48148"><em id="rpipd43d66d3d063e6dd56a5">Atomic</em> here refers to the fact that it should not be possible for this notification to happen during a lock_internal_spin_unlock_with_wait in a way that that wait does not see the notification (i.e. causing a missed notification). In other words this method should always wake up any lock_internal_spin_unlock_with_wait which started before this call completes.</p>
7879 <p id="rpip55c0d5e319250bc9756a">In an ideal implementation, this method would wake up only the corresponding lock_internal_spin_unlock_with_wait that has been called on the same lock instance, however it is free to wake up any of them, as they will check their condition and then re-wait if necessary/</p>
7880 <p id="rpip7d999d2de7190a74379b">By default this macro simply unlocks the spin lock, and then performs a SEV, but may be overridden (e.g. to actually un-block RTOS task(s)).</p>
7881 <h4 id="rpipa02fea35828ed93b8d9c" data-parent-id="rpipae9611f5f53aad2fc22d" data-target-for="rpipa02fea35828ed93b8d9c">Parameters</h4>
7882 <p class="paragraph" id="rpip845df21625898dbc0af7" data-parent-id="rpipae9611f5f53aad2fc22d" data-target-for="rpip845df21625898dbc0af7">
7884 <table class="params" id="rpip6dba12af92424957a1df">
7885 <tr id="rpipbf31d54ae427e41a46e6">
7886 <td class="paramname" id="rpip86d795d6fe73f789498c">lock</td>
7887 <td id="rpipb7322d357a155338a345">the <a class="el" href="structlock__core.html" id="rpipcc364788913a5de8d236">lock_core</a> for the primitive which needs to block </td>
7889 <tr id="rpipcdf47873650a6d8badf4">
7890 <td class="paramname" id="rpip7977ea28bdac9dfc6a88">save</td>
7891 <td id="rpip4b23d05caebb59af2888">the uint32_t value that should be passed to spin_unlock when the spin lock is unlocked. (i.e. the PRIMASK state when the spin lock was acquire) </td>
7900 <a id="gaaea64ba43b0ff683739ba136fe5a2b29" name="gaaea64ba43b0ff683739ba136fe5a2b29"></a>
7903 <h5 id="rpip3f4fa242af7a1e6be139">
7904 <a class="anchor" href="#rpip3f4fa242af7a1e6be139"></a>◆ lock_internal_spin_unlock_with_wait</h5>
7905 <div class="memitem" id="rpip2cd2a44bb90c93955d97">
7906 <div class="memproto" id="rpip2d3d667c2b729158f598">
7907 <table class="memname" id="rpip1310890cf3b09ab5a0d6">
7908 <tr id="rpipd655161f04b4e1309cd4">
7909 <td class="memname" id="rpip53809ea0e2b2cde26528">#define lock_internal_spin_unlock_with_wait</td>
7910 <td id="rpip2ce72b5d5a7bc1781a54">(</td>
7911 <td class="paramtype" id="rpipbc644b6012d92b10287d">Â </td>
7912 <td class="paramname" id="rpip9ae8bea68382cb932617">lock, </td>
7914 <tr id="rpipe619822a8738db980cbd">
7915 <td class="paramkey" id="rpip93963e2e86b51baee48a"></td>
7916 <td id="rpip84b5365dee0ba8381e45"></td>
7917 <td class="paramtype" id="rpipae7d482a76c6d92e23bf">Â </td>
7918 <td class="paramname" id="rpip750fc5597df1500e5d54">save </td>
7920 <tr id="rpip2577123b0cfbc6eebd65">
7921 <td id="rpip2fe6cff98a27883fd929"></td>
7922 <td id="rpipae054ba513a2ae9b9e25">)</td>
7923 <td id="rpip95e636d9d6942d4445ec"></td>
7924 <td id="rpip86b87eefd165fa90bb56">Â Â Â <a class="el" href="hardware.html#ga281ce69786da23cab7ba6c42537d4e87" id="rpip3f2e160581917b538ac8" data-adjusted="true">spin_unlock</a>((lock)->spin_lock, save), <a class="el" href="hardware.html#ga7799a0b9fc6444d463170266392f5fcd" id="rpip37215508af66c7e11914" data-adjusted="true">__wfe</a>()</td>
7928 <div class="memdoc" id="rpipa7af231e526473af7d50">
7930 <p id="rpip59726c96e9e40215dd4a">Atomically unlock the lock's spin lock, and wait for a notification. </p>
7931 <p id="rpipf1d221358166eb806f08"><em id="rpip7505d8aabc4bccf049e7">Atomic</em> here refers to the fact that it should not be possible for a concurrent lock_internal_spin_unlock_with_notify to insert itself between the spin unlock and this wait in a way that the wait does not see the notification (i.e. causing a missed notification). In other words this method should always wake up in response to a lock_internal_spin_unlock_with_notify for the same lock, which completes after this call starts.</p>
7932 <p id="rpipd7e4322ae38ca2126aa3">In an ideal implementation, this method would return exactly after the corresponding lock_internal_spin_unlock_with_notify has subsequently been called on the same lock instance, however this method is free to return at <em id="rpipd4407e097112d339360f">any</em> point before that; this macro is <em id="rpip7ce54b16b97b98aa91f8">always</em> used in a loop which locks the spin lock, checks the internal locking primitive state and then waits again if the calling thread should not proceed.</p>
7933 <p id="rpip239d76b651b1817364c1">By default this macro simply unlocks the spin lock, and then performs a WFE, but may be overridden (e.g. to actually block the RTOS task).</p>
7934 <h4 id="rpip654c2acc7313b29ff758" data-parent-id="rpipcd65481c8934e0e549f3" data-target-for="rpip654c2acc7313b29ff758">Parameters</h4>
7935 <p class="paragraph" id="rpipf18865899fc974f0dba6" data-parent-id="rpipcd65481c8934e0e549f3" data-target-for="rpipf18865899fc974f0dba6">
7937 <table class="params" id="rpipa9d34257b39901338d65">
7938 <tr id="rpip04f5aa9d74c8fdc61521">
7939 <td class="paramname" id="rpipc1197157113ed0da0bc5">lock</td>
7940 <td id="rpipfa0c3766bcc64705dfd1">the <a class="el" href="structlock__core.html" id="rpip00eeb1dc00205fe8cf48">lock_core</a> for the primitive which needs to block </td>
7942 <tr id="rpip0a4466e23f653d7fe9cb">
7943 <td class="paramname" id="rpipcfdabadd953b3432da96">save</td>
7944 <td id="rpip2fc0665ff950a9f3be0e">the uint32_t value that should be passed to spin_unlock when the spin lock is unlocked. (i.e. the <code id="rpipd2dcd4dc0d030252cdff">PRIMASK</code> state when the spin lock was acquire </td>
7953 <a id="ga133eb482d67637b8b4e947dee5133513" name="ga133eb482d67637b8b4e947dee5133513"></a>
7956 <h5 id="rpip8eeae0d1eadf055d2595">
7957 <a class="anchor" href="#rpip8eeae0d1eadf055d2595"></a>◆ sync_internal_yield_until_before</h5>
7958 <div class="memitem" id="rpip65f5dbbd0a8268fd274a">
7959 <div class="memproto" id="rpip8764cc0c138c64b8d143">
7960 <table class="memname" id="rpip493c1fa8487b1d031a81">
7961 <tr id="rpip18116e51e353dab50f67">
7962 <td class="memname" id="rpipd923cd7238cee8d32d22">#define sync_internal_yield_until_before</td>
7963 <td id="rpip0d7621129ac35b215b18">(</td>
7964 <td class="paramtype" id="rpip66826bbcf6cf5852eeee">Â </td>
7965 <td class="paramname" id="rpip0a7807684fdd6263efd6">until</td>
7966 <td id="rpipaec6dd8619186aa51f68">)</td>
7967 <td id="rpipb83194d8e81fb8761ac5">Â Â Â ((void)0)</td>
7971 <div class="memdoc" id="rpip9b441c8f90f1706a622c">
7973 <p id="rpipb3c7eb154b7241372132">yield to other processing until some time before the requested time </p>
7974 <p id="rpip0f6785c9d66bde9dfef7">This method is provided for cases where the caller has no useful work to do until the specified time.</p>
7975 <p id="rpip3cd2c7d586d0febd4f6d">By default this method does nothing, however it can be overridden (for example by an RTOS which is able to block the current task until the scheduler tick before the given time)</p>
7976 <h4 id="rpip5dae4bfc559417593f88" data-parent-id="rpip633bf1e3ea31263999f3" data-target-for="rpip5dae4bfc559417593f88">Parameters</h4>
7977 <p class="paragraph" id="rpip64aa502a9c261e6004af" data-parent-id="rpip633bf1e3ea31263999f3" data-target-for="rpip64aa502a9c261e6004af">
7979 <table class="params" id="rpip821d29e20183e34f3f04">
7980 <tr id="rpip04c5cb7bad375c3efae3">
7981 <td class="paramname" id="rpipc3ce627598e255b8ce73">until</td>
7982 <td id="rpip317c75da4dacaba33935">the <a class="el" href="structabsolute__time__t.html" id="rpipd453e9b46755f19ac7ca">absolute_time_t</a> value </td>
7994 <h4 id="rpip3ccfd12327a67e9d04b8">
7995 <a class="anchor" href="#rpip3ccfd12327a67e9d04b8"></a>Function Documentation</h4>
7996 <a id="gabc062dfb52c8f7f17ec8427d1c4414d9" name="gabc062dfb52c8f7f17ec8427d1c4414d9"></a>
7998 <h5 id="rpipe5bd6a5230b7d3d71adc">
7999 <a class="anchor" href="#rpipe5bd6a5230b7d3d71adc"></a>◆ lock_init()</h5>
8000 <div class="memitem" id="rpipcaf3200d102fe2e1477e">
8001 <div class="memproto" id="rpipbd636a850d5105df6009">
8002 <table class="memname" id="rpipdec45bb7b8827ad35a38">
8003 <tr id="rpip4d50f6fe90d2a7597f45">
8004 <td class="memname" id="rpipfb404d8dcc20925da6ed">void lock_init </td>
8005 <td id="rpip90d3c6655ca74a20ca84">(</td>
8006 <td class="paramtype" id="rpipf056938942bd962a45c7">
8007 <a class="el" href="structlock__core.html" id="rpipa2c536331cc471204c1a">lock_core_t</a> *Â </td>
8008 <td class="paramname" id="rpipc00644fdeea35d91c212">
8009 <em id="rpip608d469b275170082e82">core</em>, </td>
8011 <tr id="rpip0af9d3358329eee878ee">
8012 <td class="paramkey" id="rpip80da29175dee2268e5ac"></td>
8013 <td id="rpip0a3d65e30bff8cd3de80"></td>
8014 <td class="paramtype" id="rpip6e4204423b377d7988af">uint </td>
8015 <td class="paramname" id="rpip3c404652e5c5a6deb68f">
8016 <em id="rpip36c99d81d16f9495abe9">lock_num</em>Â </td>
8018 <tr id="rpipb63a5801113288effbe3">
8019 <td id="rpip745f50c3fc725a2a36d6"></td>
8020 <td id="rpip37b6e438a8b5807a2a58">)</td>
8021 <td id="rpip8d8cf01f63431ea2c667"></td>
8022 <td id="rpip6f99c3d6433b62b2f748"></td>
8026 <div class="memdoc" id="rpip144f441e5ae037260ece">
8028 <p id="rpip9e9a8d9621755aeeb05b">Initialise a lock structure. </p>
8029 <p id="rpipefeaf9d0a2981536a323">Inititalize a lock structure, providing the spin lock number to use for protecting internal state.</p>
8030 <h4 id="rpipe65eb02b81687082dbf8" data-parent-id="rpip0d01211ad7ec5b536cac" data-target-for="rpipe65eb02b81687082dbf8">Parameters</h4>
8031 <p class="paragraph" id="rpip362aff0a04af998f3c7d" data-parent-id="rpip0d01211ad7ec5b536cac" data-target-for="rpip362aff0a04af998f3c7d">
8033 <table class="params" id="rpipdae90ad8405e896b8352">
8034 <tr id="rpip68412d1f1598952d0038">
8035 <td class="paramname" id="rpip31f5039f213d87280ee9">core</td>
8036 <td id="rpipaa1e2f4af3f94907f933">Pointer to the <a class="el" href="structlock__core.html" id="rpipadce15f8334ed17bb1fe">lock_core</a> to initialize </td>
8038 <tr id="rpip92c576ab19a67a517c0a">
8039 <td class="paramname" id="rpipfe4e079ddb0035d3684e">lock_num</td>
8040 <td id="rpip96b9d6880547e8808fda">Spin lock number to use for the lock. As the spin lock is only used internally to the locking primitive method implementations, this does not need to be globally unique, however could suffer contention </td>
8054 <a class="anchor" href="#mutex"></a>mutex</h3>
8055 <div class="ingroups" id="rpip3df3e85064fff6e6dd46">Part of: <a class="el" href="high_level.html" id="rpip51678606885ed7585414">High Level APIs</a> » <a class="el" href="high_level.html#pico_sync" id="rpip29561ca33d21bf29eee0">pico_sync</a>
8057 <p id="rpipf46ed87b846be49fbc5b">Mutex API for non IRQ mutual exclusion between cores.
8058 <a href="#ga9fb36598239cbc9bcf21" id="rpip79862f4dfeb2837006ce" data-adjusted="true">More...</a></p>
8060 <h4 id="rpip8cc8cb3500a710bbfc4b">
8061 <a class="anchor" href="#rpip8cc8cb3500a710bbfc4b"></a>Data Structures</h4>
8062 <ul class="memberdecls" id="rpipa05deaa63e6a94232d02" data-parent-id="rpip3d2e7e8c02abe2a55dc6">
8063 <li class="memitem">
8064 <p data-target="true" data-target-for="rpipa05deaa63e6a94232d02"><span class="memItemLeft" data-target="true" id="rpip9079f71d854de8a9c9e4" data-parent-id="rpipa05deaa63e6a94232d02" data-target-for="rpip9079f71d854de8a9c9e4">struct  </span><span class="memItemRight" data-target="true" id="rpip447dd8d05d48c46da674" data-parent-id="rpipa05deaa63e6a94232d02" data-target-for="rpip447dd8d05d48c46da674"><a class="el" href="struct____packed__aligned.html" id="rpip40e4821421239393d528">__packed_aligned</a></span></p>
8066 <li class="memdesc">
8067 <p data-target="true" data-target-for="rpip0ff703e3c37a99d5375e"><span class="mdescLeft" data-target="true" id="rpip7871d84dda0721d2194f" data-parent-id="rpip0ff703e3c37a99d5375e" data-target-for="rpip7871d84dda0721d2194f">Â </span><span class="mdescRight" data-target="true" id="rpip6ef60d9991e37f7c1648" data-parent-id="rpip0ff703e3c37a99d5375e" data-target-for="rpip6ef60d9991e37f7c1648">recursive mutex instance <a href="struct____packed__aligned.html#details" id="rpipe2452844a70d0569bd57" data-adjusted="true">More...</a><br id="rpip032a625751718f616915"></span></p>
8069 <li class="memitem">
8070 <p data-target="true" data-target-for="rpip3f1c13d29a861b235345"><span class="memItemLeft" data-target="true" id="rpip04bb465911160afe5d08" data-parent-id="rpip3f1c13d29a861b235345" data-target-for="rpip04bb465911160afe5d08">struct  </span><span class="memItemRight" data-target="true" id="rpip38095e524a9481de1dd7" data-parent-id="rpip3f1c13d29a861b235345" data-target-for="rpip38095e524a9481de1dd7"><a class="el" href="structmutex.html" id="rpipdb198d9175f1f5d5b930">mutex</a></span></p>
8072 <li class="memdesc">
8073 <p data-target="true" data-target-for="rpip37f27d07f4fae2471b22"><span class="mdescLeft" data-target="true" id="rpip4b1fa8621e0a773de4bf" data-parent-id="rpip37f27d07f4fae2471b22" data-target-for="rpip4b1fa8621e0a773de4bf">Â </span><span class="mdescRight" data-target="true" id="rpipc6534d02ad71021c6b98" data-parent-id="rpip37f27d07f4fae2471b22" data-target-for="rpipc6534d02ad71021c6b98">regular (non recursive) mutex instance <a href="structmutex.html#details" id="rpipfe4d3f525c6638f629d8" data-adjusted="true">More...</a><br id="rpip5235b4a0cad5a8adaa6e"></span></p>
8078 <h4 id="rpip68d95ebc3676d95fcc49">
8079 <a class="anchor" href="#rpip68d95ebc3676d95fcc49"></a>Macros</h4>
8080 <ul class="memberdecls" id="rpip8ac80d8a7a2184921107" data-parent-id="rpipc90635e62ded61004deb">
8081 <li class="memitem">
8082 <p data-target="true" data-target-for="rpip8ac80d8a7a2184921107"><span class="memItemLeft" data-target="true" id="rpipedf12e855d1ce24676ff" data-parent-id="rpip8ac80d8a7a2184921107" data-target-for="rpipedf12e855d1ce24676ff">#define </span><span class="memItemRight" data-target="true" id="rpipdb07032120aa6f855473" data-parent-id="rpip8ac80d8a7a2184921107" data-target-for="rpipdb07032120aa6f855473"><a class="el" href="#gaa1b5d9dea897013fc5e40bf102045592" id="rpip6dea81704e2afffb4f30" data-adjusted="true">auto_init_mutex</a>(name)   static __attribute__((section(".mutex_array"))) <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipf56c65537d52df2f0623" data-adjusted="true">mutex_t</a> name</span></p>
8084 <li class="memdesc">
8085 <p data-target="true" data-target-for="rpip94146831cc7861462497"><span class="mdescLeft" data-target="true" id="rpipec4ce071c0b954443ae3" data-parent-id="rpip94146831cc7861462497" data-target-for="rpipec4ce071c0b954443ae3">Â </span><span class="mdescRight" data-target="true" id="rpip88bfebc36d50ace8451b" data-parent-id="rpip94146831cc7861462497" data-target-for="rpip88bfebc36d50ace8451b">Helper macro for static definition of mutexes. <br id="rpip1f3cb83014f683c34ed7"></span></p>
8087 <li class="memitem">
8088 <p data-target="true" data-target-for="rpipb44f5f612deb5e8d8b8e"><span class="memItemLeft" data-target="true" id="rpip7cf17b396d6d6940d4af" data-parent-id="rpipb44f5f612deb5e8d8b8e" data-target-for="rpip7cf17b396d6d6940d4af">#define </span><span class="memItemRight" data-target="true" id="rpip8917c94c029ae541e361" data-parent-id="rpipb44f5f612deb5e8d8b8e" data-target-for="rpip8917c94c029ae541e361"><a class="el" href="#ga3c019cd595a52ee87e06bdf20e427660" id="rpipa680262dd455d68b51c7" data-adjusted="true">auto_init_recursive_mutex</a>(name)   static __attribute__((section(".mutex_array"))) <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip4516c8b38b282d977312" data-adjusted="true">recursive_mutex_t</a> name = { .core = { .spin_lock = (<a class="el" href="hardware.html#gad27c7e019d540f863965663b49b259e8" id="rpipf5980a862bcf11cf4f13" data-adjusted="true">spin_lock_t</a> *)1 /* marker for runtime_init */ }, .owner = 0, .enter_count = 0 }</span></p>
8090 <li class="memdesc">
8091 <p data-target="true" data-target-for="rpip33005d0f0bd8752148e2"><span class="mdescLeft" data-target="true" id="rpip2f682070ab39ec6ec74b" data-parent-id="rpip33005d0f0bd8752148e2" data-target-for="rpip2f682070ab39ec6ec74b">Â </span><span class="mdescRight" data-target="true" id="rpip6ca2b0ab1ad3ea14ecb3" data-parent-id="rpip33005d0f0bd8752148e2" data-target-for="rpip6ca2b0ab1ad3ea14ecb3">Helper macro for static definition of recursive mutexes. <br id="rpip81733f7b345e01c43742"></span></p>
8096 <h4 id="rpip1b737a23d8c78757e01b">
8097 <a class="anchor" href="#rpip1b737a23d8c78757e01b"></a>Typedefs</h4>
8098 <ul class="memberdecls" id="rpip22ea98f473dc6851fdca" data-parent-id="rpip6874ef18f5f2947d8d5a">
8099 <li class="memitem">
8100 <p data-target="true" data-target-for="rpip22ea98f473dc6851fdca"><span class="memItemLeft" data-target="true" id="rpipf7fb9b6ee32b975c4a9c" data-parent-id="rpip22ea98f473dc6851fdca" data-target-for="rpipf7fb9b6ee32b975c4a9c"><a id="gaaa26fc3b4f65c4764da7d9b2a7495cc2" name="gaaa26fc3b4f65c4764da7d9b2a7495cc2"></a>
8101 typedef struct <a class="el" href="struct____packed__aligned.html" id="rpipf22bd3bbadbef544ef96">__packed_aligned</a>Â </span><span class="memItemRight" data-target="true" id="rpip623af9784e3b5d005ad6" data-parent-id="rpip22ea98f473dc6851fdca" data-target-for="rpip623af9784e3b5d005ad6"><b id="rpip9f18610ee7914b6dc4b6">recursive_mutex_t</b></span></p>
8103 <li class="memdesc">
8104 <p data-target="true" data-target-for="rpip2adac5b131b4b47b1635"><span class="mdescLeft" data-target="true" id="rpip345100d9acae1230b0b2" data-parent-id="rpip2adac5b131b4b47b1635" data-target-for="rpip345100d9acae1230b0b2">Â </span><span class="mdescRight" data-target="true" id="rpipbbcff58d1769e93132ca" data-parent-id="rpip2adac5b131b4b47b1635" data-target-for="rpipbbcff58d1769e93132ca">recursive mutex instance <br id="rpipd76d2d576cba38d51e1f"></span></p>
8106 <li class="memitem">
8107 <p data-target="true" data-target-for="rpipa606d13da26248928375"><span class="memItemLeft" data-target="true" id="rpip867863b51581373225dd" data-parent-id="rpipa606d13da26248928375" data-target-for="rpip867863b51581373225dd"><a id="gaa0676aca346799845ab75d3fb6d96ff6" name="gaa0676aca346799845ab75d3fb6d96ff6"></a>
8108 typedef struct <a class="el" href="struct____packed__aligned.html" id="rpip3779b2043a1ee8d2954f">__packed_aligned</a> <a class="el" href="structmutex.html" id="rpip4a0c1bcb5d0d95527821">mutex</a>Â </span><span class="memItemRight" data-target="true" id="rpipb2e79e8bae9030e4307f" data-parent-id="rpipa606d13da26248928375" data-target-for="rpipb2e79e8bae9030e4307f"><b id="rpip5e765c315fbe635e412a">mutex_t</b></span></p>
8110 <li class="memdesc">
8111 <p data-target="true" data-target-for="rpip82dcd28e1ac68f41bc2d"><span class="mdescLeft" data-target="true" id="rpip063d966e109272da0705" data-parent-id="rpip82dcd28e1ac68f41bc2d" data-target-for="rpip063d966e109272da0705">Â </span><span class="mdescRight" data-target="true" id="rpip710f60b5f4ef34a4e7c8" data-parent-id="rpip82dcd28e1ac68f41bc2d" data-target-for="rpip710f60b5f4ef34a4e7c8">regular (non recursive) mutex instance <br id="rpipdcf852c27e2fed96803d"></span></p>
8116 <h4 id="rpip366c952c90331fc69d06">
8117 <a class="anchor" href="#rpip366c952c90331fc69d06"></a>Functions</h4>
8118 <ul class="memberdecls" id="rpipe62f92261570c3d987ce" data-parent-id="rpip8770fa88ec60b70a3248">
8119 <li class="memitem">
8120 <p data-target="true" data-target-for="rpipe62f92261570c3d987ce"><span class="memItemLeft" data-target="true" id="rpip4e0a0401001318dca599" data-parent-id="rpipe62f92261570c3d987ce" data-target-for="rpip4e0a0401001318dca599">static bool </span><span class="memItemRight" data-target="true" id="rpip4d36d0b2a763a0bec8d2" data-parent-id="rpipe62f92261570c3d987ce" data-target-for="rpip4d36d0b2a763a0bec8d2"><a class="el" href="#ga0be65abf0782a68a724bd6d37fd5e010" id="rpip526d4ba4b98e66bc0d8b" data-adjusted="true">critical_section_is_initialized</a> (critical_section_t *crit_sec)</span></p>
8122 <li class="memdesc">
8123 <p data-target="true" data-target-for="rpipafa3951857a01aec2bd8"><span class="mdescLeft" data-target="true" id="rpip0145471f25f5ae044b9c" data-parent-id="rpipafa3951857a01aec2bd8" data-target-for="rpip0145471f25f5ae044b9c">Â </span><span class="mdescRight" data-target="true" id="rpip9cb59eab5367e35aba0d" data-parent-id="rpipafa3951857a01aec2bd8" data-target-for="rpip9cb59eab5367e35aba0d">Test whether a <a class="el" href="structcritical__section.html" id="rpip15b47eb5d659901c81e1">critical_section</a> has been initialized. <br id="rpip1cf5f1eebfe14ba89084"></span></p>
8125 <li class="memitem">
8126 <p data-target="true" data-target-for="rpip1ef21065ec97accf752a"><span class="memItemLeft" data-target="true" id="rpip6b477cfe3b112aee18ef" data-parent-id="rpip1ef21065ec97accf752a" data-target-for="rpip6b477cfe3b112aee18ef">void </span><span class="memItemRight" data-target="true" id="rpip17f65d499fbca8f1c957" data-parent-id="rpip1ef21065ec97accf752a" data-target-for="rpip17f65d499fbca8f1c957"><a class="el" href="#gabe21d7ce624db2df7afe86c4bba400a2" id="rpip9d0fc8a99255c75a2b82" data-adjusted="true">mutex_init</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip3b851211d709c254d376" data-adjusted="true">mutex_t</a> *mtx)</span></p>
8128 <li class="memdesc">
8129 <p data-target="true" data-target-for="rpipdfdb97079e2f6f1169c2"><span class="mdescLeft" data-target="true" id="rpip4ae94a152d36f112936e" data-parent-id="rpipdfdb97079e2f6f1169c2" data-target-for="rpip4ae94a152d36f112936e">Â </span><span class="mdescRight" data-target="true" id="rpip9436bb23e27525b9d279" data-parent-id="rpipdfdb97079e2f6f1169c2" data-target-for="rpip9436bb23e27525b9d279">Initialise a mutex structure. <br id="rpipc2e5f81383d567276ecb"></span></p>
8131 <li class="memitem">
8132 <p data-target="true" data-target-for="rpip4ba0233d7eda31336294"><span class="memItemLeft" data-target="true" id="rpip67a95921d878a073ca20" data-parent-id="rpip4ba0233d7eda31336294" data-target-for="rpip67a95921d878a073ca20">void </span><span class="memItemRight" data-target="true" id="rpip985e4e74952617cfadb2" data-parent-id="rpip4ba0233d7eda31336294" data-target-for="rpip985e4e74952617cfadb2"><a class="el" href="#ga30d1f9d58564a1799e293451edc2d28e" id="rpip381efa6ebaf3d52aa547" data-adjusted="true">recursive_mutex_init</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipd055a2a906ae6365d62d" data-adjusted="true">recursive_mutex_t</a> *mtx)</span></p>
8134 <li class="memdesc">
8135 <p data-target="true" data-target-for="rpip8b9b01b0661fd9bbcae0"><span class="mdescLeft" data-target="true" id="rpipc7e1b215462ddd877566" data-parent-id="rpip8b9b01b0661fd9bbcae0" data-target-for="rpipc7e1b215462ddd877566">Â </span><span class="mdescRight" data-target="true" id="rpipc47b1cb188f1dc876a0f" data-parent-id="rpip8b9b01b0661fd9bbcae0" data-target-for="rpipc47b1cb188f1dc876a0f">Initialise a recursive mutex structure. <br id="rpip67fe9b5e0833b1d0ad39"></span></p>
8137 <li class="memitem">
8138 <p data-target="true" data-target-for="rpipbe197ae51f0f34d9b003"><span class="memItemLeft" data-target="true" id="rpipec8cb6efe3faf7a8311c" data-parent-id="rpipbe197ae51f0f34d9b003" data-target-for="rpipec8cb6efe3faf7a8311c">void </span><span class="memItemRight" data-target="true" id="rpip07f95a47989eb78ab7b0" data-parent-id="rpipbe197ae51f0f34d9b003" data-target-for="rpip07f95a47989eb78ab7b0"><a class="el" href="#ga65b1c7af0545f478c80b51513d8f6993" id="rpip6448b5de77953a4d6c33" data-adjusted="true">mutex_enter_blocking</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipaba1cb1a8a4b6a503551" data-adjusted="true">mutex_t</a> *mtx)</span></p>
8140 <li class="memdesc">
8141 <p data-target="true" data-target-for="rpipac778c405440c1d0a6dc"><span class="mdescLeft" data-target="true" id="rpip27d6097511a268ee85ec" data-parent-id="rpipac778c405440c1d0a6dc" data-target-for="rpip27d6097511a268ee85ec">Â </span><span class="mdescRight" data-target="true" id="rpip1ad89db754036d9f0fad" data-parent-id="rpipac778c405440c1d0a6dc" data-target-for="rpip1ad89db754036d9f0fad">Take ownership of a mutex. <br id="rpip15703861733f8fcc7d51"></span></p>
8143 <li class="memitem">
8144 <p data-target="true" data-target-for="rpip21be54b5910958e7ab4d"><span class="memItemLeft" data-target="true" id="rpip41360be38fe6b7ebcf3f" data-parent-id="rpip21be54b5910958e7ab4d" data-target-for="rpip41360be38fe6b7ebcf3f">void </span><span class="memItemRight" data-target="true" id="rpip5ee52d5ad520f89ab925" data-parent-id="rpip21be54b5910958e7ab4d" data-target-for="rpip5ee52d5ad520f89ab925"><a class="el" href="#gad11f3d954d96cfdc77025735d35983e1" id="rpipdbd4c467834e8cda24ed" data-adjusted="true">recursive_mutex_enter_blocking</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipbe8c3174861bdbfa0cab" data-adjusted="true">recursive_mutex_t</a> *mtx)</span></p>
8146 <li class="memdesc">
8147 <p data-target="true" data-target-for="rpip6d1e7dddfc6bcc89b610"><span class="mdescLeft" data-target="true" id="rpip6449e21040a643736a5e" data-parent-id="rpip6d1e7dddfc6bcc89b610" data-target-for="rpip6449e21040a643736a5e">Â </span><span class="mdescRight" data-target="true" id="rpip2a54f642996c1d9b2a87" data-parent-id="rpip6d1e7dddfc6bcc89b610" data-target-for="rpip2a54f642996c1d9b2a87">Take ownership of a recursive mutex. <br id="rpip042bdffa2cf1f9ab01fd"></span></p>
8149 <li class="memitem">
8150 <p data-target="true" data-target-for="rpipcf2138d304d13f610e2d"><span class="memItemLeft" data-target="true" id="rpip51f986acdf85936d71f8" data-parent-id="rpipcf2138d304d13f610e2d" data-target-for="rpip51f986acdf85936d71f8">bool </span><span class="memItemRight" data-target="true" id="rpip2290410ef1e89ec99bc3" data-parent-id="rpipcf2138d304d13f610e2d" data-target-for="rpip2290410ef1e89ec99bc3"><a class="el" href="#gaa116de2f28fd7df8fb78b210e07b1ed4" id="rpip4d6c7afa87635101bbb7" data-adjusted="true">mutex_try_enter</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip00b605e6aa5bd60e837e" data-adjusted="true">mutex_t</a> *mtx, uint32_t *owner_out)</span></p>
8152 <li class="memdesc">
8153 <p data-target="true" data-target-for="rpipc106859bd4894cdc2654"><span class="mdescLeft" data-target="true" id="rpipa428eec1ea2c62b9ee87" data-parent-id="rpipc106859bd4894cdc2654" data-target-for="rpipa428eec1ea2c62b9ee87">Â </span><span class="mdescRight" data-target="true" id="rpipe86c453f1590d6bfae96" data-parent-id="rpipc106859bd4894cdc2654" data-target-for="rpipe86c453f1590d6bfae96">Attempt to take ownership of a mutex. <br id="rpipe98f3182d59cff76aff1"></span></p>
8155 <li class="memitem">
8156 <p data-target="true" data-target-for="rpipfa09b215c5adb04d846a"><span class="memItemLeft" data-target="true" id="rpipe501f1dbc3177876d964" data-parent-id="rpipfa09b215c5adb04d846a" data-target-for="rpipe501f1dbc3177876d964">bool </span><span class="memItemRight" data-target="true" id="rpip5d9049f432dca88786e4" data-parent-id="rpipfa09b215c5adb04d846a" data-target-for="rpip5d9049f432dca88786e4"><a class="el" href="#ga91088e6bd3929dcf86ed12cd92ee2cd8" id="rpipbafb702b666b128ee3a2" data-adjusted="true">mutex_try_enter_block_until</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipa4fd129bfbf4e9adb773" data-adjusted="true">mutex_t</a> *mtx, <a class="el" href="structabsolute__time__t.html" id="rpipf6506881aefeb5a2b4e4">absolute_time_t</a> until)</span></p>
8158 <li class="memdesc">
8159 <p data-target="true" data-target-for="rpip340cfbd99d0bfa32f2d5"><span class="mdescLeft" data-target="true" id="rpipe30be6a20a1b0e1a7650" data-parent-id="rpip340cfbd99d0bfa32f2d5" data-target-for="rpipe30be6a20a1b0e1a7650">Â </span><span class="mdescRight" data-target="true" id="rpip3f31af448c400ca1fb6b" data-parent-id="rpip340cfbd99d0bfa32f2d5" data-target-for="rpip3f31af448c400ca1fb6b">Attempt to take ownership of a mutex until the specified time. <br id="rpip2f3b05e59b8cb7b3e675"></span></p>
8161 <li class="memitem">
8162 <p data-target="true" data-target-for="rpip8d9f91c69a03e452ddb1"><span class="memItemLeft" data-target="true" id="rpipb2fa8a9307ce3a80459f" data-parent-id="rpip8d9f91c69a03e452ddb1" data-target-for="rpipb2fa8a9307ce3a80459f">bool </span><span class="memItemRight" data-target="true" id="rpipd3cd5dd2140fab351ce6" data-parent-id="rpip8d9f91c69a03e452ddb1" data-target-for="rpipd3cd5dd2140fab351ce6"><a class="el" href="#gae431bbb90e45cf9ae47130a5635aa2b0" id="rpip9aad2c6cb525bed863fb" data-adjusted="true">recursive_mutex_try_enter</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip1ff536e67b09442b7e85" data-adjusted="true">recursive_mutex_t</a> *mtx, uint32_t *owner_out)</span></p>
8164 <li class="memdesc">
8165 <p data-target="true" data-target-for="rpip3f337e4881338951e8bf"><span class="mdescLeft" data-target="true" id="rpip1178ca924ac3d0fd1861" data-parent-id="rpip3f337e4881338951e8bf" data-target-for="rpip1178ca924ac3d0fd1861">Â </span><span class="mdescRight" data-target="true" id="rpipb321ba7fa1472fa3323b" data-parent-id="rpip3f337e4881338951e8bf" data-target-for="rpipb321ba7fa1472fa3323b">Attempt to take ownership of a recursive mutex. <br id="rpipe6046a925545bd130fd1"></span></p>
8167 <li class="memitem">
8168 <p data-target="true" data-target-for="rpip1b102a10d857a7eac52a"><span class="memItemLeft" data-target="true" id="rpipb7696609803581b24e24" data-parent-id="rpip1b102a10d857a7eac52a" data-target-for="rpipb7696609803581b24e24">bool </span><span class="memItemRight" data-target="true" id="rpip0713b991cd999a56275c" data-parent-id="rpip1b102a10d857a7eac52a" data-target-for="rpip0713b991cd999a56275c"><a class="el" href="#ga32c6e468289a81a49b4bde50a6280f83" id="rpip03d14ccb743371052875" data-adjusted="true">mutex_enter_timeout_ms</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipea70cd6d84fd948a3eee" data-adjusted="true">mutex_t</a> *mtx, uint32_t timeout_ms)</span></p>
8170 <li class="memdesc">
8171 <p data-target="true" data-target-for="rpipb8756bad86b8873a18e9"><span class="mdescLeft" data-target="true" id="rpip8336564560b52346452f" data-parent-id="rpipb8756bad86b8873a18e9" data-target-for="rpip8336564560b52346452f">Â </span><span class="mdescRight" data-target="true" id="rpip7cdf68f2474d6f4cefdb" data-parent-id="rpipb8756bad86b8873a18e9" data-target-for="rpip7cdf68f2474d6f4cefdb">Wait for mutex with timeout. <br id="rpip92b84fa61bd3ec353a54"></span></p>
8173 <li class="memitem">
8174 <p data-target="true" data-target-for="rpipf839cbd7bb61cd591f32"><span class="memItemLeft" data-target="true" id="rpipcf2f791b44c4007fa84e" data-parent-id="rpipf839cbd7bb61cd591f32" data-target-for="rpipcf2f791b44c4007fa84e">bool </span><span class="memItemRight" data-target="true" id="rpip037d4e26babdd1c3f15c" data-parent-id="rpipf839cbd7bb61cd591f32" data-target-for="rpip037d4e26babdd1c3f15c"><a class="el" href="#gad54a0bdb7967571caecb62869bd4194d" id="rpipa9c4a11de7b8d69a2ade" data-adjusted="true">recursive_mutex_enter_timeout_ms</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipcf3e64187a0d7d555486" data-adjusted="true">recursive_mutex_t</a> *mtx, uint32_t timeout_ms)</span></p>
8176 <li class="memdesc">
8177 <p data-target="true" data-target-for="rpip78248cc13407321bee10"><span class="mdescLeft" data-target="true" id="rpipbb28f85abffe01f7e7d5" data-parent-id="rpip78248cc13407321bee10" data-target-for="rpipbb28f85abffe01f7e7d5">Â </span><span class="mdescRight" data-target="true" id="rpipc6c5e5e6b19f57182dbd" data-parent-id="rpip78248cc13407321bee10" data-target-for="rpipc6c5e5e6b19f57182dbd">Wait for recursive mutex with timeout. <br id="rpip52c09f02df4303b93095"></span></p>
8179 <li class="memitem">
8180 <p data-target="true" data-target-for="rpip8b71d2f458619f753d1c"><span class="memItemLeft" data-target="true" id="rpipee46fa9285701d5f9fe8" data-parent-id="rpip8b71d2f458619f753d1c" data-target-for="rpipee46fa9285701d5f9fe8">bool </span><span class="memItemRight" data-target="true" id="rpipcda97443817ed262a150" data-parent-id="rpip8b71d2f458619f753d1c" data-target-for="rpipcda97443817ed262a150"><a class="el" href="#ga553f33e9692a19f8ad956a8b770858e0" id="rpipa4b6d1eca5125ec32e21" data-adjusted="true">mutex_enter_timeout_us</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipa49de63b80b7800bc668" data-adjusted="true">mutex_t</a> *mtx, uint32_t timeout_us)</span></p>
8182 <li class="memdesc">
8183 <p data-target="true" data-target-for="rpipc196cc7435b2cce3d3d9"><span class="mdescLeft" data-target="true" id="rpip3fbda5cbd6b570db920d" data-parent-id="rpipc196cc7435b2cce3d3d9" data-target-for="rpip3fbda5cbd6b570db920d">Â </span><span class="mdescRight" data-target="true" id="rpipe105b2b71ec200776a3e" data-parent-id="rpipc196cc7435b2cce3d3d9" data-target-for="rpipe105b2b71ec200776a3e">Wait for mutex with timeout. <br id="rpip24bbdd9c6a9a062f8f4f"></span></p>
8185 <li class="memitem">
8186 <p data-target="true" data-target-for="rpip49cd10c7e51d7541a3f1"><span class="memItemLeft" data-target="true" id="rpip48f49a31c02895ccffe6" data-parent-id="rpip49cd10c7e51d7541a3f1" data-target-for="rpip48f49a31c02895ccffe6">bool </span><span class="memItemRight" data-target="true" id="rpip19c63d4cb9bb5cf96a9d" data-parent-id="rpip49cd10c7e51d7541a3f1" data-target-for="rpip19c63d4cb9bb5cf96a9d"><a class="el" href="#gaeeb630a7c13ed3adc567e62c8c737401" id="rpipa62a770527ed33073379" data-adjusted="true">recursive_mutex_enter_timeout_us</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip8a1f3b943cc50ed4708f" data-adjusted="true">recursive_mutex_t</a> *mtx, uint32_t timeout_us)</span></p>
8188 <li class="memdesc">
8189 <p data-target="true" data-target-for="rpip0f667db305a675b2d971"><span class="mdescLeft" data-target="true" id="rpipaa416bc9903882b9ac35" data-parent-id="rpip0f667db305a675b2d971" data-target-for="rpipaa416bc9903882b9ac35">Â </span><span class="mdescRight" data-target="true" id="rpipdaf05e360cd639ab6cf0" data-parent-id="rpip0f667db305a675b2d971" data-target-for="rpipdaf05e360cd639ab6cf0">Wait for recursive mutex with timeout. <br id="rpipe347de829bcbb2c12482"></span></p>
8191 <li class="memitem">
8192 <p data-target="true" data-target-for="rpip3138bbb0d6760145af17"><span class="memItemLeft" data-target="true" id="rpipf07969bc0e03aeafa130" data-parent-id="rpip3138bbb0d6760145af17" data-target-for="rpipf07969bc0e03aeafa130">bool </span><span class="memItemRight" data-target="true" id="rpip75f7e69f5b36306b5770" data-parent-id="rpip3138bbb0d6760145af17" data-target-for="rpip75f7e69f5b36306b5770"><a class="el" href="#ga69e2f75f0a38378b20c0f2bf9cc7bbe3" id="rpipcabe75649b5cd26b7da2" data-adjusted="true">mutex_enter_block_until</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip104ff4b3dba7cf852e63" data-adjusted="true">mutex_t</a> *mtx, <a class="el" href="structabsolute__time__t.html" id="rpip0d2cbfa82d9830293f72">absolute_time_t</a> until)</span></p>
8194 <li class="memdesc">
8195 <p data-target="true" data-target-for="rpipda48dd7bee0922507bd5"><span class="mdescLeft" data-target="true" id="rpip0d1678e734b5b33c9fa7" data-parent-id="rpipda48dd7bee0922507bd5" data-target-for="rpip0d1678e734b5b33c9fa7">Â </span><span class="mdescRight" data-target="true" id="rpip00d989d8874024edb1a4" data-parent-id="rpipda48dd7bee0922507bd5" data-target-for="rpip00d989d8874024edb1a4">Wait for mutex until a specific time. <br id="rpip9cd9fa637a232c2cec8c"></span></p>
8197 <li class="memitem">
8198 <p data-target="true" data-target-for="rpipf5cf11637e0753d10fe3"><span class="memItemLeft" data-target="true" id="rpip951904a23ec1e45d8523" data-parent-id="rpipf5cf11637e0753d10fe3" data-target-for="rpip951904a23ec1e45d8523">bool </span><span class="memItemRight" data-target="true" id="rpipb5478a8f3d0001525724" data-parent-id="rpipf5cf11637e0753d10fe3" data-target-for="rpipb5478a8f3d0001525724"><a class="el" href="#ga6ce3ca26cbce71a3e29396264e00e253" id="rpipfb8f06d2fbbc232c8e91" data-adjusted="true">recursive_mutex_enter_block_until</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip5009ba5f8bc476d9c9f1" data-adjusted="true">recursive_mutex_t</a> *mtx, <a class="el" href="structabsolute__time__t.html" id="rpipfb10aa5b34b401f87628">absolute_time_t</a> until)</span></p>
8200 <li class="memdesc">
8201 <p data-target="true" data-target-for="rpip2489063710e59ba734e1"><span class="mdescLeft" data-target="true" id="rpip183eea544a41e0020218" data-parent-id="rpip2489063710e59ba734e1" data-target-for="rpip183eea544a41e0020218">Â </span><span class="mdescRight" data-target="true" id="rpip0870ef72b411e607239c" data-parent-id="rpip2489063710e59ba734e1" data-target-for="rpip0870ef72b411e607239c">Wait for mutex until a specific time. <br id="rpip8b58e670f89b2b2f2d77"></span></p>
8203 <li class="memitem">
8204 <p data-target="true" data-target-for="rpipb6cd7e16fc69bc1249ce"><span class="memItemLeft" data-target="true" id="rpip19c6439531c02c3d55f5" data-parent-id="rpipb6cd7e16fc69bc1249ce" data-target-for="rpip19c6439531c02c3d55f5">void </span><span class="memItemRight" data-target="true" id="rpip7ef2eea6fda32c283e6b" data-parent-id="rpipb6cd7e16fc69bc1249ce" data-target-for="rpip7ef2eea6fda32c283e6b"><a class="el" href="#gaf528c8fbb5f4532758859d18e24e1673" id="rpip9923366dfbbbf7fef9be" data-adjusted="true">mutex_exit</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip2f46653d3846ac793afc" data-adjusted="true">mutex_t</a> *mtx)</span></p>
8206 <li class="memdesc">
8207 <p data-target="true" data-target-for="rpip96bfc6a2253c7c4e4a5b"><span class="mdescLeft" data-target="true" id="rpip3bd1d9e5d1279c565859" data-parent-id="rpip96bfc6a2253c7c4e4a5b" data-target-for="rpip3bd1d9e5d1279c565859">Â </span><span class="mdescRight" data-target="true" id="rpip43c8042190dac1fe0b3d" data-parent-id="rpip96bfc6a2253c7c4e4a5b" data-target-for="rpip43c8042190dac1fe0b3d">Release ownership of a mutex. <br id="rpip8eb0734d9414c1a1fca6"></span></p>
8209 <li class="memitem">
8210 <p data-target="true" data-target-for="rpipcac4dc705beb14b89a2e"><span class="memItemLeft" data-target="true" id="rpipaf9b6b3354194b42c2d9" data-parent-id="rpipcac4dc705beb14b89a2e" data-target-for="rpipaf9b6b3354194b42c2d9">void </span><span class="memItemRight" data-target="true" id="rpipb16ba1fac7c78d68f382" data-parent-id="rpipcac4dc705beb14b89a2e" data-target-for="rpipb16ba1fac7c78d68f382"><a class="el" href="#ga2f75321a04ba731f5875353fbaebc345" id="rpip47c63cc4f7a7096d8d5b" data-adjusted="true">recursive_mutex_exit</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip3bb34edcb697a6a029c7" data-adjusted="true">recursive_mutex_t</a> *mtx)</span></p>
8212 <li class="memdesc">
8213 <p data-target="true" data-target-for="rpipa1fa0b20ee0b9ead8325"><span class="mdescLeft" data-target="true" id="rpipad0ada57000677677b40" data-parent-id="rpipa1fa0b20ee0b9ead8325" data-target-for="rpipad0ada57000677677b40">Â </span><span class="mdescRight" data-target="true" id="rpipafe1dc72acf8caafcea3" data-parent-id="rpipa1fa0b20ee0b9ead8325" data-target-for="rpipafe1dc72acf8caafcea3">Release ownership of a recursive mutex. <br id="rpip426b51d5073c506c4157"></span></p>
8215 <li class="memitem">
8216 <p data-target="true" data-target-for="rpip60b7ea45e40d00559361"><span class="memItemLeft" data-target="true" id="rpip445f067d3689e10419bf" data-parent-id="rpip60b7ea45e40d00559361" data-target-for="rpip445f067d3689e10419bf">static bool </span><span class="memItemRight" data-target="true" id="rpip87fb8a588553aacabc21" data-parent-id="rpip60b7ea45e40d00559361" data-target-for="rpip87fb8a588553aacabc21"><a class="el" href="#gae4b5ca3e872a6823f6580f1388b6585e" id="rpipd17749c44a8015a8d3b6" data-adjusted="true">mutex_is_initialized</a> (<a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipae74df7869757fef0a5c" data-adjusted="true">mutex_t</a> *mtx)</span></p>
8218 <li class="memdesc">
8219 <p data-target="true" data-target-for="rpip21390487daeacc69671e"><span class="mdescLeft" data-target="true" id="rpip03f88384e27031169ed7" data-parent-id="rpip21390487daeacc69671e" data-target-for="rpip03f88384e27031169ed7">Â </span><span class="mdescRight" data-target="true" id="rpipacbde428f5e0e7f2c498" data-parent-id="rpip21390487daeacc69671e" data-target-for="rpipacbde428f5e0e7f2c498">Test for mutex initialized state. <br id="rpip6a3831fc3eb99cc456fe"></span></p>
8221 <li class="memitem">
8222 <p data-target="true" data-target-for="rpipa8a2ca1160727b7bb0d5"><span class="memItemLeft" data-target="true" id="rpipece3a034914de20796a3" data-parent-id="rpipa8a2ca1160727b7bb0d5" data-target-for="rpipece3a034914de20796a3">static bool </span><span class="memItemRight" data-target="true" id="rpip00eff924c80d51006d5a" data-parent-id="rpipa8a2ca1160727b7bb0d5" data-target-for="rpip00eff924c80d51006d5a"><a class="el" href="#ga97e45154e86f0d206665bbce779d112d" id="rpipcb116104cce5506978f9" data-adjusted="true">recursive_mutex_is_initialized</a> (<a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip0df21266beb13483dc78" data-adjusted="true">recursive_mutex_t</a> *mtx)</span></p>
8224 <li class="memdesc">
8225 <p data-target="true" data-target-for="rpip91b59bec9ff2d7bee392"><span class="mdescLeft" data-target="true" id="rpip01d7652e5893acb68982" data-parent-id="rpip91b59bec9ff2d7bee392" data-target-for="rpip01d7652e5893acb68982">Â </span><span class="mdescRight" data-target="true" id="rpip2bd81ef9d2814af1a8d1" data-parent-id="rpip91b59bec9ff2d7bee392" data-target-for="rpip2bd81ef9d2814af1a8d1">Test for recursive mutex initialized state. <br id="rpipe53ff30b71a9cbc1080a"></span></p>
8228 <a name="details" id="ga9fb36598239cbc9bcf21"></a>
8231 <h4 id="rpipc7e2f661631163c79bd8">
8232 <a class="anchor" href="#rpipc7e2f661631163c79bd8"></a>Detailed Description</h4>
8233 <p id="rpipb8951525ce0c94f97486">Mutex API for non IRQ mutual exclusion between cores. </p>
8234 <p id="rpip1d5de568ba08879eb7ce">Mutexes are application level locks usually used protecting data structures that might be used by multiple threads of execution. Unlike critical sections, the mutex protected code is not necessarily required/expected to complete quickly, as no other sytem wide locks are held on account of an acquired mutex.</p>
8235 <p id="rpip0f255ed67a83d34c0111">When acquired, the mutex has an owner (see <a class="el" href="high_level.html#gae28f1d974cf1f1b973127500a764245c" id="rpip6d9c2b3ff7004564fd29" data-adjusted="true">lock_get_caller_owner_id</a>) which with the plain SDK is just the acquiring core, but in an RTOS it could be a task, or an IRQ handler context.</p>
8236 <p id="rpip7cff7ffb1df2e3dde862">Two variants of mutex are provided; <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip50ea960cdab37d957722" data-adjusted="true">mutex_t</a> (and associated mutex_ functions) is a regular mutex that cannot be acquired recursively by the same owner (a deadlock will occur if you try). <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip18d1ec7dfc32a7c59cab" data-adjusted="true">recursive_mutex_t</a> (and associated recursive_mutex_ functions) is a recursive mutex that can be recursively obtained by the same caller, at the expense of some more overhead when acquiring and releasing.</p>
8237 <p id="rpipfc6f9973bd0b298f0cea">It is generally a bad idea to call blocking mutex_ or recursive_mutex_ functions from within an IRQ handler. It is valid to call <a class="el" href="#gaa116de2f28fd7df8fb78b210e07b1ed4" id="rpipfbbc8af591c263c7787b" data-adjusted="true">mutex_try_enter</a> or <a class="el" href="#gae431bbb90e45cf9ae47130a5635aa2b0" id="rpipdb84ac4f194d459b80cd" data-adjusted="true">recursive_mutex_try_enter</a> from within an IRQ handler, if the operation that would be conducted under lock can be skipped if the mutex is locked (at least by the same owner).</p>
8238 <p id="rpipa0dfe9424e3e26039efb">NOTE: For backwards compatibility with version 1.2.0 of the SDK, if the define PICO_MUTEX_ENABLE_SDK120_COMPATIBILITY is set to 1, then the the regular mutex_ functions may also be used for recursive mutexes. This flag will be removed in a future version of the SDK.</p>
8239 <p id="rpip76778f494c74f45a96da">See <a class="el" href="critical__section_8h.html" id="rpip3fbc00695cedb7b73744">critical_section.h</a> for protecting access between multiple cores AND IRQ handlers </p>
8242 <h4 id="rpip7c08f543528c67ade453">
8243 <a class="anchor" href="#rpip7c08f543528c67ade453"></a>Macro Definition Documentation</h4>
8244 <a id="gaa1b5d9dea897013fc5e40bf102045592" name="gaa1b5d9dea897013fc5e40bf102045592"></a>
8246 <h5 id="rpip9c85aeb2ed50d3db316c">
8247 <a class="anchor" href="#rpip9c85aeb2ed50d3db316c"></a>◆ auto_init_mutex</h5>
8248 <div class="memitem" id="rpipc6daededf41d8083e582">
8249 <div class="memproto" id="rpip27c5dd630129690a5c89">
8250 <table class="memname" id="rpip7121a29b25d895ae4bed">
8251 <tr id="rpip02fbd4edbc72c74f9b73">
8252 <td class="memname" id="rpip3cfd980a21ab347c9a79">#define auto_init_mutex</td>
8253 <td id="rpip6ce4aaaaabe01b1614a2">(</td>
8254 <td class="paramtype" id="rpip686f6db752571b78b40f">Â </td>
8255 <td class="paramname" id="rpip2fe0885b85a44e6ecb26">name</td>
8256 <td id="rpip347dcc898b22d1f11748">)</td>
8257 <td id="rpip754976ddfa74419cee26">Â Â Â static __attribute__((section(".mutex_array"))) <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip0c1b2f171cf450a5af62" data-adjusted="true">mutex_t</a> name</td>
8261 <div class="memdoc" id="rpip20376f0ca41d6f1facaa">
8263 <p id="rpip5c3129ce34e01ab82f72">Helper macro for static definition of mutexes. </p>
8264 <p id="rpip7d30b5d9ddbe05d5844d">A mutex defined as follows:</p>
8265 <div class="listingblock" id="rpipcf2b7e3cca23fa4531de" data-parent-id="rpip20376f0ca41d6f1facaa">
8266 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
8267 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
8268 </div></button><div class="content" data-target="true" data-target-for="rpipcf2b7e3cca23fa4531de">
8269 <div class="line" id="rpip4e25259b1244c209113c">
8270 <a class="code hl_define" href="#gaa1b5d9dea897013fc5e40bf102045592" id="rpip1733afb0e786994c1268" data-adjusted="true">auto_init_mutex</a>(my_mutex);</div>
8271 <div class="ttc" id="agroup__mutex_html_gaa1b5d9dea897013fc5e40bf102045592">
8272 <div class="ttname" id="rpipe4d1242dd938dfffa454"><a href="#gaa1b5d9dea897013fc5e40bf102045592" id="rpipfe62daabe239bcd07d05" data-adjusted="true">auto_init_mutex</a></div>
8273 <div class="ttdeci" id="rpip4808fa58d8d05f2e89a5">#define auto_init_mutex(name)</div>
8274 <div class="ttdoc" id="rpip42b36276ea7b72bfb657">Helper macro for static definition of mutexes.</div>
8275 <div class="ttdef" id="rpip7ed42266e7015a64a1a1">
8276 <b id="rpipd285707bd45f054bc3cb">Definition:</b> mutex.h:283</div>
8280 <!-- fragment --><p id="rpipe38bfb1940a531dc4d18">Is equivalent to doing</p>
8281 <div class="listingblock" id="rpip5016ab9b7f56c746219e" data-parent-id="rpip20376f0ca41d6f1facaa">
8282 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
8283 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
8284 </div></button><div class="content" data-target="true" data-target-for="rpip5016ab9b7f56c746219e">
8285 <div class="line" id="rpip254fce582de368a4d2be">
8286 <span class="keyword" id="rpipd716129055a3867269c3">static</span> <a class="code hl_typedef" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip64bec2d8407f8af43610" data-adjusted="true">mutex_t</a> my_mutex;</div>
8287 <div class="line" id="rpipb13f5a61b099644a8db4"> </div>
8288 <div class="line" id="rpip8fdf883e0c35b2d64c59">
8289 <span class="keywordtype" id="rpipd75373c47ad524501ad9">void</span> my_init_function() {</div>
8290 <div class="line" id="rpipf6fd933548362d79ba10"> <a class="code hl_function" href="#gabe21d7ce624db2df7afe86c4bba400a2" id="rpip30209542f3bc5e81c391" data-adjusted="true">mutex_init</a>(&my_mutex);</div>
8291 <div class="line" id="rpip8147e553ea30d783a688">}</div>
8292 <div class="ttc" id="agroup__mutex_html_gaa0676aca346799845ab75d3fb6d96ff6">
8293 <div class="ttname" id="rpip78706103030cd443e9d5"><a href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip9ac4428a8829ee057a7b" data-adjusted="true">mutex_t</a></div>
8294 <div class="ttdeci" id="rpip3e1be2a29b77d027a26f">struct __packed_aligned mutex mutex_t</div>
8295 <div class="ttdoc" id="rpipa063a96359b50a83702c">regular (non recursive) mutex instance</div>
8297 <div class="ttc" id="agroup__mutex_html_gabe21d7ce624db2df7afe86c4bba400a2">
8298 <div class="ttname" id="rpip546730865acd91429cdc"><a href="#gabe21d7ce624db2df7afe86c4bba400a2" id="rpipfaacbb1e98f42239c129" data-adjusted="true">mutex_init</a></div>
8299 <div class="ttdeci" id="rpip941d61f244b78be765d5">void mutex_init(mutex_t *mtx)</div>
8300 <div class="ttdoc" id="rpip92c329a488c9145afa73">Initialise a mutex structure.</div>
8301 <div class="ttdef" id="rpip2ad500e5a9f754e84577">
8302 <b id="rpip055a13fc5371490c5a06">Definition:</b> mutex.c:10</div>
8306 <!-- fragment --><p id="rpip51547a6e4ba640e37f3b">But the initialization of the mutex is performed automatically during runtime initialization </p>
8310 <a id="ga3c019cd595a52ee87e06bdf20e427660" name="ga3c019cd595a52ee87e06bdf20e427660"></a>
8313 <h5 id="rpip5453de21c4a791369f7c">
8314 <a class="anchor" href="#rpip5453de21c4a791369f7c"></a>◆ auto_init_recursive_mutex</h5>
8315 <div class="memitem" id="rpip2c70e9fae223d7d06fa5">
8316 <div class="memproto" id="rpip51d87791de0e8a03c27b">
8317 <table class="memname" id="rpip4b348b5e4fd5618e7a53">
8318 <tr id="rpip2c0cc3fc6e5312b3677a">
8319 <td class="memname" id="rpip64e244b4a6711c6918d1">#define auto_init_recursive_mutex</td>
8320 <td id="rpip56c11ad50d8be9a810d8">(</td>
8321 <td class="paramtype" id="rpip22ece1831443e683bd6e">Â </td>
8322 <td class="paramname" id="rpip2d06e53df5becf54f80d">name</td>
8323 <td id="rpip8662bfe5a165eb129e9d">)</td>
8324 <td id="rpip45470c6ebf060c26d8ae">Â Â Â static __attribute__((section(".mutex_array"))) <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip98e4f7a171d99387dc56" data-adjusted="true">recursive_mutex_t</a> name = { .core = { .spin_lock = (<a class="el" href="hardware.html#gad27c7e019d540f863965663b49b259e8" id="rpip14b228623c22618e873f" data-adjusted="true">spin_lock_t</a> *)1 /* marker for runtime_init */ }, .owner = 0, .enter_count = 0 }</td>
8328 <div class="memdoc" id="rpip537401b1cd36871110f4">
8330 <p id="rpipec0898421f99a204cc9f">Helper macro for static definition of recursive mutexes. </p>
8331 <p id="rpipb5968d5298ab61446d49">A recursive mutex defined as follows:</p>
8332 <div class="listingblock" id="rpip3074513594e8c4801903" data-parent-id="rpip537401b1cd36871110f4">
8333 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
8334 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
8335 </div></button><div class="content" data-target="true" data-target-for="rpip3074513594e8c4801903">
8336 <div class="line" id="rpip7c8d72a8228d317d7177">
8337 <a class="code hl_define" href="#ga3c019cd595a52ee87e06bdf20e427660" id="rpip6767340496ec134a5792" data-adjusted="true">auto_init_recursive_mutex</a>(my_recursive_mutex);</div>
8338 <div class="ttc" id="agroup__mutex_html_ga3c019cd595a52ee87e06bdf20e427660">
8339 <div class="ttname" id="rpip7a1cdf9489d95b3cd6aa"><a href="#ga3c019cd595a52ee87e06bdf20e427660" id="rpip34acd4380dfa6664b841" data-adjusted="true">auto_init_recursive_mutex</a></div>
8340 <div class="ttdeci" id="rpip2eb2371f3e40bd9c55a2">#define auto_init_recursive_mutex(name)</div>
8341 <div class="ttdoc" id="rpipffd97c5e6c660d5779a6">Helper macro for static definition of recursive mutexes.</div>
8342 <div class="ttdef" id="rpip2a200918c3de1fbab71d">
8343 <b id="rpip805f925968f7272ec451">Definition:</b> mutex.h:306</div>
8347 <!-- fragment --><p id="rpipc31c0d15fca1f56eded0">Is equivalent to doing</p>
8348 <div class="listingblock" id="rpip44ceb67219aa8948424c" data-parent-id="rpip537401b1cd36871110f4">
8349 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
8350 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
8351 </div></button><div class="content" data-target="true" data-target-for="rpip44ceb67219aa8948424c">
8352 <div class="line" id="rpipc3f54bf14be6014dc1a1">
8353 <span class="keyword" id="rpipf3837f4e58c73f8d65e4">static</span> <a class="code hl_struct" href="struct____packed__aligned.html" id="rpip200dd4ee3faa78f84e50">recursive_mutex_t</a> my_recursive_mutex;</div>
8354 <div class="line" id="rpipf6595f91c539f953e47e"> </div>
8355 <div class="line" id="rpip253d61d01b7a9a769e8a">
8356 <span class="keywordtype" id="rpip7b706e67d9c751df610f">void</span> my_init_function() {</div>
8357 <div class="line" id="rpipbb2760164b969d116d13"> <a class="code hl_function" href="#ga30d1f9d58564a1799e293451edc2d28e" id="rpipb055f00f2e70703770ec" data-adjusted="true">recursive_mutex_init</a>(&my_recursive_mutex);</div>
8358 <div class="line" id="rpipe39f01143124dcc138b8">}</div>
8359 <div class="ttc" id="agroup__mutex_html_ga30d1f9d58564a1799e293451edc2d28e">
8360 <div class="ttname" id="rpip7b502c2dbba39493b18c"><a href="#ga30d1f9d58564a1799e293451edc2d28e" id="rpip5665b40e2d25fa9eb5f8" data-adjusted="true">recursive_mutex_init</a></div>
8361 <div class="ttdeci" id="rpip1f7ede803f4961a71596">void recursive_mutex_init(recursive_mutex_t *mtx)</div>
8362 <div class="ttdoc" id="rpip8f3e1f779e77145707f3">Initialise a recursive mutex structure.</div>
8363 <div class="ttdef" id="rpip400ed8238a6866d79520">
8364 <b id="rpipbfa7515cdd221deb60fc">Definition:</b> mutex.c:19</div>
8366 <div class="ttc" id="astruct____packed__aligned_html">
8367 <div class="ttname" id="rpip265b8b818f898d209abb"><a href="struct____packed__aligned.html" id="rpip2069c90d7e4e753de7bc">__packed_aligned</a></div>
8368 <div class="ttdoc" id="rpipdd75a050215d02a2dce1">recursive mutex instance</div>
8369 <div class="ttdef" id="rpip03bd1254bc5eafdeb601">
8370 <b id="rpip3c814d3537cba8a60265">Definition:</b> mutex.h:47</div>
8374 <!-- fragment --><p id="rpip955b08881566c209c95c">But the initialization of the mutex is performed automatically during runtime initialization </p>
8381 <h4 id="rpip32e72d66ee4ceac450c4">
8382 <a class="anchor" href="#rpip32e72d66ee4ceac450c4"></a>Function Documentation</h4>
8383 <a id="ga0be65abf0782a68a724bd6d37fd5e010" name="ga0be65abf0782a68a724bd6d37fd5e010"></a>
8385 <h5 id="rpip7d04966d511a8bfa94a9">
8386 <a class="anchor" href="#rpip7d04966d511a8bfa94a9"></a>◆ critical_section_is_initialized()</h5>
8387 <div class="memitem" id="rpipa4cdb99aea90a0fae819">
8388 <div class="memproto" id="rpip98506050a352d3f13464">
8389 <table class="mlabels" id="rpipc53b8ddbb0a40108fb62">
8390 <tr id="rpipcd2a23dc226b60f1d055">
8391 <td class="mlabels-left" id="rpip76337b710ffcfa7b1abc">
8392 <table class="memname" id="rpipb81fcdd8304aae208aed">
8393 <tr id="rpipa830af5eead633fd64e1">
8394 <td class="memname" id="rpip7cdba9bed2afbc9adc9f">static bool critical_section_is_initialized </td>
8395 <td id="rpip887c5cf095d269462d5c">(</td>
8396 <td class="paramtype" id="rpip8cdb66c9bcbc8ac052b9">critical_section_t *Â </td>
8397 <td class="paramname" id="rpip243f1a75868d614f82cd"><em id="rpip439ae3bc68652d3035e5">crit_sec</em></td>
8398 <td id="rpip53e10fa4585be5cece3e">)</td>
8399 <td id="rpipc89eec987df297e61bbe"></td>
8403 <td class="mlabels-right" id="rpip4d5cd8c81583379da580">
8404 <span class="mlabels" id="rpip0115027fcb7c963a0062"><span class="mlabel" id="rpip90360b0119c9aeea7b38">inline</span><span class="mlabel" id="rpipf1bf60c2dd592428fd67">static</span></span> </td>
8408 <div class="memdoc" id="rpip20039c6d987c6d9a9c13">
8410 <p id="rpip1812d6e2f44edc0250c5">Test whether a <a class="el" href="structcritical__section.html" id="rpip847430067e16fa1421ed">critical_section</a> has been initialized. </p>
8411 <h4 id="rpipf72fecc4a4f487dd744f" data-parent-id="rpipf59ebf89aa04d5d6382f" data-target-for="rpipf72fecc4a4f487dd744f">Parameters</h4>
8412 <p class="paragraph" id="rpipb80fd7e70e2caf1069f2" data-parent-id="rpipf59ebf89aa04d5d6382f" data-target-for="rpipb80fd7e70e2caf1069f2">
8414 <table class="params" id="rpip21a1a6eb5be59107ce87">
8415 <tr id="rpip1b2e39049a0ae366aebe">
8416 <td class="paramname" id="rpip1c9b027013b43959f473">crit_sec</td>
8417 <td id="rpip0a0608fd9e6f855c7dd9">Pointer to <a class="el" href="structcritical__section.html" id="rpipc123f80c4b039e4e9ee2">critical_section</a> structure </td>
8423 <h4 class="label" id="rpip2499128cebec765abbde" data-parent-id="rpipb30b2d2bb30d1578b63f" data-target-for="rpip2499128cebec765abbde">Returns</h4>
8424 <p class="returns" id="rpip88af3a4db1bd237d971b" data-parent-id="rpipb30b2d2bb30d1578b63f" data-target-for="rpip88af3a4db1bd237d971b">true if the critical section is initialized, false otherwise </p>
8428 <a id="ga69e2f75f0a38378b20c0f2bf9cc7bbe3" name="ga69e2f75f0a38378b20c0f2bf9cc7bbe3"></a>
8431 <h5 id="rpip1b5d755a95e2f8192faa">
8432 <a class="anchor" href="#rpip1b5d755a95e2f8192faa"></a>◆ mutex_enter_block_until()</h5>
8433 <div class="memitem" id="rpip2c2a41cf88e91b4ae76f">
8434 <div class="memproto" id="rpipe9b944be37924ac5f7e1">
8435 <table class="memname" id="rpip406172d8a3fcea43aaf9">
8436 <tr id="rpip884948df771c22aaf30e">
8437 <td class="memname" id="rpip35398849456b4354eb0a">bool mutex_enter_block_until </td>
8438 <td id="rpip654e315ca82b015263d4">(</td>
8439 <td class="paramtype" id="rpipf48e99790c6825f09ab4">
8440 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip60d718c2929c9125e9d0" data-adjusted="true">mutex_t</a> *Â </td>
8441 <td class="paramname" id="rpipb0363f69f3e899955435">
8442 <em id="rpip1e51a0857697300f1e67">mtx</em>, </td>
8444 <tr id="rpip70fdcb9d29147556544f">
8445 <td class="paramkey" id="rpip8fa66077bfc1dec1bff4"></td>
8446 <td id="rpip22c630648dde3d1063e1"></td>
8447 <td class="paramtype" id="rpipba91ba976aa15881a645">
8448 <a class="el" href="structabsolute__time__t.html" id="rpipc171eb5f8a7c6a1f41ab">absolute_time_t</a>Â </td>
8449 <td class="paramname" id="rpip2a3b8daea3d8e661aae5">
8450 <em id="rpip1c0aa13fd5773773e81c">until</em>Â </td>
8452 <tr id="rpip287dda9077c4fae65977">
8453 <td id="rpip2b932a458294315886a6"></td>
8454 <td id="rpip8b5ca623ca870b140025">)</td>
8455 <td id="rpip3750021161ec307c0626"></td>
8456 <td id="rpip83218e9ab8d03ca76cef"></td>
8460 <div class="memdoc" id="rpipf0a298368449a5b6cc86">
8462 <p id="rpip0640ef9c66fa95ceb1e1">Wait for mutex until a specific time. </p>
8463 <p id="rpipd876495b06d123dc36a3">Wait until the specific time to take ownership of the mutex. If the caller can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
8464 <h4 id="rpip6e4a02508ca4abbfd935" data-parent-id="rpipb0d0c6a73c834f14ef4f" data-target-for="rpip6e4a02508ca4abbfd935">Parameters</h4>
8465 <p class="paragraph" id="rpip61c585d66a47d3aea04e" data-parent-id="rpipb0d0c6a73c834f14ef4f" data-target-for="rpip61c585d66a47d3aea04e">
8467 <table class="params" id="rpip010003ea49a76ae1bbde">
8468 <tr id="rpip0804f58872cc1d01facd">
8469 <td class="paramname" id="rpip1264cc2255cfc423b56c">mtx</td>
8470 <td id="rpip5af01683b2e57875a55f">Pointer to mutex structure </td>
8472 <tr id="rpip6198f021da3bfc1faa5c">
8473 <td class="paramname" id="rpipe9ddf5817bb6795a717e">until</td>
8474 <td id="rpip38dd968d15524438b1e9">The time after which to return if the caller cannot be granted ownership of the mutex </td>
8480 <h4 class="label" id="rpip58d43e4e59fd6cce60c4" data-parent-id="rpip6f9685deabb1088f4381" data-target-for="rpip58d43e4e59fd6cce60c4">Returns</h4>
8481 <p class="returns" id="rpip5c4c256d8a0a865d965b" data-parent-id="rpip6f9685deabb1088f4381" data-target-for="rpip5c4c256d8a0a865d965b">true if mutex now owned, false if timeout occurred before ownership could be granted </p>
8485 <a id="ga65b1c7af0545f478c80b51513d8f6993" name="ga65b1c7af0545f478c80b51513d8f6993"></a>
8488 <h5 id="rpipc07d9f71712bca0fdcfd">
8489 <a class="anchor" href="#rpipc07d9f71712bca0fdcfd"></a>◆ mutex_enter_blocking()</h5>
8490 <div class="memitem" id="rpip90cafee8ad63aa1bb94a">
8491 <div class="memproto" id="rpip7e71f4a2a3a95f44042b">
8492 <table class="memname" id="rpip74d8cf7d692eb886c43b">
8493 <tr id="rpip462c4e2a01f080ae325b">
8494 <td class="memname" id="rpip43dafba0de2f48941076">void mutex_enter_blocking </td>
8495 <td id="rpipaa5fbbbbc06f8328db00">(</td>
8496 <td class="paramtype" id="rpipce65df0ad6bf56fdb07d">
8497 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipa87d4cd433182e0198f1" data-adjusted="true">mutex_t</a> *Â </td>
8498 <td class="paramname" id="rpip9c601fce7c4d1e4c72d9"><em id="rpipc3cd8cfbfe5b67d48aa5">mtx</em></td>
8499 <td id="rpip97cac77864886fc059e7">)</td>
8500 <td id="rpip470c32dd18c1e17c432d"></td>
8504 <div class="memdoc" id="rpip5521ec5868e30a60e5d3">
8506 <p id="rpip5538ea0b8dfff0b2e20b">Take ownership of a mutex. </p>
8507 <p id="rpip71479bfd902e7da0f4c4">This function will block until the caller can be granted ownership of the mutex. On return the caller owns the mutex</p>
8508 <h4 id="rpip0dcf12806ff2161c6108" data-parent-id="rpipd4c87263d1cf23b0c23f" data-target-for="rpip0dcf12806ff2161c6108">Parameters</h4>
8509 <p class="paragraph" id="rpipe3245014ba713b4a31c6" data-parent-id="rpipd4c87263d1cf23b0c23f" data-target-for="rpipe3245014ba713b4a31c6">
8511 <table class="params" id="rpipba6cade5113370fc68cd">
8512 <tr id="rpip1a2fd062ca7af081ff0d">
8513 <td class="paramname" id="rpip05c2ed87d17676ab4f6e">mtx</td>
8514 <td id="rpip28eb3f28d17bb84b56ee">Pointer to mutex structure </td>
8523 <a id="ga32c6e468289a81a49b4bde50a6280f83" name="ga32c6e468289a81a49b4bde50a6280f83"></a>
8526 <h5 id="rpipecd5b624f0cd54761463">
8527 <a class="anchor" href="#rpipecd5b624f0cd54761463"></a>◆ mutex_enter_timeout_ms()</h5>
8528 <div class="memitem" id="rpipe1e1c77a033816e7541b">
8529 <div class="memproto" id="rpipdcf605054d2e00f58e24">
8530 <table class="memname" id="rpipbc54f5ad874675d42178">
8531 <tr id="rpip37a79dad12d1d357a212">
8532 <td class="memname" id="rpip44c61e1f2e24bb524f56">bool mutex_enter_timeout_ms </td>
8533 <td id="rpip23d76c54085a0a013350">(</td>
8534 <td class="paramtype" id="rpip988ff861d55f47063196">
8535 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip95666a92070c00b72738" data-adjusted="true">mutex_t</a> *Â </td>
8536 <td class="paramname" id="rpipbbbb60063259ba80e075">
8537 <em id="rpip464691ae1a7bfb48eca7">mtx</em>, </td>
8539 <tr id="rpipea754b400a481fa224f6">
8540 <td class="paramkey" id="rpipdb48a5c0e9695a81b4d8"></td>
8541 <td id="rpip3cd1154226300b82e2e0"></td>
8542 <td class="paramtype" id="rpip247354c594206dc69d6a">uint32_t </td>
8543 <td class="paramname" id="rpipcaa3f0053ca2c36e3199">
8544 <em id="rpip574defc5df7c1a362ef7">timeout_ms</em>Â </td>
8546 <tr id="rpip8cd81db3513826306b8d">
8547 <td id="rpip7c74d2484bf6e579bc8d"></td>
8548 <td id="rpip47d02abbaccb78f35372">)</td>
8549 <td id="rpip3acdb49fceea522a3beb"></td>
8550 <td id="rpipbefae98f8505fc247a07"></td>
8554 <div class="memdoc" id="rpip347160909b9bc6c9b646">
8556 <p id="rpip0f0b3f96d9d4e891fd00">Wait for mutex with timeout. </p>
8557 <p id="rpip62f70c69cf15f24c2cb6">Wait for up to the specific time to take ownership of the mutex. If the caller can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
8558 <h4 id="rpip1bf75a8ca2c08b5a8482" data-parent-id="rpipbb6c729e3ccd28bc0cc4" data-target-for="rpip1bf75a8ca2c08b5a8482">Parameters</h4>
8559 <p class="paragraph" id="rpip111d08ae7af656c117e1" data-parent-id="rpipbb6c729e3ccd28bc0cc4" data-target-for="rpip111d08ae7af656c117e1">
8561 <table class="params" id="rpipdf64c0d9fb1356163677">
8562 <tr id="rpipe3678f7f53f2adcc2248">
8563 <td class="paramname" id="rpipec3014a2244ddcd13c54">mtx</td>
8564 <td id="rpip1016762758d03b9f698e">Pointer to mutex structure </td>
8566 <tr id="rpip01ad30c3f86d2aaaa903">
8567 <td class="paramname" id="rpipb72c5e65ef40632faafb">timeout_ms</td>
8568 <td id="rpip8ec11a971fcca5601ea8">The timeout in milliseconds. </td>
8574 <h4 class="label" id="rpip51009f58bd532c070da3" data-parent-id="rpip0290e6b18825c6d462b4" data-target-for="rpip51009f58bd532c070da3">Returns</h4>
8575 <p class="returns" id="rpipb529f880e6d715a35b7b" data-parent-id="rpip0290e6b18825c6d462b4" data-target-for="rpipb529f880e6d715a35b7b">true if mutex now owned, false if timeout occurred before ownership could be granted </p>
8579 <a id="ga553f33e9692a19f8ad956a8b770858e0" name="ga553f33e9692a19f8ad956a8b770858e0"></a>
8582 <h5 id="rpipbb2d244fe5f9b2515ef9">
8583 <a class="anchor" href="#rpipbb2d244fe5f9b2515ef9"></a>◆ mutex_enter_timeout_us()</h5>
8584 <div class="memitem" id="rpip99807dfe31ea8279f682">
8585 <div class="memproto" id="rpip6e74bf2217f28edaa296">
8586 <table class="memname" id="rpip7aba0885fdd52de2506f">
8587 <tr id="rpipd24f2fad5b11e34cc60f">
8588 <td class="memname" id="rpipfff4d5e7b0050ace5cbe">bool mutex_enter_timeout_us </td>
8589 <td id="rpip688d7c2390bc0c37b7d9">(</td>
8590 <td class="paramtype" id="rpipcf99d2479377beebcbc1">
8591 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipd54e360c3fe4c86e352b" data-adjusted="true">mutex_t</a> *Â </td>
8592 <td class="paramname" id="rpipa605c1bc95213442167b">
8593 <em id="rpipc9e2e39b55bd86f24cf6">mtx</em>, </td>
8595 <tr id="rpip2331d91a911ce6fffd86">
8596 <td class="paramkey" id="rpip9a9c448c9d14cfd3bdf3"></td>
8597 <td id="rpip9cee2d70a9169e222797"></td>
8598 <td class="paramtype" id="rpipbebf5b0ee54f0a3600df">uint32_t </td>
8599 <td class="paramname" id="rpip2d105a9bb9de88294b72">
8600 <em id="rpip85cc2205127d01e4c41c">timeout_us</em>Â </td>
8602 <tr id="rpip3abf236d04e1b6213d70">
8603 <td id="rpip7578cfcf05e9cbb3b3a5"></td>
8604 <td id="rpip82e3b090bb439349c440">)</td>
8605 <td id="rpip311b3575b22187eed30c"></td>
8606 <td id="rpip1a1d5bd629d4112eaa0d"></td>
8610 <div class="memdoc" id="rpipd9f5b8357b05c9b03371">
8612 <p id="rpip8cd745071cce530f23d9">Wait for mutex with timeout. </p>
8613 <p id="rpipa5e9b2c730d0829138c0">Wait for up to the specific time to take ownership of the mutex. If the caller can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
8614 <h4 id="rpipfaac5d39a2666cb0ef46" data-parent-id="rpipf63536821e9435be8625" data-target-for="rpipfaac5d39a2666cb0ef46">Parameters</h4>
8615 <p class="paragraph" id="rpip57d32c9ae4facdd8d507" data-parent-id="rpipf63536821e9435be8625" data-target-for="rpip57d32c9ae4facdd8d507">
8617 <table class="params" id="rpip221b799c15d05d391e5d">
8618 <tr id="rpipd0485f7d7d91edcbdb9f">
8619 <td class="paramname" id="rpip2865cb193668bb0292f4">mtx</td>
8620 <td id="rpipc5d3b1508112ac8c9af4">Pointer to mutex structure </td>
8622 <tr id="rpipf61536361b4b496690b0">
8623 <td class="paramname" id="rpip98661b1188a23d8b46c6">timeout_us</td>
8624 <td id="rpipf7f7a12ef274bed45eba">The timeout in microseconds. </td>
8630 <h4 class="label" id="rpipf6c4675e655c9a90de36" data-parent-id="rpip56e0c608ef95b63530fb" data-target-for="rpipf6c4675e655c9a90de36">Returns</h4>
8631 <p class="returns" id="rpipfa011a7b846271ad0ecc" data-parent-id="rpip56e0c608ef95b63530fb" data-target-for="rpipfa011a7b846271ad0ecc">true if mutex now owned, false if timeout occurred before ownership could be granted </p>
8635 <a id="gaf528c8fbb5f4532758859d18e24e1673" name="gaf528c8fbb5f4532758859d18e24e1673"></a>
8638 <h5 id="rpip841ad295d2cb1d7454eb">
8639 <a class="anchor" href="#rpip841ad295d2cb1d7454eb"></a>◆ mutex_exit()</h5>
8640 <div class="memitem" id="rpip3a2054f87f411c9e7caf">
8641 <div class="memproto" id="rpip229a8f6c392e3a239c2a">
8642 <table class="memname" id="rpipb1adb959964010456db2">
8643 <tr id="rpipd33c59f79872f555cd48">
8644 <td class="memname" id="rpipe4a01e08082fd67dc29b">void mutex_exit </td>
8645 <td id="rpip274e58af9d44447ebaa1">(</td>
8646 <td class="paramtype" id="rpipa0ccec09616a7938e4db">
8647 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipcd6ed5e3fb8bfcc0ccaa" data-adjusted="true">mutex_t</a> *Â </td>
8648 <td class="paramname" id="rpipb56451e85602c3f8ef20"><em id="rpip9bfb511faf1cea99b04f">mtx</em></td>
8649 <td id="rpip13e63f08f961a291f384">)</td>
8650 <td id="rpipb5b398e75d60fb77f4a3"></td>
8654 <div class="memdoc" id="rpipc854386b82b5f56e4600">
8656 <p id="rpip1860c534e70860f6c9e4">Release ownership of a mutex. </p>
8657 <h4 id="rpip8731c503f231ab73643d" data-parent-id="rpip1d1ea7c89f1a79d20eca" data-target-for="rpip8731c503f231ab73643d">Parameters</h4>
8658 <p class="paragraph" id="rpip5ed58642804be4237a8d" data-parent-id="rpip1d1ea7c89f1a79d20eca" data-target-for="rpip5ed58642804be4237a8d">
8660 <table class="params" id="rpipa7bbdcee50ec155c9c41">
8661 <tr id="rpipb0f67a9d62a990dbbb88">
8662 <td class="paramname" id="rpip8a466048e5eb32fe07bc">mtx</td>
8663 <td id="rpip0fddb71013be8c6db20b">Pointer to mutex structure </td>
8672 <a id="gabe21d7ce624db2df7afe86c4bba400a2" name="gabe21d7ce624db2df7afe86c4bba400a2"></a>
8675 <h5 id="rpipda1de4919597496fa00a">
8676 <a class="anchor" href="#rpipda1de4919597496fa00a"></a>◆ mutex_init()</h5>
8677 <div class="memitem" id="rpiped4be2ec156f3f90f2a1">
8678 <div class="memproto" id="rpipceed1011f9be86bb87c6">
8679 <table class="memname" id="rpip8529a4fc885b4ef8084e">
8680 <tr id="rpip910f88d0d5d620026198">
8681 <td class="memname" id="rpip2563c10b305dc23326d5">void mutex_init </td>
8682 <td id="rpip10f8eb55d521b952c1db">(</td>
8683 <td class="paramtype" id="rpip5aa7b5a4de0805f53ebd">
8684 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip898956fb53b41041a2f4" data-adjusted="true">mutex_t</a> *Â </td>
8685 <td class="paramname" id="rpip120f0bf6e9813d023ba4"><em id="rpip2c8457831d03e7a00bf4">mtx</em></td>
8686 <td id="rpip3108bbdd38c420a6fe2d">)</td>
8687 <td id="rpip1cfe21b5794e096bc780"></td>
8691 <div class="memdoc" id="rpip9865707e8cba8b692aef">
8693 <p id="rpip213b4697e753e392495d">Initialise a mutex structure. </p>
8694 <h4 id="rpipe98357f1a86357b7195e" data-parent-id="rpip1b1e906fc5bc68f912bb" data-target-for="rpipe98357f1a86357b7195e">Parameters</h4>
8695 <p class="paragraph" id="rpip620db8d69efc4685a5d4" data-parent-id="rpip1b1e906fc5bc68f912bb" data-target-for="rpip620db8d69efc4685a5d4">
8697 <table class="params" id="rpipe72e99ab0dd218546a50">
8698 <tr id="rpip63bc6e6163e448918b2a">
8699 <td class="paramname" id="rpip454c5bc961ccac2719d9">mtx</td>
8700 <td id="rpip7334918e7f2cb55bb46a">Pointer to mutex structure </td>
8709 <a id="gae4b5ca3e872a6823f6580f1388b6585e" name="gae4b5ca3e872a6823f6580f1388b6585e"></a>
8712 <h5 id="rpipb530b103df8b7bd51d8e">
8713 <a class="anchor" href="#rpipb530b103df8b7bd51d8e"></a>◆ mutex_is_initialized()</h5>
8714 <div class="memitem" id="rpipb16f41c0c5bc89567041">
8715 <div class="memproto" id="rpipaa5eed174e8a0114ad32">
8716 <table class="mlabels" id="rpipbb7b3274540f91fc1d82">
8717 <tr id="rpip88a7728f50237e9e6f1b">
8718 <td class="mlabels-left" id="rpip1801636f7bdb462208c6">
8719 <table class="memname" id="rpipf6bcc10caddc50c373ba">
8720 <tr id="rpip7b92f5524fa319702d0c">
8721 <td class="memname" id="rpip461fc8488e901ed44ea3">static bool mutex_is_initialized </td>
8722 <td id="rpip4640ee9a566eba80a992">(</td>
8723 <td class="paramtype" id="rpipfce78b58ef7df9ce6e82">
8724 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpipa17367bf4af521c99fcd" data-adjusted="true">mutex_t</a> *Â </td>
8725 <td class="paramname" id="rpip9be4c05913f6f9102c2b"><em id="rpip10e425cf838f1fbd93d1">mtx</em></td>
8726 <td id="rpipa2404d8294b699e2f7d7">)</td>
8727 <td id="rpip6ccae90fe054ffbf6890"></td>
8731 <td class="mlabels-right" id="rpip7394fc278022fb63426d">
8732 <span class="mlabels" id="rpip5200fdabc9fb4431258c"><span class="mlabel" id="rpip542374743eac11aab185">inline</span><span class="mlabel" id="rpipa78ebb7fbf08a1740ea0">static</span></span> </td>
8736 <div class="memdoc" id="rpip3183b063d13e9d3ca024">
8738 <p id="rpip6d02346b49dbf4f56547">Test for mutex initialized state. </p>
8739 <h4 id="rpip670640dcb39566860392" data-parent-id="rpip237555e6065c78ef24b4" data-target-for="rpip670640dcb39566860392">Parameters</h4>
8740 <p class="paragraph" id="rpip0b66d3578abba65e1613" data-parent-id="rpip237555e6065c78ef24b4" data-target-for="rpip0b66d3578abba65e1613">
8742 <table class="params" id="rpipe20a761f72c4329645b8">
8743 <tr id="rpipda14bcb9233c7db5c133">
8744 <td class="paramname" id="rpip5108ac4b15dbddef873e">mtx</td>
8745 <td id="rpip23b43c39b496c6287221">Pointer to mutex structure </td>
8751 <h4 class="label" id="rpip65db5076c3a50918fd98" data-parent-id="rpipa56933f60b4a48926ac8" data-target-for="rpip65db5076c3a50918fd98">Returns</h4>
8752 <p class="returns" id="rpipb21c3fc082834dadb612" data-parent-id="rpipa56933f60b4a48926ac8" data-target-for="rpipb21c3fc082834dadb612">true if the mutex is initialized, false otherwise </p>
8756 <a id="gaa116de2f28fd7df8fb78b210e07b1ed4" name="gaa116de2f28fd7df8fb78b210e07b1ed4"></a>
8759 <h5 id="rpipa6043d223faa6e72d6d8">
8760 <a class="anchor" href="#rpipa6043d223faa6e72d6d8"></a>◆ mutex_try_enter()</h5>
8761 <div class="memitem" id="rpip97bc7b5be466783aaf72">
8762 <div class="memproto" id="rpip7e36e877dfb45465a50c">
8763 <table class="memname" id="rpip61f451cce81a31415ef6">
8764 <tr id="rpip560e158983cc35129d48">
8765 <td class="memname" id="rpip5f8df9f5f91d6a403deb">bool mutex_try_enter </td>
8766 <td id="rpip9e5a57198662f3a5e6da">(</td>
8767 <td class="paramtype" id="rpip4e91a1edec032d9a9087">
8768 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip3d6b6925fe04595c4168" data-adjusted="true">mutex_t</a> *Â </td>
8769 <td class="paramname" id="rpip5bc818f4e090217a55d8">
8770 <em id="rpip3abb72d8cd1f10e4f0df">mtx</em>, </td>
8772 <tr id="rpip18b07c1c18343c95c3d9">
8773 <td class="paramkey" id="rpip9330e55427d4398869d4"></td>
8774 <td id="rpip58ae3180a3c8ce196635"></td>
8775 <td class="paramtype" id="rpip748e458895b0579d3401">uint32_t *Â </td>
8776 <td class="paramname" id="rpipb93660df3a7e246a58fb">
8777 <em id="rpip8c55a04cb2a822136d91">owner_out</em>Â </td>
8779 <tr id="rpip9e904ae0c32e7b3e9af1">
8780 <td id="rpipdbb3ac7a59e16dfd0aa4"></td>
8781 <td id="rpip43f48b703edd13cc8665">)</td>
8782 <td id="rpipd616fc6ec8229745dc46"></td>
8783 <td id="rpip81b78311b6bd9b496d05"></td>
8787 <div class="memdoc" id="rpipa05c7c93a85339de7ad1">
8789 <p id="rpipaafb0f8fe258f4a7752f">Attempt to take ownership of a mutex. </p>
8790 <p id="rpipcca1aa51d04acec21008">If the mutex wasn't owned, this will claim the mutex for the caller and return true. Otherwise (if the mutex was already owned) this will return false and the caller will NOT own the mutex.</p>
8791 <h4 id="rpip456c911c37a1259004ed" data-parent-id="rpip81851b19cd9ef3cce152" data-target-for="rpip456c911c37a1259004ed">Parameters</h4>
8792 <p class="paragraph" id="rpip6f98a12a656cb2a9e6b7" data-parent-id="rpip81851b19cd9ef3cce152" data-target-for="rpip6f98a12a656cb2a9e6b7">
8794 <table class="params" id="rpip1840379650edde09026a">
8795 <tr id="rpipbc57157a3416b5c245f1">
8796 <td class="paramname" id="rpip1800796c7ed15a89e21e">mtx</td>
8797 <td id="rpip216dfcf4295bf80b8cae">Pointer to mutex structure </td>
8799 <tr id="rpip6d0d688bf5e501db153c">
8800 <td class="paramname" id="rpip25221af58c7133cb42b4">owner_out</td>
8801 <td id="rpipf8a753efe384bae21d04">If mutex was already owned, and this pointer is non-zero, it will be filled in with the owner id of the current owner of the mutex </td>
8807 <h4 class="label" id="rpip28331af0e541b9774537" data-parent-id="rpipf089cd6d64f0bf44b992" data-target-for="rpip28331af0e541b9774537">Returns</h4>
8808 <p class="returns" id="rpipc24819645519fa932499" data-parent-id="rpipf089cd6d64f0bf44b992" data-target-for="rpipc24819645519fa932499">true if mutex now owned, false otherwise </p>
8812 <a id="ga91088e6bd3929dcf86ed12cd92ee2cd8" name="ga91088e6bd3929dcf86ed12cd92ee2cd8"></a>
8815 <h5 id="rpip09ae52659d62c2b148b3">
8816 <a class="anchor" href="#rpip09ae52659d62c2b148b3"></a>◆ mutex_try_enter_block_until()</h5>
8817 <div class="memitem" id="rpip35a79e9659c113fd5afd">
8818 <div class="memproto" id="rpip7ee56b07093d46b23ed6">
8819 <table class="memname" id="rpipd238e37fcb7f823e4827">
8820 <tr id="rpipe9de8a259dc36ed4b7a1">
8821 <td class="memname" id="rpip915f8830d58e46ad8839">bool mutex_try_enter_block_until </td>
8822 <td id="rpip2051dadf5a2a94f826a2">(</td>
8823 <td class="paramtype" id="rpip3b8d46aa795cf79018d0">
8824 <a class="el" href="#gaa0676aca346799845ab75d3fb6d96ff6" id="rpip6e2e46428a7bf71a4308" data-adjusted="true">mutex_t</a> *Â </td>
8825 <td class="paramname" id="rpipfcd03c15f2222a00870d">
8826 <em id="rpipc4444dd2ac5550a9f350">mtx</em>, </td>
8828 <tr id="rpip47a386604eb3d1971c3d">
8829 <td class="paramkey" id="rpip15f572f991bcd2df9aef"></td>
8830 <td id="rpip49a3784b632d912463cf"></td>
8831 <td class="paramtype" id="rpipaffb22816d8a1c2129ad">
8832 <a class="el" href="structabsolute__time__t.html" id="rpipfaef2103f2f9a1fb3153">absolute_time_t</a>Â </td>
8833 <td class="paramname" id="rpipeba673aa015790e19d66">
8834 <em id="rpip69c8cb1bf009f207260a">until</em>Â </td>
8836 <tr id="rpip754ff310f444277b439e">
8837 <td id="rpip33a669602e214bdf984c"></td>
8838 <td id="rpip1ab9c4d41a8ab1779909">)</td>
8839 <td id="rpip984943ea7afda287fdff"></td>
8840 <td id="rpipd8d4d5ef47c4a03f4674"></td>
8844 <div class="memdoc" id="rpip5707a763dbba1630a117">
8846 <p id="rpipeda7d3d058a5f222b692">Attempt to take ownership of a mutex until the specified time. </p>
8847 <p id="rpip767bf593d2e715397a76">If the mutex wasn't owned, this method will immediately claim the mutex for the caller and return true. If the mutex is owned by the caller, this method will immediately return false, If the mutex is owned by someone else, this method will try to claim it until the specified time, returning true if it succeeds, or false on timeout</p>
8848 <h4 id="rpip291a82f6324afd067bb5" data-parent-id="rpip0de1816cf61e9f383fad" data-target-for="rpip291a82f6324afd067bb5">Parameters</h4>
8849 <p class="paragraph" id="rpip36ac852c4906a33bc1f7" data-parent-id="rpip0de1816cf61e9f383fad" data-target-for="rpip36ac852c4906a33bc1f7">
8851 <table class="params" id="rpip02c7329af9e9b375d5df">
8852 <tr id="rpipa4f12c3b6fff2229e46f">
8853 <td class="paramname" id="rpip3b133b50724841d44cb5">mtx</td>
8854 <td id="rpip1827c133e7e0e151b273">Pointer to mutex structure </td>
8856 <tr id="rpipd707e119debcb6c5d2f4">
8857 <td class="paramname" id="rpip145f6891ea9bdc7ae771">until</td>
8858 <td id="rpiped23aa27e5627254dfc8">The time after which to return if the caller cannot be granted ownership of the mutex </td>
8864 <h4 class="label" id="rpipb2b5079cc996b2ce628c" data-parent-id="rpipca7c9f13331723659951" data-target-for="rpipb2b5079cc996b2ce628c">Returns</h4>
8865 <p class="returns" id="rpip4844c280dccbfee22221" data-parent-id="rpipca7c9f13331723659951" data-target-for="rpip4844c280dccbfee22221">true if mutex now owned, false otherwise </p>
8869 <a id="ga6ce3ca26cbce71a3e29396264e00e253" name="ga6ce3ca26cbce71a3e29396264e00e253"></a>
8872 <h5 id="rpip81bbb04717bee46bd87f">
8873 <a class="anchor" href="#rpip81bbb04717bee46bd87f"></a>◆ recursive_mutex_enter_block_until()</h5>
8874 <div class="memitem" id="rpipde4fb2725202d1cf83da">
8875 <div class="memproto" id="rpipe65d782dc2631014d22e">
8876 <table class="memname" id="rpip5f748d754e9cbc072ed5">
8877 <tr id="rpip57f01cc1b243710b0537">
8878 <td class="memname" id="rpip3f0f50c4de95727d3df6">bool recursive_mutex_enter_block_until </td>
8879 <td id="rpipb48871e04554aa6f2a1a">(</td>
8880 <td class="paramtype" id="rpip0eb841d81720e26dc444">
8881 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip9dcefe1d203ed7ebf92c" data-adjusted="true">recursive_mutex_t</a> *Â </td>
8882 <td class="paramname" id="rpipd2fd8d791c24e9ad07fe">
8883 <em id="rpip5b5e2d0ec48e3ef86c6b">mtx</em>, </td>
8885 <tr id="rpip69626404edbcd339e188">
8886 <td class="paramkey" id="rpipb1b7666788ee538b9d25"></td>
8887 <td id="rpip6110ba0c41ebb357ea74"></td>
8888 <td class="paramtype" id="rpip4a4adccbe2040a4eb280">
8889 <a class="el" href="structabsolute__time__t.html" id="rpipbe1606fef01c7b51fb4a">absolute_time_t</a>Â </td>
8890 <td class="paramname" id="rpip30693a3fa6b5a29f2b9d">
8891 <em id="rpip788b1c991e32c56cfba2">until</em>Â </td>
8893 <tr id="rpip551aca5111ad576d80ad">
8894 <td id="rpip8e09641439b09b71271c"></td>
8895 <td id="rpip57b82b0fd64b25b954ef">)</td>
8896 <td id="rpip136985537ef8bd8a1e89"></td>
8897 <td id="rpipe81298b3e313dd9d9474"></td>
8901 <div class="memdoc" id="rpipb04fbdd3803abeeffd3e">
8903 <p id="rpipd62c511a9dfc459d7b0e">Wait for mutex until a specific time. </p>
8904 <p id="rpipd263f53adcc73c33f8ad">Wait until the specific time to take ownership of the mutex. If the caller already has ownership of the mutex or can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
8905 <h4 id="rpipe59da64202a9839ef776" data-parent-id="rpip959a88406c25f611f5d8" data-target-for="rpipe59da64202a9839ef776">Parameters</h4>
8906 <p class="paragraph" id="rpiped296564bf9390e59e23" data-parent-id="rpip959a88406c25f611f5d8" data-target-for="rpiped296564bf9390e59e23">
8908 <table class="params" id="rpipab6ddf18750b10374d28">
8909 <tr id="rpip0f6cd725a958f9983909">
8910 <td class="paramname" id="rpipc34656896c2c4879847c">mtx</td>
8911 <td id="rpip009a857d28968b00056e">Pointer to recursive mutex structure </td>
8913 <tr id="rpip621b7a9d1bc9708615d2">
8914 <td class="paramname" id="rpipb84bc632ecb266b1714f">until</td>
8915 <td id="rpip44b5c8a0102d09e47e4a">The time after which to return if the caller cannot be granted ownership of the mutex </td>
8921 <h4 class="label" id="rpipfa2ed433044be29e4933" data-parent-id="rpip008d3fa7b67a470868f1" data-target-for="rpipfa2ed433044be29e4933">Returns</h4>
8922 <p class="returns" id="rpip405229381009ad42336e" data-parent-id="rpip008d3fa7b67a470868f1" data-target-for="rpip405229381009ad42336e">true if the recursive mutex (now) owned, false if timeout occurred before ownership could be granted </p>
8926 <a id="gad11f3d954d96cfdc77025735d35983e1" name="gad11f3d954d96cfdc77025735d35983e1"></a>
8929 <h5 id="rpipa441203794c875fc2e85">
8930 <a class="anchor" href="#rpipa441203794c875fc2e85"></a>◆ recursive_mutex_enter_blocking()</h5>
8931 <div class="memitem" id="rpip0499181007f3b5b52d2e">
8932 <div class="memproto" id="rpip051a7c1fc0526e0d0520">
8933 <table class="memname" id="rpipf0ce563523a19d82e0a6">
8934 <tr id="rpip249426acf7d99ab54414">
8935 <td class="memname" id="rpipd9f590d69bb343d5de9d">void recursive_mutex_enter_blocking </td>
8936 <td id="rpip263cc11744372156f7e2">(</td>
8937 <td class="paramtype" id="rpip657ef7702e28244173ab">
8938 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipd101f6e703df43d8f2b1" data-adjusted="true">recursive_mutex_t</a> *Â </td>
8939 <td class="paramname" id="rpipe33d6d120ef8c655194f"><em id="rpip38ee7b68deced4b76697">mtx</em></td>
8940 <td id="rpip23e34eebae91a3180b2f">)</td>
8941 <td id="rpip460557f69cb570275937"></td>
8945 <div class="memdoc" id="rpipc35454e1b61ec1d3a8dd">
8947 <p id="rpip34706f8ace3644cbbe48">Take ownership of a recursive mutex. </p>
8948 <p id="rpip0247afaa25a5f661690f">This function will block until the caller can be granted ownership of the mutex. On return the caller owns the mutex</p>
8949 <h4 id="rpipa322256686c0d84d36d6" data-parent-id="rpipd4ede870f1e0fc918702" data-target-for="rpipa322256686c0d84d36d6">Parameters</h4>
8950 <p class="paragraph" id="rpip3f4e7e7427c105d5803b" data-parent-id="rpipd4ede870f1e0fc918702" data-target-for="rpip3f4e7e7427c105d5803b">
8952 <table class="params" id="rpipac4251dcc2cc608f6262">
8953 <tr id="rpip79b184d10d01cad2cbde">
8954 <td class="paramname" id="rpip710945cf9029205e9e6e">mtx</td>
8955 <td id="rpip1753d60b9613f7b2c093">Pointer to recursive mutex structure </td>
8964 <a id="gad54a0bdb7967571caecb62869bd4194d" name="gad54a0bdb7967571caecb62869bd4194d"></a>
8967 <h5 id="rpip788240063d2de937fc15">
8968 <a class="anchor" href="#rpip788240063d2de937fc15"></a>◆ recursive_mutex_enter_timeout_ms()</h5>
8969 <div class="memitem" id="rpip27dbf06bc3c7a15963a4">
8970 <div class="memproto" id="rpip7c3c50c02003f57bccd3">
8971 <table class="memname" id="rpipff798fbfbd57e9d82cc6">
8972 <tr id="rpip26277f396c5d17a89ce3">
8973 <td class="memname" id="rpip2bbc6a76ed1db4124e98">bool recursive_mutex_enter_timeout_ms </td>
8974 <td id="rpip3da311d7675c81ef4117">(</td>
8975 <td class="paramtype" id="rpip0f9fc6739b11385345e5">
8976 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipdf5e8bf7970530793210" data-adjusted="true">recursive_mutex_t</a> *Â </td>
8977 <td class="paramname" id="rpipcb11cc318838672934df">
8978 <em id="rpipa023494f4a57f568b2bb">mtx</em>, </td>
8980 <tr id="rpip43f592acb914c066d46a">
8981 <td class="paramkey" id="rpipbac1e12b772d9451b439"></td>
8982 <td id="rpip236a8f3ccb710180ac7a"></td>
8983 <td class="paramtype" id="rpip08f2a3af3439be25ea9f">uint32_t </td>
8984 <td class="paramname" id="rpip2e824e9e09b185648460">
8985 <em id="rpip4dc447408adf1a6fd38a">timeout_ms</em>Â </td>
8987 <tr id="rpip6f1b8dbb29a95adc2a90">
8988 <td id="rpip91c49338bb16d845c034"></td>
8989 <td id="rpipa5898bd109b2e2d50cf7">)</td>
8990 <td id="rpip896683caec549b00538f"></td>
8991 <td id="rpip6c278689bdc8420e3af8"></td>
8995 <div class="memdoc" id="rpip2c603068a691a83a8a10">
8997 <p id="rpip00835006d3b257ed5efb">Wait for recursive mutex with timeout. </p>
8998 <p id="rpip7654c5a65148c6270cab">Wait for up to the specific time to take ownership of the recursive mutex. If the caller already has ownership of the mutex or can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
8999 <h4 id="rpip41a1b6f0b4bb48295ec5" data-parent-id="rpip312ffde569ecf0570415" data-target-for="rpip41a1b6f0b4bb48295ec5">Parameters</h4>
9000 <p class="paragraph" id="rpip2a7a553bc16ef5b40d5c" data-parent-id="rpip312ffde569ecf0570415" data-target-for="rpip2a7a553bc16ef5b40d5c">
9002 <table class="params" id="rpip810da69bdb530a4f4846">
9003 <tr id="rpipc3d70e07c44689581fa3">
9004 <td class="paramname" id="rpip8e0594b3b1540d284e6e">mtx</td>
9005 <td id="rpipbfc7c709089ec54727ca">Pointer to recursive mutex structure </td>
9007 <tr id="rpipc9ff661b0db8d852758e">
9008 <td class="paramname" id="rpipaba70c4a3b98c2acb022">timeout_ms</td>
9009 <td id="rpip3f5aa643b4253fd53fcc">The timeout in milliseconds. </td>
9015 <h4 class="label" id="rpip12c80920dbcd05f82647" data-parent-id="rpip64ba3859e04296ff7738" data-target-for="rpip12c80920dbcd05f82647">Returns</h4>
9016 <p class="returns" id="rpip0c5ab6b09c72a965e25a" data-parent-id="rpip64ba3859e04296ff7738" data-target-for="rpip0c5ab6b09c72a965e25a">true if the recursive mutex (now) owned, false if timeout occurred before ownership could be granted </p>
9020 <a id="gaeeb630a7c13ed3adc567e62c8c737401" name="gaeeb630a7c13ed3adc567e62c8c737401"></a>
9023 <h5 id="rpip4c76426017705fb6e0c4">
9024 <a class="anchor" href="#rpip4c76426017705fb6e0c4"></a>◆ recursive_mutex_enter_timeout_us()</h5>
9025 <div class="memitem" id="rpipa453224a8d98ed40d48e">
9026 <div class="memproto" id="rpipc08d2ae5586ded90e659">
9027 <table class="memname" id="rpip01bba5915c55513c2788">
9028 <tr id="rpip14567dac337386b8deaf">
9029 <td class="memname" id="rpip62d549ca1861ba3f429c">bool recursive_mutex_enter_timeout_us </td>
9030 <td id="rpip206d1bb462af4a5568a2">(</td>
9031 <td class="paramtype" id="rpipaf1c73ef38aaa2083906">
9032 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip039aca9d8d7a03c9dfcd" data-adjusted="true">recursive_mutex_t</a> *Â </td>
9033 <td class="paramname" id="rpip3bcda1f18adb601b22ad">
9034 <em id="rpipa52880430cca8da80fc2">mtx</em>, </td>
9036 <tr id="rpip9615e1ccf99085a4773a">
9037 <td class="paramkey" id="rpipbdd7898b44038293080a"></td>
9038 <td id="rpip56bc8c0059855f1d3ba7"></td>
9039 <td class="paramtype" id="rpip85865c8d58573b2811f0">uint32_t </td>
9040 <td class="paramname" id="rpipdf8bd16496df4667eefd">
9041 <em id="rpipa5f2238e1a2b59b28e48">timeout_us</em>Â </td>
9043 <tr id="rpip9cb953897aa279188c3a">
9044 <td id="rpip51a5e465f3e94f76da1f"></td>
9045 <td id="rpipa6b5dc2a5d18d93dc7fa">)</td>
9046 <td id="rpip3b9abb9ab461248fdaf3"></td>
9047 <td id="rpip28a23284b3ff6feeaa2c"></td>
9051 <div class="memdoc" id="rpipfd41b51dfb7d66f28f94">
9053 <p id="rpip8bc89946f5cc6076fba0">Wait for recursive mutex with timeout. </p>
9054 <p id="rpip147142395280822c1c2c">Wait for up to the specific time to take ownership of the recursive mutex. If the caller already has ownership of the mutex or can be granted ownership of the mutex before the timeout expires, then true will be returned and the caller will own the mutex, otherwise false will be returned and the caller will NOT own the mutex.</p>
9055 <h4 id="rpipf0bd2929b32ccde1c3a7" data-parent-id="rpip9d1c4e0c4ba25c70aea6" data-target-for="rpipf0bd2929b32ccde1c3a7">Parameters</h4>
9056 <p class="paragraph" id="rpipfdd83afc6fffa67d3c1e" data-parent-id="rpip9d1c4e0c4ba25c70aea6" data-target-for="rpipfdd83afc6fffa67d3c1e">
9058 <table class="params" id="rpip839c4bb556accc7ce3d0">
9059 <tr id="rpipcc10b209669f53b7b98b">
9060 <td class="paramname" id="rpipf78c5bfa6ca6c0a66ab5">mtx</td>
9061 <td id="rpip8541b5a937b48a7dd8b0">Pointer to mutex structure </td>
9063 <tr id="rpip20667cacc72b3c81601c">
9064 <td class="paramname" id="rpip790553e4e15518848819">timeout_us</td>
9065 <td id="rpip37a06c360a13bae66478">The timeout in microseconds. </td>
9071 <h4 class="label" id="rpip96b16e8b46cf666b29df" data-parent-id="rpip7c16693f4d675a06ad6a" data-target-for="rpip96b16e8b46cf666b29df">Returns</h4>
9072 <p class="returns" id="rpip29c1ef58d0d3e533bc93" data-parent-id="rpip7c16693f4d675a06ad6a" data-target-for="rpip29c1ef58d0d3e533bc93">true if the recursive mutex (now) owned, false if timeout occurred before ownership could be granted </p>
9076 <a id="ga2f75321a04ba731f5875353fbaebc345" name="ga2f75321a04ba731f5875353fbaebc345"></a>
9079 <h5 id="rpip86a97aa50612930736b0">
9080 <a class="anchor" href="#rpip86a97aa50612930736b0"></a>◆ recursive_mutex_exit()</h5>
9081 <div class="memitem" id="rpip572e50becf34fe94285c">
9082 <div class="memproto" id="rpipd1cbe42cfed0899bf8f2">
9083 <table class="memname" id="rpipb747666e8415da985585">
9084 <tr id="rpipa619157d640afa4c3346">
9085 <td class="memname" id="rpip8e4f9781802a782b02e0">void recursive_mutex_exit </td>
9086 <td id="rpipf9c2c0bd6020775f6471">(</td>
9087 <td class="paramtype" id="rpip01600b923f25d8647d1c">
9088 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip6e638d1ee5fae1981b19" data-adjusted="true">recursive_mutex_t</a> *Â </td>
9089 <td class="paramname" id="rpipc4504c8016162bb61e28"><em id="rpip75bdeaad4c404e03d30e">mtx</em></td>
9090 <td id="rpip853028683a22add2b620">)</td>
9091 <td id="rpip414bc0a532405725cc0c"></td>
9095 <div class="memdoc" id="rpip4a24fdfeb038edeff25f">
9097 <p id="rpip36938cf04f5826624d56">Release ownership of a recursive mutex. </p>
9098 <h4 id="rpip9e31a1f1fb273c6ffe3d" data-parent-id="rpip82d0583925c654b2889b" data-target-for="rpip9e31a1f1fb273c6ffe3d">Parameters</h4>
9099 <p class="paragraph" id="rpipd9df6f00908fe3369faa" data-parent-id="rpip82d0583925c654b2889b" data-target-for="rpipd9df6f00908fe3369faa">
9101 <table class="params" id="rpip9337c63d31509489f7cf">
9102 <tr id="rpip297250af175b06936387">
9103 <td class="paramname" id="rpip83d255e443d35b3856c2">mtx</td>
9104 <td id="rpip4d7dddf9e65ddda98970">Pointer to recursive mutex structure </td>
9113 <a id="ga30d1f9d58564a1799e293451edc2d28e" name="ga30d1f9d58564a1799e293451edc2d28e"></a>
9116 <h5 id="rpip203f02f49feacaba3ece">
9117 <a class="anchor" href="#rpip203f02f49feacaba3ece"></a>◆ recursive_mutex_init()</h5>
9118 <div class="memitem" id="rpip740607baf4a70540d6ad">
9119 <div class="memproto" id="rpip1a8b129b6ee88e5640cd">
9120 <table class="memname" id="rpip829f97d78a1221198c64">
9121 <tr id="rpipef4e36752d8fe88c84b5">
9122 <td class="memname" id="rpip3b0fe17b2885f6229d17">void recursive_mutex_init </td>
9123 <td id="rpip84ee7d9fdf7286faa5af">(</td>
9124 <td class="paramtype" id="rpip201a920330815e15619b">
9125 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpipa14062e138e005022b6b" data-adjusted="true">recursive_mutex_t</a> *Â </td>
9126 <td class="paramname" id="rpipdcada0c51da734b58159"><em id="rpip233d8c913b4d7cd91aaf">mtx</em></td>
9127 <td id="rpipc56946602b5b4a0cbd22">)</td>
9128 <td id="rpip7030f9d40229a7e91167"></td>
9132 <div class="memdoc" id="rpipa31163e51f67f6067e1f">
9134 <p id="rpip3809ad4f1c0161dda523">Initialise a recursive mutex structure. </p>
9135 <p id="rpip4710ff461c172b070419">A recursive mutex may be entered in a nested fashion by the same owner</p>
9136 <h4 id="rpipee245312c176592180a4" data-parent-id="rpip94695200d2142adb1e44" data-target-for="rpipee245312c176592180a4">Parameters</h4>
9137 <p class="paragraph" id="rpipfb6573e043f429c89892" data-parent-id="rpip94695200d2142adb1e44" data-target-for="rpipfb6573e043f429c89892">
9139 <table class="params" id="rpip167b916091b5af78eb79">
9140 <tr id="rpipa8e5d7f2605b3218a803">
9141 <td class="paramname" id="rpip127da1e6784d2ae6d3c6">mtx</td>
9142 <td id="rpip6b434426067882d6d449">Pointer to recursive mutex structure </td>
9151 <a id="ga97e45154e86f0d206665bbce779d112d" name="ga97e45154e86f0d206665bbce779d112d"></a>
9154 <h5 id="rpip1b41cecc82c7c6ed4ced">
9155 <a class="anchor" href="#rpip1b41cecc82c7c6ed4ced"></a>◆ recursive_mutex_is_initialized()</h5>
9156 <div class="memitem" id="rpip7a4e470f561417d5717f">
9157 <div class="memproto" id="rpip0128c43b8ecd5dbc9df0">
9158 <table class="mlabels" id="rpip44db5b8361c0171cd41b">
9159 <tr id="rpip1e60e741b1378c190848">
9160 <td class="mlabels-left" id="rpipebf2e88b775a06aabbb8">
9161 <table class="memname" id="rpip6b2428bd431cc38bd2c4">
9162 <tr id="rpipdfc305c7c67b59ed1113">
9163 <td class="memname" id="rpipe2555c2378b79ef0f4ef">static bool recursive_mutex_is_initialized </td>
9164 <td id="rpip7cbadc52850cd2a915a0">(</td>
9165 <td class="paramtype" id="rpip547ba3c2a59b95a8d51e">
9166 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip574685cf624a455bc5f8" data-adjusted="true">recursive_mutex_t</a> *Â </td>
9167 <td class="paramname" id="rpip8aa0f557321172fba1eb"><em id="rpip01600b0a7e0ce962f1ca">mtx</em></td>
9168 <td id="rpip8ce28d3a03e6865a9400">)</td>
9169 <td id="rpip626d842d6151a0f475c5"></td>
9173 <td class="mlabels-right" id="rpipdab6eafdd88aa9931e7c">
9174 <span class="mlabels" id="rpipb15b728e7e5fc34a0d67"><span class="mlabel" id="rpip3b14fd9246cebf83aff2">inline</span><span class="mlabel" id="rpip6d7e15d71e1a5586a4d2">static</span></span> </td>
9178 <div class="memdoc" id="rpipadfab262d2e7d07db289">
9180 <p id="rpip24e229dcb88ce6c42a79">Test for recursive mutex initialized state. </p>
9181 <h4 id="rpip9fdbf2881ef72c6e8411" data-parent-id="rpip568561754586084ce50c" data-target-for="rpip9fdbf2881ef72c6e8411">Parameters</h4>
9182 <p class="paragraph" id="rpip1b476c7c930f5e9b625a" data-parent-id="rpip568561754586084ce50c" data-target-for="rpip1b476c7c930f5e9b625a">
9184 <table class="params" id="rpip5278e171e5de8c5445d7">
9185 <tr id="rpipb72037680d6862f2ca3a">
9186 <td class="paramname" id="rpip53217f9694fec016c0d9">mtx</td>
9187 <td id="rpipa54bac33bd35927cce21">Pointer to recursive mutex structure </td>
9193 <h4 class="label" id="rpip6c5d872453983016819d" data-parent-id="rpipc6bfabc3f39e336d8e53" data-target-for="rpip6c5d872453983016819d">Returns</h4>
9194 <p class="returns" id="rpip7d265b3605dfbdba512e" data-parent-id="rpipc6bfabc3f39e336d8e53" data-target-for="rpip7d265b3605dfbdba512e">true if the recursive mutex is initialized, false otherwise </p>
9198 <a id="gae431bbb90e45cf9ae47130a5635aa2b0" name="gae431bbb90e45cf9ae47130a5635aa2b0"></a>
9201 <h5 id="rpip2bbbd3bd6775f43944fa">
9202 <a class="anchor" href="#rpip2bbbd3bd6775f43944fa"></a>◆ recursive_mutex_try_enter()</h5>
9203 <div class="memitem" id="rpip07559dd514f5a03d90aa">
9204 <div class="memproto" id="rpip28bf8a694290be92af00">
9205 <table class="memname" id="rpip9ca653a89689fb422ba7">
9206 <tr id="rpipe12c22171e074797a7a1">
9207 <td class="memname" id="rpipf80e51403dd6acb05691">bool recursive_mutex_try_enter </td>
9208 <td id="rpip90752cf5db72202ba58a">(</td>
9209 <td class="paramtype" id="rpipa20ba0e2694b139f7a14">
9210 <a class="el" href="#gaaa26fc3b4f65c4764da7d9b2a7495cc2" id="rpip259ecc8e18ef5652fe62" data-adjusted="true">recursive_mutex_t</a> *Â </td>
9211 <td class="paramname" id="rpip6a03c8478f27529bdf41">
9212 <em id="rpip0ee41b966e3354b2a6ec">mtx</em>, </td>
9214 <tr id="rpip75c1366f5834cb97d8f3">
9215 <td class="paramkey" id="rpipc16fed02a40b52957ba1"></td>
9216 <td id="rpipd61a650ecb5286aa9d92"></td>
9217 <td class="paramtype" id="rpipf51c1fd65d67d25a0b0c">uint32_t *Â </td>
9218 <td class="paramname" id="rpip93ac149705024644b7b1">
9219 <em id="rpip153951395f4494521774">owner_out</em>Â </td>
9221 <tr id="rpip5b229ef8bc34803f3870">
9222 <td id="rpipbce83880f54f4dc3cc65"></td>
9223 <td id="rpipdf67cc44484d0fd51e96">)</td>
9224 <td id="rpip32c247b8b5c0c74a44f1"></td>
9225 <td id="rpip37b1ff1b710cdee6c313"></td>
9229 <div class="memdoc" id="rpip17f16a7ecacf59bdfa88">
9231 <p id="rpipd842fb3cf0c870b78856">Attempt to take ownership of a recursive mutex. </p>
9232 <p id="rpip6ecc04ab81ea225bc7e6">If the mutex wasn't owned or was owned by the caller, this will claim the mutex and return true. Otherwise (if the mutex was already owned by another owner) this will return false and the caller will NOT own the mutex.</p>
9233 <h4 id="rpip342a05e9ab288cd9f2b2" data-parent-id="rpip4b8b439bfd8638edbc98" data-target-for="rpip342a05e9ab288cd9f2b2">Parameters</h4>
9234 <p class="paragraph" id="rpipc909e784c15d615f2adc" data-parent-id="rpip4b8b439bfd8638edbc98" data-target-for="rpipc909e784c15d615f2adc">
9236 <table class="params" id="rpip9c6562c4ae6ccf392ec7">
9237 <tr id="rpip01acefd30f3900a9c0a9">
9238 <td class="paramname" id="rpipac25bc7291efbe44ab04">mtx</td>
9239 <td id="rpip49245efa983f61b1eb7e">Pointer to recursive mutex structure </td>
9241 <tr id="rpipd322ecfd152ed4677ba7">
9242 <td class="paramname" id="rpip58825075b85b6fc80cd5">owner_out</td>
9243 <td id="rpipa126d7ab13b761787165">If mutex was already owned by another owner, and this pointer is non-zero, it will be filled in with the owner id of the current owner of the mutex </td>
9249 <h4 class="label" id="rpipc19881b68a775dafc287" data-parent-id="rpip7b63a1c069c1f0f147c6" data-target-for="rpipc19881b68a775dafc287">Returns</h4>
9250 <p class="returns" id="rpip7e6de0383535513011f5" data-parent-id="rpip7b63a1c069c1f0f147c6" data-target-for="rpip7e6de0383535513011f5">true if the recursive mutex (now) owned, false otherwise </p>
9259 <a class="anchor" href="#sem"></a>sem</h3>
9260 <div class="ingroups" id="rpip1cb8a4e3358157a5647f">Part of: <a class="el" href="high_level.html" id="rpip1e07d29a7001e345f21d">High Level APIs</a> » <a class="el" href="high_level.html#pico_sync" id="rpipd0928e692e12011a4e09">pico_sync</a>
9262 <p id="rpipa9f58493d88c5a47c3f6">Semaphore API for restricting access to a resource.
9263 <a href="#ga1f15b8de9fb3a863e193" id="rpip76ff1c8794a2da20fcb1" data-adjusted="true">More...</a></p>
9265 <h4 id="rpipb3d9de01ef188098e7d0">
9266 <a class="anchor" href="#rpipb3d9de01ef188098e7d0"></a>Functions</h4>
9267 <ul class="memberdecls" id="rpip3f0041db02240227cc19" data-parent-id="rpip7112ca1468916162cca7">
9268 <li class="memitem">
9269 <p data-target="true" data-target-for="rpip3f0041db02240227cc19"><span class="memItemLeft" data-target="true" id="rpipe5c87522492d10cff2e2" data-parent-id="rpip3f0041db02240227cc19" data-target-for="rpipe5c87522492d10cff2e2">void </span><span class="memItemRight" data-target="true" id="rpip80006a696895aea878d1" data-parent-id="rpip3f0041db02240227cc19" data-target-for="rpip80006a696895aea878d1"><a class="el" href="#gab4e56b5ccfacafd2fb17765e702a21ba" id="rpip6b9d61484c3321fa9c16" data-adjusted="true">sem_init</a> (semaphore_t *sem, int16_t initial_permits, int16_t max_permits)</span></p>
9271 <li class="memdesc">
9272 <p data-target="true" data-target-for="rpip98157a0df8a9142f6fa7"><span class="mdescLeft" data-target="true" id="rpip5bbef7cf68a941924f5b" data-parent-id="rpip98157a0df8a9142f6fa7" data-target-for="rpip5bbef7cf68a941924f5b">Â </span><span class="mdescRight" data-target="true" id="rpip020f356761262b1172b8" data-parent-id="rpip98157a0df8a9142f6fa7" data-target-for="rpip020f356761262b1172b8">Initialise a semaphore structure. <br id="rpip113157487b91837d9976"></span></p>
9274 <li class="memitem">
9275 <p data-target="true" data-target-for="rpipe2b7e86bd48be6a07f93"><span class="memItemLeft" data-target="true" id="rpip06d7a2c8b20dfcc4c17c" data-parent-id="rpipe2b7e86bd48be6a07f93" data-target-for="rpip06d7a2c8b20dfcc4c17c">int </span><span class="memItemRight" data-target="true" id="rpip91ae7956fb6ad6ed6c7a" data-parent-id="rpipe2b7e86bd48be6a07f93" data-target-for="rpip91ae7956fb6ad6ed6c7a"><a class="el" href="#gad9e065ef0c0e59309f9bdb5fb74bb7c1" id="rpip6cb9566ca0e2e40ed104" data-adjusted="true">sem_available</a> (semaphore_t *sem)</span></p>
9277 <li class="memdesc">
9278 <p data-target="true" data-target-for="rpipb28ecd771c3d3be737fb"><span class="mdescLeft" data-target="true" id="rpip710b1e9e1f39ea3cb777" data-parent-id="rpipb28ecd771c3d3be737fb" data-target-for="rpip710b1e9e1f39ea3cb777">Â </span><span class="mdescRight" data-target="true" id="rpip398f08a43d2347162d5b" data-parent-id="rpipb28ecd771c3d3be737fb" data-target-for="rpip398f08a43d2347162d5b">Return number of available permits on the semaphore. <br id="rpip76015fc2b7f8f6505c05"></span></p>
9280 <li class="memitem">
9281 <p data-target="true" data-target-for="rpipba1e5707a50341cd0c11"><span class="memItemLeft" data-target="true" id="rpip271c06c0156f873c0162" data-parent-id="rpipba1e5707a50341cd0c11" data-target-for="rpip271c06c0156f873c0162">bool </span><span class="memItemRight" data-target="true" id="rpip0c694152b815d75577c9" data-parent-id="rpipba1e5707a50341cd0c11" data-target-for="rpip0c694152b815d75577c9"><a class="el" href="#gaeac89066f5fdbde0c7db2718464dcbde" id="rpip50cc46505126b3091a7a" data-adjusted="true">sem_release</a> (semaphore_t *sem)</span></p>
9283 <li class="memdesc">
9284 <p data-target="true" data-target-for="rpip8095a278439184e1ca06"><span class="mdescLeft" data-target="true" id="rpip1db5245dadebdc96e6b0" data-parent-id="rpip8095a278439184e1ca06" data-target-for="rpip1db5245dadebdc96e6b0">Â </span><span class="mdescRight" data-target="true" id="rpipffa708f3ea63c4cc036b" data-parent-id="rpip8095a278439184e1ca06" data-target-for="rpipffa708f3ea63c4cc036b">Release a permit on a semaphore. <br id="rpip3fc315a39bd7b767f28a"></span></p>
9286 <li class="memitem">
9287 <p data-target="true" data-target-for="rpip8df4c65964c18d6214b6"><span class="memItemLeft" data-target="true" id="rpipc2b4d4a8f6eb03871b87" data-parent-id="rpip8df4c65964c18d6214b6" data-target-for="rpipc2b4d4a8f6eb03871b87">void </span><span class="memItemRight" data-target="true" id="rpip50022409a4bed16ee951" data-parent-id="rpip8df4c65964c18d6214b6" data-target-for="rpip50022409a4bed16ee951"><a class="el" href="#gab6c128952e4981a95ce2e2d093a8a3ba" id="rpip3130b2316e8a56d77db7" data-adjusted="true">sem_reset</a> (semaphore_t *sem, int16_t permits)</span></p>
9289 <li class="memdesc">
9290 <p data-target="true" data-target-for="rpip5358af8c871f5f6c0ad4"><span class="mdescLeft" data-target="true" id="rpipad319e6df5b49c9dc620" data-parent-id="rpip5358af8c871f5f6c0ad4" data-target-for="rpipad319e6df5b49c9dc620">Â </span><span class="mdescRight" data-target="true" id="rpipc62ff5bad4678e52da35" data-parent-id="rpip5358af8c871f5f6c0ad4" data-target-for="rpipc62ff5bad4678e52da35">Reset semaphore to a specific number of available permits. <br id="rpipff40c7992f12fce5ffca"></span></p>
9292 <li class="memitem">
9293 <p data-target="true" data-target-for="rpipc438ace302d05e8b91e5"><span class="memItemLeft" data-target="true" id="rpipef48f0df8a02240d3c99" data-parent-id="rpipc438ace302d05e8b91e5" data-target-for="rpipef48f0df8a02240d3c99">void </span><span class="memItemRight" data-target="true" id="rpipfe6a33df19adfbd34a0c" data-parent-id="rpipc438ace302d05e8b91e5" data-target-for="rpipfe6a33df19adfbd34a0c"><a class="el" href="#gaefa22667355703497ae883f68a87aacf" id="rpip7523f2f69738e788a2bf" data-adjusted="true">sem_acquire_blocking</a> (semaphore_t *sem)</span></p>
9295 <li class="memdesc">
9296 <p data-target="true" data-target-for="rpip7094569878f5c5ccf64b"><span class="mdescLeft" data-target="true" id="rpip14e37197eacf60e1e96b" data-parent-id="rpip7094569878f5c5ccf64b" data-target-for="rpip14e37197eacf60e1e96b">Â </span><span class="mdescRight" data-target="true" id="rpip262edcae62bf9a86e50d" data-parent-id="rpip7094569878f5c5ccf64b" data-target-for="rpip262edcae62bf9a86e50d">Acquire a permit from the semaphore. <br id="rpipe35b0d8cb80cc26a92bc"></span></p>
9298 <li class="memitem">
9299 <p data-target="true" data-target-for="rpipeb7d97c2e24d4455f87b"><span class="memItemLeft" data-target="true" id="rpip41c0955822949ddb7105" data-parent-id="rpipeb7d97c2e24d4455f87b" data-target-for="rpip41c0955822949ddb7105">bool </span><span class="memItemRight" data-target="true" id="rpip666158932c17d18e6285" data-parent-id="rpipeb7d97c2e24d4455f87b" data-target-for="rpip666158932c17d18e6285"><a class="el" href="#ga38275bfc4c00e5039028f58860709610" id="rpipbd77b5c44591f21e3c73" data-adjusted="true">sem_acquire_timeout_ms</a> (semaphore_t *sem, uint32_t timeout_ms)</span></p>
9301 <li class="memdesc">
9302 <p data-target="true" data-target-for="rpipa018d1b0746dd52fea33"><span class="mdescLeft" data-target="true" id="rpipd453e9a1bbc4aabd72ea" data-parent-id="rpipa018d1b0746dd52fea33" data-target-for="rpipd453e9a1bbc4aabd72ea">Â </span><span class="mdescRight" data-target="true" id="rpip39fe31370a2d967e5f33" data-parent-id="rpipa018d1b0746dd52fea33" data-target-for="rpip39fe31370a2d967e5f33">Acquire a permit from a semaphore, with timeout. <br id="rpip352858e19ac47bb0fe33"></span></p>
9304 <li class="memitem">
9305 <p data-target="true" data-target-for="rpip4572362a6615db77c98d"><span class="memItemLeft" data-target="true" id="rpip98db8344bb9a43eea9db" data-parent-id="rpip4572362a6615db77c98d" data-target-for="rpip98db8344bb9a43eea9db">bool </span><span class="memItemRight" data-target="true" id="rpip6ba54e6c229ecccd6892" data-parent-id="rpip4572362a6615db77c98d" data-target-for="rpip6ba54e6c229ecccd6892"><a class="el" href="#ga0f5a509fb132e8e764795a66773500ad" id="rpipc17dcba6266832789a9e" data-adjusted="true">sem_acquire_timeout_us</a> (semaphore_t *sem, uint32_t timeout_us)</span></p>
9307 <li class="memdesc">
9308 <p data-target="true" data-target-for="rpip7dacffd9636fd731d5c4"><span class="mdescLeft" data-target="true" id="rpip27b1be8799612c1e9af8" data-parent-id="rpip7dacffd9636fd731d5c4" data-target-for="rpip27b1be8799612c1e9af8">Â </span><span class="mdescRight" data-target="true" id="rpip2c1556361fa0cd6cbe07" data-parent-id="rpip7dacffd9636fd731d5c4" data-target-for="rpip2c1556361fa0cd6cbe07">Acquire a permit from a semaphore, with timeout. <br id="rpip3aaf0c5734c559e7c200"></span></p>
9310 <li class="memitem">
9311 <p data-target="true" data-target-for="rpipf3e47f2cb8040d60e624"><span class="memItemLeft" data-target="true" id="rpip818e5efc599c4610cd4a" data-parent-id="rpipf3e47f2cb8040d60e624" data-target-for="rpip818e5efc599c4610cd4a">bool </span><span class="memItemRight" data-target="true" id="rpip982147b91bd7341b7f57" data-parent-id="rpipf3e47f2cb8040d60e624" data-target-for="rpip982147b91bd7341b7f57"><a class="el" href="#ga4410f17fc2f35b91e5bcfaf18bcf26ae" id="rpip47cb5c17edb98272d4b8" data-adjusted="true">sem_acquire_block_until</a> (semaphore_t *sem, <a class="el" href="structabsolute__time__t.html" id="rpipb4da72e413d96326e8a1">absolute_time_t</a> until)</span></p>
9313 <li class="memdesc">
9314 <p data-target="true" data-target-for="rpipdf20f3183e4a5395be4f"><span class="mdescLeft" data-target="true" id="rpipec918db13b2e5afbed68" data-parent-id="rpipdf20f3183e4a5395be4f" data-target-for="rpipec918db13b2e5afbed68">Â </span><span class="mdescRight" data-target="true" id="rpipc7a54af7459899286b9e" data-parent-id="rpipdf20f3183e4a5395be4f" data-target-for="rpipc7a54af7459899286b9e">Wait to acquire a permit from a semaphore until a specific time. <br id="rpipcf4ce181d2823a53f521"></span></p>
9316 <li class="memitem">
9317 <p data-target="true" data-target-for="rpipd137df40629c15a77703"><span class="memItemLeft" data-target="true" id="rpip5f35060d6ed025e0df69" data-parent-id="rpipd137df40629c15a77703" data-target-for="rpip5f35060d6ed025e0df69">bool </span><span class="memItemRight" data-target="true" id="rpipf8ce99488709529eb8fa" data-parent-id="rpipd137df40629c15a77703" data-target-for="rpipf8ce99488709529eb8fa"><a class="el" href="#ga25b473ab6f287e4a6a0c9d0288a0a497" id="rpip63d750cff95db480cec4" data-adjusted="true">sem_try_acquire</a> (semaphore_t *sem)</span></p>
9319 <li class="memdesc">
9320 <p data-target="true" data-target-for="rpipf236cff8557ce1cccd68"><span class="mdescLeft" data-target="true" id="rpip4d2400b6ec04bcdf169d" data-parent-id="rpipf236cff8557ce1cccd68" data-target-for="rpip4d2400b6ec04bcdf169d">Â </span><span class="mdescRight" data-target="true" id="rpipf55b9f0802ed1058cb79" data-parent-id="rpipf236cff8557ce1cccd68" data-target-for="rpipf55b9f0802ed1058cb79">Attempt to acquire a permit from a semaphore without blocking. <br id="rpipdd29d83791f3d08c27ba"></span></p>
9323 <a name="details" id="ga1f15b8de9fb3a863e193"></a>
9326 <h4 id="rpipe5dd94ca4fb7e206a037">
9327 <a class="anchor" href="#rpipe5dd94ca4fb7e206a037"></a>Detailed Description</h4>
9328 <p id="rpip6ffd57493353c174108b">Semaphore API for restricting access to a resource. </p>
9329 <p id="rpipe69bbd7f1bbb50b6ba7e">A semaphore holds a number of available permits. <code id="rpip40e116ca8ae33240b327">sem_acquire</code> methods will acquire a permit if available (reducing the available count by 1) or block if the number of available permits is 0. <a class="el" href="#gaeac89066f5fdbde0c7db2718464dcbde" id="rpip11e848d66e5f4a68cb40" data-adjusted="true">sem_release()</a> increases the number of available permits by one potentially unblocking a <code id="rpipecff59613f45fae00202">sem_acquire</code> method.</p>
9330 <p id="rpipbe9a2920f66b9d471a87">Note that <a class="el" href="#gaeac89066f5fdbde0c7db2718464dcbde" id="rpip11f47167458174f94abf" data-adjusted="true">sem_release()</a> may be called an arbitrary number of times, however the number of available permits is capped to the max_permit value specified during semaphore initialization.</p>
9331 <p id="rpipeebb76adca5d40562180">Although these semaphore related functions can be used from IRQ handlers, it is obviously preferable to only release semaphores from within an IRQ handler (i.e. avoid blocking) </p>
9334 <h4 id="rpip55860353bd5df72062b4">
9335 <a class="anchor" href="#rpip55860353bd5df72062b4"></a>Function Documentation</h4>
9336 <a id="ga4410f17fc2f35b91e5bcfaf18bcf26ae" name="ga4410f17fc2f35b91e5bcfaf18bcf26ae"></a>
9338 <h5 id="rpipcb9edabd9d14bb60b6ba">
9339 <a class="anchor" href="#rpipcb9edabd9d14bb60b6ba"></a>◆ sem_acquire_block_until()</h5>
9340 <div class="memitem" id="rpip58ad11349315c330b98e">
9341 <div class="memproto" id="rpip04abe4aee434b195cd62">
9342 <table class="memname" id="rpipc99ce7b5b1897fd8b0e1">
9343 <tr id="rpip65539a317ccb33e3d770">
9344 <td class="memname" id="rpip9d6c2a73a42dfd994eb8">bool sem_acquire_block_until </td>
9345 <td id="rpip1956ce7a8ee7c36f6fb3">(</td>
9346 <td class="paramtype" id="rpip8983f4831de7dcf66b1b">semaphore_t *Â </td>
9347 <td class="paramname" id="rpip6ca552c663387160d0d1">
9348 <em id="rpip88786d711981abf8b7cc">sem</em>, </td>
9350 <tr id="rpipeaf3d326146d686eeaee">
9351 <td class="paramkey" id="rpipf96b4cfbe0384203d4ab"></td>
9352 <td id="rpip9b043a474c1747ef5546"></td>
9353 <td class="paramtype" id="rpipd92f85bfa23f4d288400">
9354 <a class="el" href="structabsolute__time__t.html" id="rpipa82f03cc99ef3fe723a2">absolute_time_t</a>Â </td>
9355 <td class="paramname" id="rpip0195486fbcb30deba62d">
9356 <em id="rpip3e7cddddcd6822bb0847">until</em>Â </td>
9358 <tr id="rpip2495fcafb6c4421e799f">
9359 <td id="rpipdf83e4e54257863ded2b"></td>
9360 <td id="rpip536715b44a7a125a11ed">)</td>
9361 <td id="rpip4a17c1966a1510a15ab8"></td>
9362 <td id="rpip1deed026b8c4640a6a06"></td>
9366 <div class="memdoc" id="rpip7d3d09f9a0ff707bf5d6">
9368 <p id="rpipbf84f17b8e8e28d09163">Wait to acquire a permit from a semaphore until a specific time. </p>
9369 <p id="rpip84f7a8306b6280a6836e">This function will block and wait if no permits are available, until the specified timeout time. If the timeout is reached the function will return false, otherwise it will return true.</p>
9370 <h4 id="rpipd2ada7e3fb3e6290c06b" data-parent-id="rpipee8a6edbbd7a3e31c6d1" data-target-for="rpipd2ada7e3fb3e6290c06b">Parameters</h4>
9371 <p class="paragraph" id="rpip8e0cdbb24d9d4f4d5a4d" data-parent-id="rpipee8a6edbbd7a3e31c6d1" data-target-for="rpip8e0cdbb24d9d4f4d5a4d">
9373 <table class="params" id="rpipa958f6601c6234f35a50">
9374 <tr id="rpip07c50d25b4f029be1e55">
9375 <td class="paramname" id="rpip6c8ec02df579fb613579">sem</td>
9376 <td id="rpipf5bc79fdb0c9f719dfcc">Pointer to semaphore structure </td>
9378 <tr id="rpip54fe604dbcf89d9ecd3f">
9379 <td class="paramname" id="rpipf46a2de405ef6f2f2d49">until</td>
9380 <td id="rpipc3775c603266faff2d50">The time after which to return if the sem is not available. </td>
9386 <h4 class="label" id="rpip26567c221a37040783f8" data-parent-id="rpip0468e2781ff5ce6ba464" data-target-for="rpip26567c221a37040783f8">Returns</h4>
9387 <p class="returns" id="rpip80dfa4e2f6dbb988e6c7" data-parent-id="rpip0468e2781ff5ce6ba464" data-target-for="rpip80dfa4e2f6dbb988e6c7">true if permit was acquired, false if the until time was reached before acquiring. </p>
9391 <a id="gaefa22667355703497ae883f68a87aacf" name="gaefa22667355703497ae883f68a87aacf"></a>
9394 <h5 id="rpip2f8e9cee44504c958624">
9395 <a class="anchor" href="#rpip2f8e9cee44504c958624"></a>◆ sem_acquire_blocking()</h5>
9396 <div class="memitem" id="rpipcfa6717f98f1f6311c7f">
9397 <div class="memproto" id="rpipe7c583963f65b600c86f">
9398 <table class="memname" id="rpip12ff2400851f2f563cc6">
9399 <tr id="rpip57bb3ad7dfefeb896eca">
9400 <td class="memname" id="rpipd0a4780efa9621bd5024">void sem_acquire_blocking </td>
9401 <td id="rpipeefe95c60fa8619aeaf1">(</td>
9402 <td class="paramtype" id="rpipe1e36733033a48ca6d9f">semaphore_t *Â </td>
9403 <td class="paramname" id="rpip1a00cb6ffcf402629e8e"><em id="rpip01da7fcc09eb51c481b7">sem</em></td>
9404 <td id="rpipa29ce810530c44d120c2">)</td>
9405 <td id="rpip2f6195795fe50aa57285"></td>
9409 <div class="memdoc" id="rpipd3ef7d2b05a17fa9cc0c">
9411 <p id="rpipec2436484ac9f9d3d7c5">Acquire a permit from the semaphore. </p>
9412 <p id="rpipaca6dd6665313463f464">This function will block and wait if no permits are available.</p>
9413 <h4 id="rpip29b7f44f6520da196c77" data-parent-id="rpip32813b1422173d03f710" data-target-for="rpip29b7f44f6520da196c77">Parameters</h4>
9414 <p class="paragraph" id="rpipce27822194274c508e3f" data-parent-id="rpip32813b1422173d03f710" data-target-for="rpipce27822194274c508e3f">
9416 <table class="params" id="rpip73723b21b76b4c6c0225">
9417 <tr id="rpipba518bdae9cf240dcc47">
9418 <td class="paramname" id="rpipb050566f458ed4c4d6d6">sem</td>
9419 <td id="rpip5eac9b85bd5c9d3bbe0e">Pointer to semaphore structure </td>
9428 <a id="ga38275bfc4c00e5039028f58860709610" name="ga38275bfc4c00e5039028f58860709610"></a>
9431 <h5 id="rpipe8434200436ac578c28b">
9432 <a class="anchor" href="#rpipe8434200436ac578c28b"></a>◆ sem_acquire_timeout_ms()</h5>
9433 <div class="memitem" id="rpip4f5fff0aed70c4d59456">
9434 <div class="memproto" id="rpipddba687eb4eaa9afb6f7">
9435 <table class="memname" id="rpip372995a02c9ee2f45dbd">
9436 <tr id="rpip296ae7bd35ebac163c2d">
9437 <td class="memname" id="rpipfa24659755d7c38f14e6">bool sem_acquire_timeout_ms </td>
9438 <td id="rpip8d00d4ed3c085603b56f">(</td>
9439 <td class="paramtype" id="rpipfce89bf1ed08b54e7a84">semaphore_t *Â </td>
9440 <td class="paramname" id="rpip6538122dc325d4a6054b">
9441 <em id="rpipadd3a23de07ab7016b3f">sem</em>, </td>
9443 <tr id="rpipe5d713b22bb4316efe4a">
9444 <td class="paramkey" id="rpip2eee8855831641c6795d"></td>
9445 <td id="rpip9f3e0b3329553819b7e5"></td>
9446 <td class="paramtype" id="rpipcef8ed0f15b4fe824c4b">uint32_t </td>
9447 <td class="paramname" id="rpipef7517875acef847a86d">
9448 <em id="rpipbbdd8f90d2c70cc07a19">timeout_ms</em>Â </td>
9450 <tr id="rpipbda5ba21edc9342ee7d6">
9451 <td id="rpip56dd3040fad879f266cc"></td>
9452 <td id="rpipe0567eade3658b162421">)</td>
9453 <td id="rpipf806ce134597c7360573"></td>
9454 <td id="rpipcf35d8ad60418d4d7a56"></td>
9458 <div class="memdoc" id="rpip2885df69ac9c8957d070">
9460 <p id="rpip7c0ab8158690c5ed6793">Acquire a permit from a semaphore, with timeout. </p>
9461 <p id="rpip50cc9428a2fddae821c5">This function will block and wait if no permits are available, until the defined timeout has been reached. If the timeout is reached the function will return false, otherwise it will return true.</p>
9462 <h4 id="rpip72428ce2518bb42e8009" data-parent-id="rpipe564ced090c2f32638f7" data-target-for="rpip72428ce2518bb42e8009">Parameters</h4>
9463 <p class="paragraph" id="rpip5d5606f21d31f46ce041" data-parent-id="rpipe564ced090c2f32638f7" data-target-for="rpip5d5606f21d31f46ce041">
9465 <table class="params" id="rpipc210c8fa8474cb37a602">
9466 <tr id="rpip9104f066a8af5ed52d16">
9467 <td class="paramname" id="rpipc6b00f1874680b3c0cdd">sem</td>
9468 <td id="rpip087f4011431be54fb522">Pointer to semaphore structure </td>
9470 <tr id="rpipa8dd773d01b5195340a7">
9471 <td class="paramname" id="rpipc80a1a2a78870d3c94cf">timeout_ms</td>
9472 <td id="rpip0e09d61c8b6a1b3980e0">Time to wait to acquire the semaphore, in milliseconds. </td>
9478 <h4 class="label" id="rpip64317aec9f4e3b95529c" data-parent-id="rpip252ff33b40ef9b9500e8" data-target-for="rpip64317aec9f4e3b95529c">Returns</h4>
9479 <p class="returns" id="rpipb75ff067d50393047af9" data-parent-id="rpip252ff33b40ef9b9500e8" data-target-for="rpipb75ff067d50393047af9">false if timeout reached, true if permit was acquired. </p>
9483 <a id="ga0f5a509fb132e8e764795a66773500ad" name="ga0f5a509fb132e8e764795a66773500ad"></a>
9486 <h5 id="rpipd34c2993b67d58889362">
9487 <a class="anchor" href="#rpipd34c2993b67d58889362"></a>◆ sem_acquire_timeout_us()</h5>
9488 <div class="memitem" id="rpipfc8ea8d2f56e413dc7bd">
9489 <div class="memproto" id="rpip39eb8750bb538d8bc741">
9490 <table class="memname" id="rpipb7d93049c9e4e7d9141e">
9491 <tr id="rpip3d07ba4d8aa85ee7c13e">
9492 <td class="memname" id="rpipf2fb4060dd880530b8f0">bool sem_acquire_timeout_us </td>
9493 <td id="rpip3419a1dc0a9a4c137ddb">(</td>
9494 <td class="paramtype" id="rpip69354da7a0de20f30c9b">semaphore_t *Â </td>
9495 <td class="paramname" id="rpip4950351232c8358fb1bf">
9496 <em id="rpip182da75e62a5f06fd17e">sem</em>, </td>
9498 <tr id="rpipac64c79eb2b02d00df66">
9499 <td class="paramkey" id="rpip19d01a612368e9f38518"></td>
9500 <td id="rpipe9db6472fbdc17e869ec"></td>
9501 <td class="paramtype" id="rpip637b5e4bb98d8c8af484">uint32_t </td>
9502 <td class="paramname" id="rpipa81b4929de0598a8e111">
9503 <em id="rpipfa0f1bccf5af844c629e">timeout_us</em>Â </td>
9505 <tr id="rpipcd79461bbb1ace15b870">
9506 <td id="rpip99cbdc278f152f89cc7f"></td>
9507 <td id="rpip19078ce0ccfd8740af46">)</td>
9508 <td id="rpipbb0b519123776cd0e36d"></td>
9509 <td id="rpip9d0dc406e3ef968ab794"></td>
9513 <div class="memdoc" id="rpipe1196ec998fa1d08ad1b">
9515 <p id="rpip52da90efcb2b181d2402">Acquire a permit from a semaphore, with timeout. </p>
9516 <p id="rpip310f78c8735bb18a4b21">This function will block and wait if no permits are available, until the defined timeout has been reached. If the timeout is reached the function will return false, otherwise it will return true.</p>
9517 <h4 id="rpip02025451ecb7509b4d81" data-parent-id="rpip88122bd28d57039ecb7f" data-target-for="rpip02025451ecb7509b4d81">Parameters</h4>
9518 <p class="paragraph" id="rpip9ea6af5f41e99cb0708f" data-parent-id="rpip88122bd28d57039ecb7f" data-target-for="rpip9ea6af5f41e99cb0708f">
9520 <table class="params" id="rpip092d3795ebaabdf8c61a">
9521 <tr id="rpip4ad3a768db494c21528c">
9522 <td class="paramname" id="rpip825e48862beb820fa683">sem</td>
9523 <td id="rpip791d1fb80801d74d0b55">Pointer to semaphore structure </td>
9525 <tr id="rpip37704c1ef8088e055712">
9526 <td class="paramname" id="rpip50202f53f131eba99695">timeout_us</td>
9527 <td id="rpip0c32d9c00892f20a2f4d">Time to wait to acquire the semaphore, in microseconds. </td>
9533 <h4 class="label" id="rpipe01cea60e0f71ad6046b" data-parent-id="rpip54eaea437625d8fe14e1" data-target-for="rpipe01cea60e0f71ad6046b">Returns</h4>
9534 <p class="returns" id="rpipbd751df5afd48e5be663" data-parent-id="rpip54eaea437625d8fe14e1" data-target-for="rpipbd751df5afd48e5be663">false if timeout reached, true if permit was acquired. </p>
9538 <a id="gad9e065ef0c0e59309f9bdb5fb74bb7c1" name="gad9e065ef0c0e59309f9bdb5fb74bb7c1"></a>
9541 <h5 id="rpip2e2ec92501df772bff52">
9542 <a class="anchor" href="#rpip2e2ec92501df772bff52"></a>◆ sem_available()</h5>
9543 <div class="memitem" id="rpipe5c1fa4c45149219fb5b">
9544 <div class="memproto" id="rpip60c8550711b38593869c">
9545 <table class="memname" id="rpip9e9bf99998f6c60c24d0">
9546 <tr id="rpip0da6181c0574b4a0f665">
9547 <td class="memname" id="rpip71d771c1a1268f1f8196">int sem_available </td>
9548 <td id="rpip114cc4dce45b4cce70cb">(</td>
9549 <td class="paramtype" id="rpip0e48f77187163c2f9776">semaphore_t *Â </td>
9550 <td class="paramname" id="rpip74c199402d8a38cf7738"><em id="rpipdd842f8f0b49130c5a27">sem</em></td>
9551 <td id="rpip87e9ed60f2e5276a8a4b">)</td>
9552 <td id="rpip1aa7f3df21bd3da29ec4"></td>
9556 <div class="memdoc" id="rpip33c5bd5d7a473d708fd7">
9558 <p id="rpip11ef4b2e64b45cd119fd">Return number of available permits on the semaphore. </p>
9559 <h4 id="rpip0dbcce37548f37a817fb" data-parent-id="rpip004412ac9c395bd16efd" data-target-for="rpip0dbcce37548f37a817fb">Parameters</h4>
9560 <p class="paragraph" id="rpipc280071a841252329dc2" data-parent-id="rpip004412ac9c395bd16efd" data-target-for="rpipc280071a841252329dc2">
9562 <table class="params" id="rpip54655acba59956e579ca">
9563 <tr id="rpip5582d9ada2dd605e4594">
9564 <td class="paramname" id="rpip7dcfdf39100713de671a">sem</td>
9565 <td id="rpip9883ce419b05b589ba36">Pointer to semaphore structure </td>
9571 <h4 class="label" id="rpipcc62bbd3248152381245" data-parent-id="rpip7a7ea0966f7c7b0af37f" data-target-for="rpipcc62bbd3248152381245">Returns</h4>
9572 <p class="returns" id="rpip8849469d4470363332fa" data-parent-id="rpip7a7ea0966f7c7b0af37f" data-target-for="rpip8849469d4470363332fa">The number of permits available on the semaphore. </p>
9576 <a id="gab4e56b5ccfacafd2fb17765e702a21ba" name="gab4e56b5ccfacafd2fb17765e702a21ba"></a>
9579 <h5 id="rpipac5556321f40c6f73f03">
9580 <a class="anchor" href="#rpipac5556321f40c6f73f03"></a>◆ sem_init()</h5>
9581 <div class="memitem" id="rpipa57c8d93d8d6e9dc18d1">
9582 <div class="memproto" id="rpip8dce89563edfcf59c963">
9583 <table class="memname" id="rpipea995308e9025f129714">
9584 <tr id="rpipe5b94ab38fc37893d731">
9585 <td class="memname" id="rpipf31a6c99f439967b71ff">void sem_init </td>
9586 <td id="rpip002037b3d517e8159711">(</td>
9587 <td class="paramtype" id="rpip45adc3ac2a7c3c223087">semaphore_t *Â </td>
9588 <td class="paramname" id="rpip0e5f360dabafb6071182">
9589 <em id="rpip2eef16d7e4c9c9cb9e3e">sem</em>, </td>
9591 <tr id="rpip6a56d7702df61ef65337">
9592 <td class="paramkey" id="rpip5f592935b20b28390ef3"></td>
9593 <td id="rpip94cfe66bcb114cfabc9a"></td>
9594 <td class="paramtype" id="rpip8e9004dc24bbc20d079b">int16_t </td>
9595 <td class="paramname" id="rpipfa7042d0381d547ed89f">
9596 <em id="rpipf6753b02ced35631b8d8">initial_permits</em>, </td>
9598 <tr id="rpip88d608e23f7dd1d1c5eb">
9599 <td class="paramkey" id="rpip792dee3e00e0a86d5a87"></td>
9600 <td id="rpip16e738b9acf5d3112a4b"></td>
9601 <td class="paramtype" id="rpipff57fa93c7f984286369">int16_t </td>
9602 <td class="paramname" id="rpipb5b5348cc6c86351e8c7">
9603 <em id="rpip57f18b5fa509ff239ea0">max_permits</em>Â </td>
9605 <tr id="rpipa7a38f189b3d8b3fe3e2">
9606 <td id="rpipe38698cab49e256a0e85"></td>
9607 <td id="rpip8053178d91fa0f64afd2">)</td>
9608 <td id="rpip4efd0b4985a720233971"></td>
9609 <td id="rpipdcb379517e868c73a9d1"></td>
9613 <div class="memdoc" id="rpipb5b337ecb93798bc75e9">
9615 <p id="rpip96c0e54d448e62bac78f">Initialise a semaphore structure. </p>
9616 <h4 id="rpipbff748c8b55668da894d" data-parent-id="rpip9393d68c15b82d4700cf" data-target-for="rpipbff748c8b55668da894d">Parameters</h4>
9617 <p class="paragraph" id="rpipa109251d1b769725d885" data-parent-id="rpip9393d68c15b82d4700cf" data-target-for="rpipa109251d1b769725d885">
9619 <table class="params" id="rpipb5143cb18af50ea0cb91">
9620 <tr id="rpip55f50ac03b9a1b1992a7">
9621 <td class="paramname" id="rpip3cfa6635fb22e1f3b831">sem</td>
9622 <td id="rpip1370ee8d4bf702eb7d6e">Pointer to semaphore structure </td>
9624 <tr id="rpipa05ddadb8179341482a4">
9625 <td class="paramname" id="rpip4936ae084895ed61f691">initial_permits</td>
9626 <td id="rpip7942b5bc0f26da291ec2">How many permits are initially acquired </td>
9628 <tr id="rpip24872c1902472143e5a7">
9629 <td class="paramname" id="rpipd5df2504f1cce9860d03">max_permits</td>
9630 <td id="rpip1ec37ef0c67b223c26ad">Total number of permits allowed for this semaphore </td>
9639 <a id="gaeac89066f5fdbde0c7db2718464dcbde" name="gaeac89066f5fdbde0c7db2718464dcbde"></a>
9642 <h5 id="rpip3984be3161d2dd71086c">
9643 <a class="anchor" href="#rpip3984be3161d2dd71086c"></a>◆ sem_release()</h5>
9644 <div class="memitem" id="rpipc306efd4e6eb8d3dd115">
9645 <div class="memproto" id="rpip28846a22bd0f8460ab80">
9646 <table class="memname" id="rpip4e3d7514b0c30a3d77c1">
9647 <tr id="rpip5539cd270caf49212ec0">
9648 <td class="memname" id="rpipd1815224646587b1c83b">bool sem_release </td>
9649 <td id="rpip9d87a5ec800b0198e985">(</td>
9650 <td class="paramtype" id="rpipd29ebde7da231507037c">semaphore_t *Â </td>
9651 <td class="paramname" id="rpipa3d641507afaf8e64075"><em id="rpip8b222cf8a8659e89c4cd">sem</em></td>
9652 <td id="rpipaa07acf9a0940a18103b">)</td>
9653 <td id="rpip95722f244313ea35d12f"></td>
9657 <div class="memdoc" id="rpip69e0b7f3b56926b44dd4">
9659 <p id="rpip6ec4d85a7074fbb1269c">Release a permit on a semaphore. </p>
9660 <p id="rpip1f5bc1245bbda722f676">Increases the number of permits by one (unless the number of permits is already at the maximum). A blocked <code id="rpip6e210a756ad089a4d22f">sem_acquire</code> will be released if the number of permits is increased.</p>
9661 <h4 id="rpip1241a9e0dad0d79dcd8d" data-parent-id="rpip637b855d94b5b8472782" data-target-for="rpip1241a9e0dad0d79dcd8d">Parameters</h4>
9662 <p class="paragraph" id="rpip3c7b11c19b92231a001a" data-parent-id="rpip637b855d94b5b8472782" data-target-for="rpip3c7b11c19b92231a001a">
9664 <table class="params" id="rpipc5f6efe614e5cd14cce7">
9665 <tr id="rpip48c689c1e5423e4030ba">
9666 <td class="paramname" id="rpip4db2e3e4751a50b47147">sem</td>
9667 <td id="rpipd040abad2c06eeca567f">Pointer to semaphore structure </td>
9673 <h4 class="label" id="rpip55e5b5fcb4ca4811f3c9" data-parent-id="rpip1523589491927ff98673" data-target-for="rpip55e5b5fcb4ca4811f3c9">Returns</h4>
9674 <p class="returns" id="rpipbb43c98ac1b97aab8ca8" data-parent-id="rpip1523589491927ff98673" data-target-for="rpipbb43c98ac1b97aab8ca8">true if the number of permits available was increased. </p>
9678 <a id="gab6c128952e4981a95ce2e2d093a8a3ba" name="gab6c128952e4981a95ce2e2d093a8a3ba"></a>
9681 <h5 id="rpipfabdcf3295d541030aad">
9682 <a class="anchor" href="#rpipfabdcf3295d541030aad"></a>◆ sem_reset()</h5>
9683 <div class="memitem" id="rpip0ca1dbf2ff70d2fab81f">
9684 <div class="memproto" id="rpip1f4d440505fcb1776dcd">
9685 <table class="memname" id="rpip16a16e50e6210339983d">
9686 <tr id="rpipce6c69c76d217bf6dde1">
9687 <td class="memname" id="rpip37d9080a91f6e9ca5c4c">void sem_reset </td>
9688 <td id="rpip02a61fd3312d2e908201">(</td>
9689 <td class="paramtype" id="rpiped72e787cc4ed9c21f2c">semaphore_t *Â </td>
9690 <td class="paramname" id="rpip572bd161b055f68e3686">
9691 <em id="rpipd6899352eeacefece1d9">sem</em>, </td>
9693 <tr id="rpip34df3e4476c0aa0f3349">
9694 <td class="paramkey" id="rpipbc36f7946b6ce329f77f"></td>
9695 <td id="rpip9b1f01bf9bf0cc3ef536"></td>
9696 <td class="paramtype" id="rpip0112ce0ec46fc8baa5e4">int16_t </td>
9697 <td class="paramname" id="rpip6450a045daad217b1e4e">
9698 <em id="rpip38a327f5dc40972acfeb">permits</em>Â </td>
9700 <tr id="rpipabd608906eb040bc6d0e">
9701 <td id="rpip112b9bcebf2b13a4ebcf"></td>
9702 <td id="rpip1949e533a9058c8c9ca3">)</td>
9703 <td id="rpipf4ece9e4f96ecea9382f"></td>
9704 <td id="rpip10d53db127abaf1ecb76"></td>
9708 <div class="memdoc" id="rpipc26e2e9cd6fd056e0d0a">
9710 <p id="rpipc8d84a76abab57b6b415">Reset semaphore to a specific number of available permits. </p>
9711 <p id="rpip9137484d94ba895a3af4">Reset value should be from 0 to the max_permits specified in the init function</p>
9712 <h4 id="rpip30658792b1250c0393c1" data-parent-id="rpip6ee56a2b95e6612e9519" data-target-for="rpip30658792b1250c0393c1">Parameters</h4>
9713 <p class="paragraph" id="rpipded0394de7bb06c31033" data-parent-id="rpip6ee56a2b95e6612e9519" data-target-for="rpipded0394de7bb06c31033">
9715 <table class="params" id="rpip394d8e7d893a472fc82f">
9716 <tr id="rpip6d279d5ee9be1995fba7">
9717 <td class="paramname" id="rpip433f8ed3701fca86f672">sem</td>
9718 <td id="rpip28c08d07621edf7d3667">Pointer to semaphore structure </td>
9720 <tr id="rpip8d1a6fb7469721ae7edd">
9721 <td class="paramname" id="rpip85121001748c1417b844">permits</td>
9722 <td id="rpip86ec2f842a00b1edb103">the new number of available permits </td>
9731 <a id="ga25b473ab6f287e4a6a0c9d0288a0a497" name="ga25b473ab6f287e4a6a0c9d0288a0a497"></a>
9734 <h5 id="rpipa8652db8f66e9dbf93df">
9735 <a class="anchor" href="#rpipa8652db8f66e9dbf93df"></a>◆ sem_try_acquire()</h5>
9736 <div class="memitem" id="rpipa794e911e5884b21a7bd">
9737 <div class="memproto" id="rpip96d3bdd5403952b20b01">
9738 <table class="memname" id="rpip97efbc33656bf7d6328e">
9739 <tr id="rpip7403893833712b02ac3c">
9740 <td class="memname" id="rpip541a095652082f3c1363">bool sem_try_acquire </td>
9741 <td id="rpipf8ab5f2b9716dc67a110">(</td>
9742 <td class="paramtype" id="rpipa339f7406ca016ac1e8b">semaphore_t *Â </td>
9743 <td class="paramname" id="rpip0037800fee88e06ff08e"><em id="rpipc48f5db0080fd99c1145">sem</em></td>
9744 <td id="rpip5337e2ebf2fd57f79836">)</td>
9745 <td id="rpip7b71b96b66639c030ff1"></td>
9749 <div class="memdoc" id="rpipcaea00cbbd557816ed46">
9751 <p id="rpip7e8314550384bd0d940c">Attempt to acquire a permit from a semaphore without blocking. </p>
9752 <p id="rpip14d14ef675f1a44167cc">This function will return false without blocking if no permits are available, otherwise it will acquire a permit and return true.</p>
9753 <h4 id="rpip380a879754be24833011" data-parent-id="rpipee7fb8cc0e6bcef861a6" data-target-for="rpip380a879754be24833011">Parameters</h4>
9754 <p class="paragraph" id="rpip51d868fa9cb33b9a7279" data-parent-id="rpipee7fb8cc0e6bcef861a6" data-target-for="rpip51d868fa9cb33b9a7279">
9756 <table class="params" id="rpip39d0691a39fa5499372c">
9757 <tr id="rpipd561e9c02e9fd9864fdf">
9758 <td class="paramname" id="rpip17e0b04b79cee07900b8">sem</td>
9759 <td id="rpip38427827eb5fc9e4b3f9">Pointer to semaphore structure </td>
9765 <h4 class="label" id="rpipb16ee4edf547afab2260" data-parent-id="rpip83965f0b54adf278f26a" data-target-for="rpipb16ee4edf547afab2260">Returns</h4>
9766 <p class="returns" id="rpipcc859bedb561442aebd0" data-parent-id="rpip83965f0b54adf278f26a" data-target-for="rpipcc859bedb561442aebd0">true if permit was acquired. </p>
9776 <a class="anchor" href="#pico_time"></a>pico_time</h2>
9777 <div class="sectionbody"></div>
9778 <div class="ingroups" id="rpip82fce2df0ce96df5706a">Part of: <a class="el" href="high_level.html" id="rpip42f9be2511c3a22a6102">High Level APIs</a>
9781 <h3 id="rpip75fc0e1fb693907ffae4">
9782 <a class="anchor" href="#rpip75fc0e1fb693907ffae4"></a>Modules</h3>
9783 <ul class="memberdecls" id="rpipf2cc0f61975a3143c322" data-parent-id="rpipbaec6e19bce7bc7cdf85">
9784 <li class="memitem">
9785 <p data-target="true" data-target-for="rpipf2cc0f61975a3143c322"><span class="memItemLeft" data-target="true" id="rpipc26820cf9621c9cfc197" data-parent-id="rpipf2cc0f61975a3143c322" data-target-for="rpipc26820cf9621c9cfc197">Â </span><span class="memItemRight" data-target="true" id="rpip386f4ea5c15b31a543a4" data-parent-id="rpipf2cc0f61975a3143c322" data-target-for="rpip386f4ea5c15b31a543a4"><a class="el" href="high_level.html#timestamp" id="rpip416a07783063f6dc275f">timestamp</a></span></p>
9787 <li class="memdesc">
9788 <p data-target="true" data-target-for="rpip0c86d434511dc6df3e2d"><span class="mdescLeft" data-target="true" id="rpip2df8b78a2c2b0ca58d53" data-parent-id="rpip0c86d434511dc6df3e2d" data-target-for="rpip2df8b78a2c2b0ca58d53">Â </span><span class="mdescRight" data-target="true" id="rpip1b0fd92ee17b1753a239" data-parent-id="rpip0c86d434511dc6df3e2d" data-target-for="rpip1b0fd92ee17b1753a239">Timestamp functions relating to points in time (including the current time) <br id="rpip15a3b845364c67cd41b5"></span></p>
9790 <li class="memitem">
9791 <p data-target="true" data-target-for="rpip5062201da36a53604d56"><span class="memItemLeft" data-target="true" id="rpipe8734828b691f8f46c93" data-parent-id="rpip5062201da36a53604d56" data-target-for="rpipe8734828b691f8f46c93">Â </span><span class="memItemRight" data-target="true" id="rpip4f7ed604ba316c903c0e" data-parent-id="rpip5062201da36a53604d56" data-target-for="rpip4f7ed604ba316c903c0e"><a class="el" href="high_level.html#sleep" id="rpipd8b010b9411138fc8314">sleep</a></span></p>
9793 <li class="memdesc">
9794 <p data-target="true" data-target-for="rpipe8fb72b3bc1e14da8632"><span class="mdescLeft" data-target="true" id="rpip3ae976e5f45c5344987a" data-parent-id="rpipe8fb72b3bc1e14da8632" data-target-for="rpip3ae976e5f45c5344987a">Â </span><span class="mdescRight" data-target="true" id="rpip71e08bdcde7c80bc1875" data-parent-id="rpipe8fb72b3bc1e14da8632" data-target-for="rpip71e08bdcde7c80bc1875">Sleep functions for delaying execution in a lower power state. <br id="rpip4b432d1c4d8140c8587d"></span></p>
9796 <li class="memitem">
9797 <p data-target="true" data-target-for="rpip4a348404ae4bd0c83cee"><span class="memItemLeft" data-target="true" id="rpip43670bd9c597997fb3ad" data-parent-id="rpip4a348404ae4bd0c83cee" data-target-for="rpip43670bd9c597997fb3ad">Â </span><span class="memItemRight" data-target="true" id="rpipa36e31c4cd6d0d6f4c50" data-parent-id="rpip4a348404ae4bd0c83cee" data-target-for="rpipa36e31c4cd6d0d6f4c50"><a class="el" href="high_level.html#alarm" id="rpipfbf560f9d3425be20f42">alarm</a></span></p>
9799 <li class="memdesc">
9800 <p data-target="true" data-target-for="rpipff5de78d2bc6a3559b79"><span class="mdescLeft" data-target="true" id="rpip2195cd0b0f1f692259e5" data-parent-id="rpipff5de78d2bc6a3559b79" data-target-for="rpip2195cd0b0f1f692259e5">Â </span><span class="mdescRight" data-target="true" id="rpip37b5bc041a38c49d8de4" data-parent-id="rpipff5de78d2bc6a3559b79" data-target-for="rpip37b5bc041a38c49d8de4">Alarm functions for scheduling future execution. <br id="rpip8d9f6917447c1f3ea3e2"></span></p>
9802 <li class="memitem">
9803 <p data-target="true" data-target-for="rpipc9188641f0072735be69"><span class="memItemLeft" data-target="true" id="rpip6492a72169583000f618" data-parent-id="rpipc9188641f0072735be69" data-target-for="rpip6492a72169583000f618">Â </span><span class="memItemRight" data-target="true" id="rpip754040a0ba53362a17db" data-parent-id="rpipc9188641f0072735be69" data-target-for="rpip754040a0ba53362a17db"><a class="el" href="high_level.html#repeating_timer" id="rpip4b745990ae2bf8d3a9b1">repeating_timer</a></span></p>
9805 <li class="memdesc">
9806 <p data-target="true" data-target-for="rpipb2e7ac43394ca3b7a653"><span class="mdescLeft" data-target="true" id="rpipdb86bbe9322469aaa7b6" data-parent-id="rpipb2e7ac43394ca3b7a653" data-target-for="rpipdb86bbe9322469aaa7b6">Â </span><span class="mdescRight" data-target="true" id="rpipfc599356372e9d47b8ed" data-parent-id="rpipb2e7ac43394ca3b7a653" data-target-for="rpipfc599356372e9d47b8ed">Repeating Timer functions for simple scheduling of repeated execution. <br id="rpipf03fa2c40ea73512a4bf"></span></p>
9809 <a name="details" id="details"></a>
9812 <h3 id="rpip587c32f8059c662009b6">
9813 <a class="anchor" href="#rpip587c32f8059c662009b6"></a>Detailed Description</h3>
9814 <p id="rpip72670225256026cf4746">API for accurate timestamps, sleeping, and time based callbacks</p>
9815 <div class="admonitionblock note" id="rpipb340cad240d5e9ec30bc" data-parent-id="rpip6016c0554d0f61ad77b8"><table>
9816 <tr data-target="true" data-target-for="rpipb340cad240d5e9ec30bc">
9817 <td class="icon" id="rpip479a522ea65f531e1d82" data-parent-id="rpipb340cad240d5e9ec30bc"><div class="title" data-target="true" data-target-for="rpip479a522ea65f531e1d82">Note</div></td>
9818 <td class="content" id="rpip7ef5fa3906ded193f75c" data-parent-id="rpipb340cad240d5e9ec30bc" data-target-for="rpip7ef5fa3906ded193f75c">The functions defined here provide a much more powerful and user friendly wrapping around the low level hardware timer functionality. For these functions (and any other SDK functionality e.g. timeouts, that relies on them) to work correctly, the hardware timer should not be modified. i.e. it is expected to be monotonically increasing once per microsecond. Fortunately there is no need to modify the hardware timer as any functionality you can think of that isn't already covered here can easily be modelled by adding or subtracting a constant value from the unmodified hardware timer.</td>
9821 <p class="see" id="rpipbfa92286bce781056e82" data-parent-id="rpip6016c0554d0f61ad77b8" data-target-for="rpipbfa92286bce781056e82"><span class="label" id="rpipe9db32e497f7d7c072cd" data-parent-id="rpipbfa92286bce781056e82" data-target-for="rpipe9db32e497f7d7c072cd">See also</span><span class="target" id="rpipe15b2982f755bfd4a53a" data-parent-id="rpipbfa92286bce781056e82" data-target-for="rpipe15b2982f755bfd4a53a"><a class="el" href="hardware.html#hardware_timer" id="rpip2dfc4a7bd670fd268d63">hardware_timer</a> </span></p>
9825 <a class="anchor" href="#timestamp"></a>timestamp</h3>
9826 <div class="ingroups" id="rpip2add88dff887c95e1183">Part of: <a class="el" href="high_level.html" id="rpip41ac1569326d651f94df">High Level APIs</a> » <a class="el" href="high_level.html#pico_time" id="rpipfff5cd42c8fbb5d4f814">pico_time</a>
9828 <p id="rpipbaad61208d7a0b3df176">Timestamp functions relating to points in time (including the current time)
9829 <a href="#ga33379ef2f2e113b0af19" id="rpipf6d4b376006641c83107" data-adjusted="true">More...</a></p>
9831 <h4 id="rpipf053a059034565fa1dc3">
9832 <a class="anchor" href="#rpipf053a059034565fa1dc3"></a>Functions</h4>
9833 <ul class="memberdecls" id="rpip0731c1eef36e67a97970" data-parent-id="rpip04401d4e40e2d9d8a080">
9834 <li class="memitem">
9835 <p data-target="true" data-target-for="rpip0731c1eef36e67a97970"><span class="memItemLeft" data-target="true" id="rpip77190fa6ab3f06e5b24e" data-parent-id="rpip0731c1eef36e67a97970" data-target-for="rpip77190fa6ab3f06e5b24e">static uint64_t </span><span class="memItemRight" data-target="true" id="rpip3d19f15912c5e341c08f" data-parent-id="rpip0731c1eef36e67a97970" data-target-for="rpip3d19f15912c5e341c08f"><a class="el" href="#ga173698876ae00331c92ed4e8c3ba98d1" id="rpip5c10a205516983173f64" data-adjusted="true">to_us_since_boot</a> (<a class="el" href="structabsolute__time__t.html" id="rpipb65b9c3742aa283105b1">absolute_time_t</a> t)</span></p>
9837 <li class="memdesc">
9838 <p data-target="true" data-target-for="rpipad3960ede34105ba951b"><span class="mdescLeft" data-target="true" id="rpip58acb18a8177c3c96e15" data-parent-id="rpipad3960ede34105ba951b" data-target-for="rpip58acb18a8177c3c96e15">Â </span><span class="mdescRight" data-target="true" id="rpip229a1fd2bc794dd8d892" data-parent-id="rpipad3960ede34105ba951b" data-target-for="rpip229a1fd2bc794dd8d892">convert an <a class="el" href="structabsolute__time__t.html" id="rpip754d8a43e10a78511cbc">absolute_time_t</a> into a number of microseconds since boot. <br id="rpip6c67c8fc26b3bdfe00ca"></span></p>
9840 <li class="memitem">
9841 <p data-target="true" data-target-for="rpip3c970dffd5c17961c85e"><span class="memItemLeft" data-target="true" id="rpip0fce266abed943e88680" data-parent-id="rpip3c970dffd5c17961c85e" data-target-for="rpip0fce266abed943e88680">static void </span><span class="memItemRight" data-target="true" id="rpipf0223759527920e8e74c" data-parent-id="rpip3c970dffd5c17961c85e" data-target-for="rpipf0223759527920e8e74c"><a class="el" href="#gacb69a734d588b758f1ada8af8efe6968" id="rpip28fe17554d6895cabc95" data-adjusted="true">update_us_since_boot</a> (<a class="el" href="structabsolute__time__t.html" id="rpipb487e3d2c075d773bce5">absolute_time_t</a> *t, uint64_t us_since_boot)</span></p>
9843 <li class="memdesc">
9844 <p data-target="true" data-target-for="rpipb6e4b69cd8dc36d8105e"><span class="mdescLeft" data-target="true" id="rpip3f43c4fc25c7ef512b51" data-parent-id="rpipb6e4b69cd8dc36d8105e" data-target-for="rpip3f43c4fc25c7ef512b51">Â </span><span class="mdescRight" data-target="true" id="rpipbf7a528d02cb28298b6c" data-parent-id="rpipb6e4b69cd8dc36d8105e" data-target-for="rpipbf7a528d02cb28298b6c">update an <a class="el" href="structabsolute__time__t.html" id="rpipc317d1db5a314d9e2e2c">absolute_time_t</a> value to represent a given number of microseconds since boot <br id="rpipc1d3d08244929c155dc1"></span></p>
9846 <li class="memitem">
9847 <p data-target="true" data-target-for="rpip817f569ee528dc25b733"><span class="memItemLeft" data-target="true" id="rpip1104d6b422659f51a03f" data-parent-id="rpip817f569ee528dc25b733" data-target-for="rpip1104d6b422659f51a03f">static <a class="el" href="structabsolute__time__t.html" id="rpip28824e7b109c2e3fc558">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipd29e664bf73bb29c5705" data-parent-id="rpip817f569ee528dc25b733" data-target-for="rpipd29e664bf73bb29c5705"><a class="el" href="#ga2cf14d0bdee9614a98aa34a0e760fb89" id="rpip31b1e441fc5edad77088" data-adjusted="true">from_us_since_boot</a> (uint64_t us_since_boot)</span></p>
9849 <li class="memdesc">
9850 <p data-target="true" data-target-for="rpipa80b8473064a68f992d9"><span class="mdescLeft" data-target="true" id="rpip1ebb70140733d0fcdd62" data-parent-id="rpipa80b8473064a68f992d9" data-target-for="rpip1ebb70140733d0fcdd62">Â </span><span class="mdescRight" data-target="true" id="rpip8dab63945ab9239b89ab" data-parent-id="rpipa80b8473064a68f992d9" data-target-for="rpip8dab63945ab9239b89ab">convert a number of microseconds since boot to an <a class="el" href="structabsolute__time__t.html" id="rpipa8beb122b122c8b99a82">absolute_time_t</a> <br id="rpip4e0d52975343e8fdb3a3"></span></p>
9852 <li class="memitem">
9853 <p data-target="true" data-target-for="rpip2b0ffb9eb8f9528b0f8f"><span class="memItemLeft" data-target="true" id="rpipda8b62af2831920985c1" data-parent-id="rpip2b0ffb9eb8f9528b0f8f" data-target-for="rpipda8b62af2831920985c1">static <a class="el" href="structabsolute__time__t.html" id="rpipc44df30aa284abd54fbf">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip624688d5ca4336edca98" data-parent-id="rpip2b0ffb9eb8f9528b0f8f" data-target-for="rpip624688d5ca4336edca98"><a class="el" href="#ga6a1d4dfb43030b6594fa050f50feb47a" id="rpip29755e10c57010645b75" data-adjusted="true">get_absolute_time</a> (void)</span></p>
9855 <li class="memdesc">
9856 <p data-target="true" data-target-for="rpip7d9ef90431f91ce4a960"><span class="mdescLeft" data-target="true" id="rpip86bc5beff2a48d8cb993" data-parent-id="rpip7d9ef90431f91ce4a960" data-target-for="rpip86bc5beff2a48d8cb993">Â </span><span class="mdescRight" data-target="true" id="rpip85d0f9061f56d6236426" data-parent-id="rpip7d9ef90431f91ce4a960" data-target-for="rpip85d0f9061f56d6236426">Return a representation of the current time. <br id="rpipb22e8610c8eddb1eb044"></span></p>
9858 <li class="memitem">
9859 <p data-target="true" data-target-for="rpipc5e1b2b6e0f12293faef"><span class="memItemLeft" data-target="true" id="rpip682391bcb0606f710e8f" data-parent-id="rpipc5e1b2b6e0f12293faef" data-target-for="rpip682391bcb0606f710e8f">static uint32_t </span><span class="memItemRight" data-target="true" id="rpipd6a19fc7a74d9ef17b64" data-parent-id="rpipc5e1b2b6e0f12293faef" data-target-for="rpipd6a19fc7a74d9ef17b64"><a class="el" href="#gab12467c48bde27171b552ac4dc8c7d59" id="rpipf2a551b096551edceef8" data-adjusted="true">to_ms_since_boot</a> (<a class="el" href="structabsolute__time__t.html" id="rpip3bc054a68eb09c342734">absolute_time_t</a> t)</span></p>
9861 <li class="memdesc">
9862 <p data-target="true" data-target-for="rpipe0c0f5003abd96f93f30"><span class="mdescLeft" data-target="true" id="rpip003176696c9c266866bc" data-parent-id="rpipe0c0f5003abd96f93f30" data-target-for="rpip003176696c9c266866bc">Â </span><span class="mdescRight" data-target="true" id="rpipcd91c4013e37e4d44448" data-parent-id="rpipe0c0f5003abd96f93f30" data-target-for="rpipcd91c4013e37e4d44448">Convert a timestamp into a number of milliseconds since boot. <br id="rpip607574f1c1a3daf86c83"></span></p>
9864 <li class="memitem">
9865 <p data-target="true" data-target-for="rpip593a0f5ba2d19b6f42cd"><span class="memItemLeft" data-target="true" id="rpipeeb03f7a5bc76a35ca25" data-parent-id="rpip593a0f5ba2d19b6f42cd" data-target-for="rpipeeb03f7a5bc76a35ca25">static <a class="el" href="structabsolute__time__t.html" id="rpipb079d53f6cc1ac445254">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipd4ca105bedaa1ace23d2" data-parent-id="rpip593a0f5ba2d19b6f42cd" data-target-for="rpipd4ca105bedaa1ace23d2"><a class="el" href="#ga729dc88ec38af2d054ba7307214bcf3c" id="rpip776bd7092a33291e27e2" data-adjusted="true">delayed_by_us</a> (const <a class="el" href="structabsolute__time__t.html" id="rpip3a4e331c6b7b5d5ebc40">absolute_time_t</a> t, uint64_t us)</span></p>
9867 <li class="memdesc">
9868 <p data-target="true" data-target-for="rpip8f5b753d4b1271fba695"><span class="mdescLeft" data-target="true" id="rpipe8f28149a6cfe837387b" data-parent-id="rpip8f5b753d4b1271fba695" data-target-for="rpipe8f28149a6cfe837387b">Â </span><span class="mdescRight" data-target="true" id="rpip1e92e1e455d0ec5ca941" data-parent-id="rpip8f5b753d4b1271fba695" data-target-for="rpip1e92e1e455d0ec5ca941">Return a timestamp value obtained by adding a number of microseconds to another timestamp. <br id="rpip94017dd25376da0e9e11"></span></p>
9870 <li class="memitem">
9871 <p data-target="true" data-target-for="rpipced88c094863ece7e72d"><span class="memItemLeft" data-target="true" id="rpip8d156f018eb345ff9ffe" data-parent-id="rpipced88c094863ece7e72d" data-target-for="rpip8d156f018eb345ff9ffe">static <a class="el" href="structabsolute__time__t.html" id="rpip53b826c4f8fde30f8929">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipb13eebf06ffdc62aaa24" data-parent-id="rpipced88c094863ece7e72d" data-target-for="rpipb13eebf06ffdc62aaa24"><a class="el" href="#ga7ee031a9cdeb9a9a6328d1b41d53cf5c" id="rpipa20aa1abedb3d5711983" data-adjusted="true">delayed_by_ms</a> (const <a class="el" href="structabsolute__time__t.html" id="rpipde61c70d53682719bba8">absolute_time_t</a> t, uint32_t ms)</span></p>
9873 <li class="memdesc">
9874 <p data-target="true" data-target-for="rpip88035cdd51417cd3d6df"><span class="mdescLeft" data-target="true" id="rpip217cc83736f25d5ed055" data-parent-id="rpip88035cdd51417cd3d6df" data-target-for="rpip217cc83736f25d5ed055">Â </span><span class="mdescRight" data-target="true" id="rpipf581ddc7e1ec7320a102" data-parent-id="rpip88035cdd51417cd3d6df" data-target-for="rpipf581ddc7e1ec7320a102">Return a timestamp value obtained by adding a number of milliseconds to another timestamp. <br id="rpipc8a8ee2964b8f7ca959b"></span></p>
9876 <li class="memitem">
9877 <p data-target="true" data-target-for="rpip3641e519b4e9b72736db"><span class="memItemLeft" data-target="true" id="rpip58ad427d9b5802af2730" data-parent-id="rpip3641e519b4e9b72736db" data-target-for="rpip58ad427d9b5802af2730">static <a class="el" href="structabsolute__time__t.html" id="rpip8112d8932dde1ea4b08f">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip50373f483e003cc06dff" data-parent-id="rpip3641e519b4e9b72736db" data-target-for="rpip50373f483e003cc06dff"><a class="el" href="#ga70921b9073202a54eec3494b4d19ec84" id="rpip16a3cecf833ab28bd980" data-adjusted="true">make_timeout_time_us</a> (uint64_t us)</span></p>
9879 <li class="memdesc">
9880 <p data-target="true" data-target-for="rpipca6206771e010d95e12a"><span class="mdescLeft" data-target="true" id="rpip85fe3fd3d65b089532cb" data-parent-id="rpipca6206771e010d95e12a" data-target-for="rpip85fe3fd3d65b089532cb">Â </span><span class="mdescRight" data-target="true" id="rpip477a247ce264081cc1ab" data-parent-id="rpipca6206771e010d95e12a" data-target-for="rpip477a247ce264081cc1ab">Convenience method to get the timestamp a number of microseconds from the current time. <br id="rpip39bb4d2c88e1e75b862f"></span></p>
9882 <li class="memitem">
9883 <p data-target="true" data-target-for="rpipae5e6f5b7d475684396d"><span class="memItemLeft" data-target="true" id="rpipb48ddb82258743ebbb37" data-parent-id="rpipae5e6f5b7d475684396d" data-target-for="rpipb48ddb82258743ebbb37">static <a class="el" href="structabsolute__time__t.html" id="rpip4f82e54e7780b38cf6e3">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipa7ab88c36fc842cd1fa7" data-parent-id="rpipae5e6f5b7d475684396d" data-target-for="rpipa7ab88c36fc842cd1fa7"><a class="el" href="#gab11f5a243dd585b6903a87b0127df2cc" id="rpipc14326495f65ac565dff" data-adjusted="true">make_timeout_time_ms</a> (uint32_t ms)</span></p>
9885 <li class="memdesc">
9886 <p data-target="true" data-target-for="rpipc69b8551174deafbc6e8"><span class="mdescLeft" data-target="true" id="rpipb3914cb63f493ae87c06" data-parent-id="rpipc69b8551174deafbc6e8" data-target-for="rpipb3914cb63f493ae87c06">Â </span><span class="mdescRight" data-target="true" id="rpipf86ea09fc52fbebf175b" data-parent-id="rpipc69b8551174deafbc6e8" data-target-for="rpipf86ea09fc52fbebf175b">Convenience method to get the timestamp a number of milliseconds from the current time. <br id="rpip846ca61b354eabd0ec50"></span></p>
9888 <li class="memitem">
9889 <p data-target="true" data-target-for="rpipaa08ec22a4af8177e430"><span class="memItemLeft" data-target="true" id="rpip4448c8212d16b61c0774" data-parent-id="rpipaa08ec22a4af8177e430" data-target-for="rpip4448c8212d16b61c0774">static int64_t </span><span class="memItemRight" data-target="true" id="rpip1b87cd3813f220c80c28" data-parent-id="rpipaa08ec22a4af8177e430" data-target-for="rpip1b87cd3813f220c80c28"><a class="el" href="#ga36d9cbebcc55e41921550edbabf17ab2" id="rpipd9b129a7cca6f80ed679" data-adjusted="true">absolute_time_diff_us</a> (<a class="el" href="structabsolute__time__t.html" id="rpip120337ca0ab45b4f448c">absolute_time_t</a> from, <a class="el" href="structabsolute__time__t.html" id="rpip76a5cc527d6e4d666fa2">absolute_time_t</a> to)</span></p>
9891 <li class="memdesc">
9892 <p data-target="true" data-target-for="rpip6adff01855a00a3e831d"><span class="mdescLeft" data-target="true" id="rpip87b3b5bf0ea4b3152484" data-parent-id="rpip6adff01855a00a3e831d" data-target-for="rpip87b3b5bf0ea4b3152484">Â </span><span class="mdescRight" data-target="true" id="rpip4de8507eac6705dde2c2" data-parent-id="rpip6adff01855a00a3e831d" data-target-for="rpip4de8507eac6705dde2c2">Return the difference in microseconds between two timestamps. <br id="rpipcc46d0f2aa41b0048cc8"></span></p>
9894 <li class="memitem">
9895 <p data-target="true" data-target-for="rpipcbf322025950fa7a5104"><span class="memItemLeft" data-target="true" id="rpipaccac6a2dc685aa9192c" data-parent-id="rpipcbf322025950fa7a5104" data-target-for="rpipaccac6a2dc685aa9192c">static <a class="el" href="structabsolute__time__t.html" id="rpip6c3c12829ab283259285">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip70632391271f93a05a99" data-parent-id="rpipcbf322025950fa7a5104" data-target-for="rpip70632391271f93a05a99"><a class="el" href="#ga522e97b4c9dfeb3db0bc702461b61a3a" id="rpip9b721230a0f6f52118f9" data-adjusted="true">absolute_time_min</a> (<a class="el" href="structabsolute__time__t.html" id="rpip67a168d355194975ca78">absolute_time_t</a> a, <a class="el" href="structabsolute__time__t.html" id="rpip0b176d27366ee522376b">absolute_time_t</a> b)</span></p>
9897 <li class="memdesc">
9898 <p data-target="true" data-target-for="rpip40d3dfbba4a1acd14ab4"><span class="mdescLeft" data-target="true" id="rpip798abdb8c109c49622c9" data-parent-id="rpip40d3dfbba4a1acd14ab4" data-target-for="rpip798abdb8c109c49622c9">Â </span><span class="mdescRight" data-target="true" id="rpip9a842d13408a0f9e0312" data-parent-id="rpip40d3dfbba4a1acd14ab4" data-target-for="rpip9a842d13408a0f9e0312">Return the earlier of two timestamps. <br id="rpip036daf04faba50f26c34"></span></p>
9900 <li class="memitem">
9901 <p data-target="true" data-target-for="rpipab857cfa6b23cd2bb20c"><span class="memItemLeft" data-target="true" id="rpip9f72db46ffc1b1893099" data-parent-id="rpipab857cfa6b23cd2bb20c" data-target-for="rpip9f72db46ffc1b1893099">static bool </span><span class="memItemRight" data-target="true" id="rpipf02c39cd328d4c5e625c" data-parent-id="rpipab857cfa6b23cd2bb20c" data-target-for="rpipf02c39cd328d4c5e625c"><a class="el" href="#ga408e44143880dd2a9ebfe2f3ebeab242" id="rpipe9a52633c1ba1d2ea839" data-adjusted="true">is_at_the_end_of_time</a> (<a class="el" href="structabsolute__time__t.html" id="rpip25bdba4ea7c25c9bea35">absolute_time_t</a> t)</span></p>
9903 <li class="memdesc">
9904 <p data-target="true" data-target-for="rpip0f070ae69923f013975d"><span class="mdescLeft" data-target="true" id="rpip3c32989453751ec05eb6" data-parent-id="rpip0f070ae69923f013975d" data-target-for="rpip3c32989453751ec05eb6">Â </span><span class="mdescRight" data-target="true" id="rpip0a8ccf29a59c584d1167" data-parent-id="rpip0f070ae69923f013975d" data-target-for="rpip0a8ccf29a59c584d1167">Determine if the given timestamp is "at_the_end_of_time". <br id="rpipf3d23954bfe1da52697e"></span></p>
9906 <li class="memitem">
9907 <p data-target="true" data-target-for="rpipb3f0d41ed722b8791386"><span class="memItemLeft" data-target="true" id="rpip5efc59b4c0bb5b414f25" data-parent-id="rpipb3f0d41ed722b8791386" data-target-for="rpip5efc59b4c0bb5b414f25">static bool </span><span class="memItemRight" data-target="true" id="rpip07133e9bc38d70be3957" data-parent-id="rpipb3f0d41ed722b8791386" data-target-for="rpip07133e9bc38d70be3957"><a class="el" href="#ga0753884ef1d9340edacf53e9c06e42de" id="rpipc570b6e4059fd432cb42" data-adjusted="true">is_nil_time</a> (<a class="el" href="structabsolute__time__t.html" id="rpip0ae8832b5b53d9918374">absolute_time_t</a> t)</span></p>
9909 <li class="memdesc">
9910 <p data-target="true" data-target-for="rpip2fbaf9104d5e6129f6ce"><span class="mdescLeft" data-target="true" id="rpip5da261880bf6566b8873" data-parent-id="rpip2fbaf9104d5e6129f6ce" data-target-for="rpip5da261880bf6566b8873">Â </span><span class="mdescRight" data-target="true" id="rpipbbad766813c34b2cf145" data-parent-id="rpip2fbaf9104d5e6129f6ce" data-target-for="rpipbbad766813c34b2cf145">Determine if the given timestamp is nil. <br id="rpip77b7f969783840363ebf"></span></p>
9915 <h4 id="rpip9746614170d3750d0346">
9916 <a class="anchor" href="#rpip9746614170d3750d0346"></a>Variables</h4>
9917 <ul class="memberdecls" id="rpip10ccb6da48e80dabc0e6" data-parent-id="rpipf3a08c57fcf35f2a70a7">
9918 <li class="memitem">
9919 <p data-target="true" data-target-for="rpip10ccb6da48e80dabc0e6"><span class="memItemLeft" data-target="true" id="rpip7cf747dea22e7b89aa97" data-parent-id="rpip10ccb6da48e80dabc0e6" data-target-for="rpip7cf747dea22e7b89aa97"><a id="gab375b40e949dce1052298f79c66f7120" name="gab375b40e949dce1052298f79c66f7120"></a>
9920 const <a class="el" href="structabsolute__time__t.html" id="rpipa99f2fbf04daedd5052d">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipec60268a911adb8af3df" data-parent-id="rpip10ccb6da48e80dabc0e6" data-target-for="rpipec60268a911adb8af3df"><b id="rpip31a971cacd1558a1204f">at_the_end_of_time</b></span></p>
9922 <li class="memdesc">
9923 <p data-target="true" data-target-for="rpipc1624ceb2bd65552d86f"><span class="mdescLeft" data-target="true" id="rpip9b6efc314960c6c10f09" data-parent-id="rpipc1624ceb2bd65552d86f" data-target-for="rpip9b6efc314960c6c10f09">Â </span><span class="mdescRight" data-target="true" id="rpipf1f0067e71e64161a3c6" data-parent-id="rpipc1624ceb2bd65552d86f" data-target-for="rpipf1f0067e71e64161a3c6">The timestamp representing the end of time; this is actually not the maximum possible timestamp, but is set to 0x7fffffff_ffffffff microseconds to avoid sign overflows with time arithmetic. This is almost 300,000 years, so should be sufficient. <br id="rpipf886d554caa0fbebc030"></span></p>
9925 <li class="memitem">
9926 <p data-target="true" data-target-for="rpip7d2ee14473aa902b34cc"><span class="memItemLeft" data-target="true" id="rpip5e6f4fd54b8added790f" data-parent-id="rpip7d2ee14473aa902b34cc" data-target-for="rpip5e6f4fd54b8added790f"><a id="ga978d7972634296a1870c28b0727beefb" name="ga978d7972634296a1870c28b0727beefb"></a>
9927 const <a class="el" href="structabsolute__time__t.html" id="rpip38bf3439627294493d1b">absolute_time_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip85803afcc2395563c0ee" data-parent-id="rpip7d2ee14473aa902b34cc" data-target-for="rpip85803afcc2395563c0ee"><b id="rpipd97bb42342b373f7be90">nil_time</b></span></p>
9929 <li class="memdesc">
9930 <p data-target="true" data-target-for="rpipae4181cd92adce8e803e"><span class="mdescLeft" data-target="true" id="rpip34e7bcd970552eb8890a" data-parent-id="rpipae4181cd92adce8e803e" data-target-for="rpip34e7bcd970552eb8890a">Â </span><span class="mdescRight" data-target="true" id="rpip41102d095fc1bf44ce9a" data-parent-id="rpipae4181cd92adce8e803e" data-target-for="rpip41102d095fc1bf44ce9a">The timestamp representing a null timestamp. <br id="rpip778b7f5bdda8b34145e9"></span></p>
9933 <a name="details" id="ga33379ef2f2e113b0af19"></a>
9936 <h4 id="rpip2e545af0c271c1f8eae4">
9937 <a class="anchor" href="#rpip2e545af0c271c1f8eae4"></a>Detailed Description</h4>
9938 <p id="rpip56267918c94f406a1eea">Timestamp functions relating to points in time (including the current time) </p>
9939 <p id="rpip51d7dd1e7a76211da0b5">These are functions for dealing with timestamps (i.e. instants in time) represented by the type <a class="el" href="structabsolute__time__t.html" id="rpip247c2a6047540f17aedf">absolute_time_t</a>. This opaque type is provided to help prevent accidental mixing of timestamps and relative time values. </p>
9942 <h4 id="rpipe179d8f32d07a7d37736">
9943 <a class="anchor" href="#rpipe179d8f32d07a7d37736"></a>Function Documentation</h4>
9944 <a id="ga36d9cbebcc55e41921550edbabf17ab2" name="ga36d9cbebcc55e41921550edbabf17ab2"></a>
9946 <h5 id="rpip13f71b02e4d40056ce80">
9947 <a class="anchor" href="#rpip13f71b02e4d40056ce80"></a>◆ absolute_time_diff_us()</h5>
9948 <div class="memitem" id="rpip13e03d1a558197e134fd">
9949 <div class="memproto" id="rpip6aa8c66f0bdfca2c7f08">
9950 <table class="mlabels" id="rpip00423fbfb366988433b0">
9951 <tr id="rpip024ad1c0a4aa53b9478c">
9952 <td class="mlabels-left" id="rpipad6e79bb1f8e1f3974dc">
9953 <table class="memname" id="rpip7b075b4439c3218f888f">
9954 <tr id="rpip10f5ee057c5ae9765889">
9955 <td class="memname" id="rpipcba43a0c133dfbce097d">static int64_t absolute_time_diff_us </td>
9956 <td id="rpip517763eed1bcc7d0a2e6">(</td>
9957 <td class="paramtype" id="rpipe4cc2e821392befb2fd6">
9958 <a class="el" href="structabsolute__time__t.html" id="rpipc7998eca7707a46f9571">absolute_time_t</a>Â </td>
9959 <td class="paramname" id="rpip50a30a4ce3a25e7b9936">
9960 <em id="rpip0d65e9512978a36d4c8d">from</em>, </td>
9962 <tr id="rpip161bdc308aaac88c4aa8">
9963 <td class="paramkey" id="rpip3bac74b4c4b8eb697d6c"></td>
9964 <td id="rpipf51e37c85691a0414c9c"></td>
9965 <td class="paramtype" id="rpip8b20e576afedb467ec21">
9966 <a class="el" href="structabsolute__time__t.html" id="rpip7455c08d49a26edec5a5">absolute_time_t</a>Â </td>
9967 <td class="paramname" id="rpip984f058e76c9147c7356">
9968 <em id="rpipc737594a0bf3ba9935a4">to</em>Â </td>
9970 <tr id="rpipa0b32292534b144095a2">
9971 <td id="rpip4a61440d0bf4ab9369c1"></td>
9972 <td id="rpip79c03ba70029acec262c">)</td>
9973 <td id="rpip85c1fd2e56e27f44a760"></td>
9974 <td id="rpip6b017974d9b24fb27800"></td>
9978 <td class="mlabels-right" id="rpipf1b96910d72f218d4afa">
9979 <span class="mlabels" id="rpip53deee4e7429a7b7fd6e"><span class="mlabel" id="rpipc820bbd735dca8f2e549">inline</span><span class="mlabel" id="rpip57c59f62a8179d11a3af">static</span></span> </td>
9983 <div class="memdoc" id="rpipe922ed3eba7a525a8514">
9985 <p id="rpip1fee4930467fcff57632">Return the difference in microseconds between two timestamps. </p>
9986 <div class="admonitionblock note" id="rpipd68cea2932e24b68d79d" data-parent-id="rpipe922ed3eba7a525a8514"><table>
9987 <tr data-target="true" data-target-for="rpipd68cea2932e24b68d79d">
9988 <td class="icon" id="rpip3261feed3d6d0e0fcb3e" data-parent-id="rpipd68cea2932e24b68d79d"><div class="title" data-target="true" data-target-for="rpip3261feed3d6d0e0fcb3e">Note</div></td>
9989 <td class="content" id="rpip8cd502006de8378458ae" data-parent-id="rpipd68cea2932e24b68d79d" data-target-for="rpip8cd502006de8378458ae">be careful when diffing against large timestamps (e.g. <a class="el" href="#gab375b40e949dce1052298f79c66f7120" id="rpipac476a5418b0c3b686f7" data-adjusted="true">at_the_end_of_time</a>) as the signed integer may overflow.</td>
9992 <h4 id="rpip8427431805eac07a0ed3" data-parent-id="rpip2dccbfd7b89ffd280ade" data-target-for="rpip8427431805eac07a0ed3">Parameters</h4>
9993 <p class="paragraph" id="rpipbe00ef5a80e66a49af07" data-parent-id="rpip2dccbfd7b89ffd280ade" data-target-for="rpipbe00ef5a80e66a49af07">
9995 <table class="params" id="rpip45f69c57e828e0bb7f6e">
9996 <tr id="rpipd682bfb96388e086d058">
9997 <td class="paramname" id="rpipea6bb5e9cd4c4f682e4b">from</td>
9998 <td id="rpip5f9903c103022a2f1dd3">the first timestamp </td>
10000 <tr id="rpip68b9c2880cc0c42a4b4f">
10001 <td class="paramname" id="rpipd8726e80a368ed141839">to</td>
10002 <td id="rpip67fb07c939f7df235731">the second timestamp </td>
10008 <h4 class="label" id="rpip69acaf3ad48692f2002b" data-parent-id="rpip714d097107014ade5487" data-target-for="rpip69acaf3ad48692f2002b">Returns</h4>
10009 <p class="returns" id="rpip13b5387cfc6d0d059b0d" data-parent-id="rpip714d097107014ade5487" data-target-for="rpip13b5387cfc6d0d059b0d">the number of microseconds between the two timestamps (positive if <code id="rpipe5ac794da0eec25e2d74">to</code> is after <code id="rpip24eeff2405f4dd40e810">from</code> except in case of overflow) </p>
10013 <a id="ga522e97b4c9dfeb3db0bc702461b61a3a" name="ga522e97b4c9dfeb3db0bc702461b61a3a"></a>
10015 <div class="sect4">
10016 <h5 id="rpip845cd2c2eb9565c6ae8e">
10017 <a class="anchor" href="#rpip845cd2c2eb9565c6ae8e"></a>◆ absolute_time_min()</h5>
10018 <div class="memitem" id="rpip84f28dcb487ae5085f2f">
10019 <div class="memproto" id="rpip49bf10b8228c9d99bbae">
10020 <table class="mlabels" id="rpip3ff7811113b93eca625a">
10021 <tr id="rpip101619ed98930556c26a">
10022 <td class="mlabels-left" id="rpip43d59a29b4eec35d702b">
10023 <table class="memname" id="rpip8f6712b131d3ab4b2620">
10024 <tr id="rpipac578ae9ed8466c28721">
10025 <td class="memname" id="rpip33df9cec84e4dae3e7e0">static <a class="el" href="structabsolute__time__t.html" id="rpipf802f3715f3506ae4925">absolute_time_t</a> absolute_time_min </td>
10026 <td id="rpipcd9ed070b0cb92d328cc">(</td>
10027 <td class="paramtype" id="rpip132cccfb902164d3e251">
10028 <a class="el" href="structabsolute__time__t.html" id="rpipfeb509983f852be14d81">absolute_time_t</a>Â </td>
10029 <td class="paramname" id="rpip9d11cec222cdfa91b184">
10030 <em id="rpip3ce6ae52fc588b570aed">a</em>, </td>
10032 <tr id="rpipf7d29c8242a29b28c6ba">
10033 <td class="paramkey" id="rpip6a741c5dc1ffacdd4307"></td>
10034 <td id="rpipcf00a37fb81e5ca35702"></td>
10035 <td class="paramtype" id="rpip9182288f726239eba4b7">
10036 <a class="el" href="structabsolute__time__t.html" id="rpipe4bf395ad1dd99beb00d">absolute_time_t</a>Â </td>
10037 <td class="paramname" id="rpipbc1094c0e88ea97edcc1">
10038 <em id="rpip059e9e66fd5219ce9763">b</em>Â </td>
10040 <tr id="rpip9757abcffb578e36c0c7">
10041 <td id="rpipc63f39493e3bb2b7155b"></td>
10042 <td id="rpipd55d6e38a2a56ca8ee4e">)</td>
10043 <td id="rpipb4a3f179e9019129a9a9"></td>
10044 <td id="rpip63a5bddcb85cc6aa9005"></td>
10048 <td class="mlabels-right" id="rpip3b9d1c6a6ca6f1949cf3">
10049 <span class="mlabels" id="rpip15ce52296a78cc18ad71"><span class="mlabel" id="rpip6378440d2c9827a3f488">inline</span><span class="mlabel" id="rpip29308d367e2f76afe35e">static</span></span> </td>
10053 <div class="memdoc" id="rpipfb8a991d9430021d7482">
10055 <p id="rpip61ab30b30f579fe20315">Return the earlier of two timestamps. </p>
10056 <h4 id="rpipa8f2aeda49badd88c5e6" data-parent-id="rpipd12ab12a594dcf590796" data-target-for="rpipa8f2aeda49badd88c5e6">Parameters</h4>
10057 <p class="paragraph" id="rpip2332f08bd8167faf45ae" data-parent-id="rpipd12ab12a594dcf590796" data-target-for="rpip2332f08bd8167faf45ae">
10059 <table class="params" id="rpipc8f2ce73cba3a98c280a">
10060 <tr id="rpip33ddf76df1b595cd5df2">
10061 <td class="paramname" id="rpip203d5a0e3fdc37339ef0">a</td>
10062 <td id="rpipac00298ccb52d8ada9e0">the first timestamp </td>
10064 <tr id="rpip9d7a1118051b188ae66e">
10065 <td class="paramname" id="rpip9ad2b13a52e4d26390e0">b</td>
10066 <td id="rpipb5674ef2f45943e34a32">the second timestamp </td>
10072 <h4 class="label" id="rpipab52af55ffed9fe65b99" data-parent-id="rpipae2c30083b439b4971e5" data-target-for="rpipab52af55ffed9fe65b99">Returns</h4>
10073 <p class="returns" id="rpip84d8dce1171f9c70ff5f" data-parent-id="rpipae2c30083b439b4971e5" data-target-for="rpip84d8dce1171f9c70ff5f">the earlier of the two timestamps </p>
10077 <a id="ga7ee031a9cdeb9a9a6328d1b41d53cf5c" name="ga7ee031a9cdeb9a9a6328d1b41d53cf5c"></a>
10079 <div class="sect4">
10080 <h5 id="rpipe3a4ce0c411d6b98d8ce">
10081 <a class="anchor" href="#rpipe3a4ce0c411d6b98d8ce"></a>◆ delayed_by_ms()</h5>
10082 <div class="memitem" id="rpipe9d1ec6dc968b8ed3e71">
10083 <div class="memproto" id="rpipe79d410627a22f92000e">
10084 <table class="mlabels" id="rpip2074258e69a6d2709002">
10085 <tr id="rpip1aad455636444bc88e4b">
10086 <td class="mlabels-left" id="rpip634a764b8c5ed182b37b">
10087 <table class="memname" id="rpipeed7fa4df2a1f8efdb69">
10088 <tr id="rpip199bf9cfc9761b2d7852">
10089 <td class="memname" id="rpip55bcf208dc586a9c4c29">static <a class="el" href="structabsolute__time__t.html" id="rpip648d9ad53fe3d54238eb">absolute_time_t</a> delayed_by_ms </td>
10090 <td id="rpip352b917aa4ef37a846c1">(</td>
10091 <td class="paramtype" id="rpip98a481db51bd5cfe179a">const <a class="el" href="structabsolute__time__t.html" id="rpipf3b8589ab383e04506de">absolute_time_t</a>Â </td>
10092 <td class="paramname" id="rpipc339064321619465b72f">
10093 <em id="rpip96f908f2f1dfdc331521">t</em>, </td>
10095 <tr id="rpip193e0e7faa9d5206ab50">
10096 <td class="paramkey" id="rpipa77e7f30b758ed3cbbf5"></td>
10097 <td id="rpip09fbde01be9199a2f652"></td>
10098 <td class="paramtype" id="rpip012c74e03a26628b3246">uint32_t </td>
10099 <td class="paramname" id="rpipa6ced4db1eb9685750b0">
10100 <em id="rpip0600dc63e5109af5eb27">ms</em>Â </td>
10102 <tr id="rpipe3098026bcfe26fad466">
10103 <td id="rpip0e638573c09efa430c44"></td>
10104 <td id="rpip3d23e8133de8b4ae58e1">)</td>
10105 <td id="rpipad931aeb04bcabf5fc50"></td>
10106 <td id="rpip9cbb7293ed98c0224abf"></td>
10110 <td class="mlabels-right" id="rpipb2c0e2c88ddf2dff01ec">
10111 <span class="mlabels" id="rpip383be1b510d64c169cb8"><span class="mlabel" id="rpipbba50ee66ac8229efe49">inline</span><span class="mlabel" id="rpip461ed260e5ab36f8ba3b">static</span></span> </td>
10115 <div class="memdoc" id="rpipcef99da94292693ad01b">
10117 <p id="rpip1931bd0a945adb181333">Return a timestamp value obtained by adding a number of milliseconds to another timestamp. </p>
10118 <h4 id="rpipe1671e0fbfff761fccce" data-parent-id="rpip187982f47709b2e85908" data-target-for="rpipe1671e0fbfff761fccce">Parameters</h4>
10119 <p class="paragraph" id="rpipd712412378a18491bbc1" data-parent-id="rpip187982f47709b2e85908" data-target-for="rpipd712412378a18491bbc1">
10121 <table class="params" id="rpipb9a5ca186133aa050fb8">
10122 <tr id="rpip7915ebafa0d05cb93e66">
10123 <td class="paramname" id="rpipffa9682ce16ed127c85c">t</td>
10124 <td id="rpip34f4772e23a19e53918c">the base timestamp </td>
10126 <tr id="rpip527a51a631d3e61c5f13">
10127 <td class="paramname" id="rpipb2e34853734dd7a3f0f9">ms</td>
10128 <td id="rpipcd9a168c02de604ad070">the number of milliseconds to add </td>
10134 <h4 class="label" id="rpip88e1b74ebca55b72f566" data-parent-id="rpipe5859543b3cb6a64fe16" data-target-for="rpip88e1b74ebca55b72f566">Returns</h4>
10135 <p class="returns" id="rpipe05b0091409c5f105c32" data-parent-id="rpipe5859543b3cb6a64fe16" data-target-for="rpipe05b0091409c5f105c32">the timestamp representing the resulting time </p>
10139 <a id="ga729dc88ec38af2d054ba7307214bcf3c" name="ga729dc88ec38af2d054ba7307214bcf3c"></a>
10141 <div class="sect4">
10142 <h5 id="rpip9f829eeb661714319e06">
10143 <a class="anchor" href="#rpip9f829eeb661714319e06"></a>◆ delayed_by_us()</h5>
10144 <div class="memitem" id="rpipf6938d0265966be3eb23">
10145 <div class="memproto" id="rpip670d62519bf7101db85b">
10146 <table class="mlabels" id="rpipe1427ab82349f8221b50">
10147 <tr id="rpip8eac92e74c0d27abc5ba">
10148 <td class="mlabels-left" id="rpip01724726ccdbd8dd6d5b">
10149 <table class="memname" id="rpipbba4451df5e8f00ed2d6">
10150 <tr id="rpipe0ad034acb0c0effde51">
10151 <td class="memname" id="rpipdf2cd386855abab8576e">static <a class="el" href="structabsolute__time__t.html" id="rpip0db387daef0c8d3e85c2">absolute_time_t</a> delayed_by_us </td>
10152 <td id="rpipd8ece74b6d7794556757">(</td>
10153 <td class="paramtype" id="rpip6fd9b15503e7bbd93b25">const <a class="el" href="structabsolute__time__t.html" id="rpipaac070ca792897a15376">absolute_time_t</a>Â </td>
10154 <td class="paramname" id="rpip9d1df5b5b2bb33c64958">
10155 <em id="rpip60e6a5679bd478b9ae32">t</em>, </td>
10157 <tr id="rpip8cc3109f5efaea8ce6ef">
10158 <td class="paramkey" id="rpip25ed9f444ab95507993c"></td>
10159 <td id="rpipd3dc4811b405bf458182"></td>
10160 <td class="paramtype" id="rpip69adc1693a21ac9387c7">uint64_t </td>
10161 <td class="paramname" id="rpip3dfa14351044c8904c62">
10162 <em id="rpip3900c4e0fbd841c57cb6">us</em>Â </td>
10164 <tr id="rpip9e256f1c677419011960">
10165 <td id="rpip3750cc2b030ec8b30488"></td>
10166 <td id="rpip78bf755cf1efd042e037">)</td>
10167 <td id="rpip9245016fc9851c201f99"></td>
10168 <td id="rpip98d912a03365f6cddecb"></td>
10172 <td class="mlabels-right" id="rpip92ffbaba0ee01202076b">
10173 <span class="mlabels" id="rpip220cda95ddd46f08eb67"><span class="mlabel" id="rpipa9f38cf8ec37f12ae8f4">inline</span><span class="mlabel" id="rpip6b8a28143bf8d0b68210">static</span></span> </td>
10177 <div class="memdoc" id="rpipd273ac92a6f0031641ef">
10179 <p id="rpip0d0e593ffa854b3fcf20">Return a timestamp value obtained by adding a number of microseconds to another timestamp. </p>
10180 <h4 id="rpip53c1025471f59d3a6f83" data-parent-id="rpipb499cc29894fc659b19d" data-target-for="rpip53c1025471f59d3a6f83">Parameters</h4>
10181 <p class="paragraph" id="rpip027fef144af969c9523b" data-parent-id="rpipb499cc29894fc659b19d" data-target-for="rpip027fef144af969c9523b">
10183 <table class="params" id="rpip5483e30e2b1874239cac">
10184 <tr id="rpip3064987f8843ef73821e">
10185 <td class="paramname" id="rpipd8efc104fb81ed5da9d0">t</td>
10186 <td id="rpip8d91608010b1043f610d">the base timestamp </td>
10188 <tr id="rpipe8f8cd7f08fe49d87e96">
10189 <td class="paramname" id="rpip90db58d5ad93255b8fe4">us</td>
10190 <td id="rpip9fccb26a4ba983d66e1d">the number of microseconds to add </td>
10196 <h4 class="label" id="rpip1e838d975ac781185275" data-parent-id="rpip1721fdfd81f946bc09ed" data-target-for="rpip1e838d975ac781185275">Returns</h4>
10197 <p class="returns" id="rpip248c43ab091bb0cb87f1" data-parent-id="rpip1721fdfd81f946bc09ed" data-target-for="rpip248c43ab091bb0cb87f1">the timestamp representing the resulting time </p>
10201 <a id="ga2cf14d0bdee9614a98aa34a0e760fb89" name="ga2cf14d0bdee9614a98aa34a0e760fb89"></a>
10203 <div class="sect4">
10204 <h5 id="rpipe99f16901aaca669e386">
10205 <a class="anchor" href="#rpipe99f16901aaca669e386"></a>◆ from_us_since_boot()</h5>
10206 <div class="memitem" id="rpip2f7d51c6e740722a337a">
10207 <div class="memproto" id="rpip23a35ba75113141a19d5">
10208 <table class="mlabels" id="rpipc6f5e04ad6779e8c2f17">
10209 <tr id="rpip3f8a0eef8560c73f21c3">
10210 <td class="mlabels-left" id="rpip6a59da138df1324d3a72">
10211 <table class="memname" id="rpipc07a99e5b4174108cc0a">
10212 <tr id="rpip07c53ebf04ecb76bbeb0">
10213 <td class="memname" id="rpipa536b023bafc31ce2ee1">static <a class="el" href="structabsolute__time__t.html" id="rpip8b5c7ca284523072c5f5">absolute_time_t</a> from_us_since_boot </td>
10214 <td id="rpipe0b3fe604c6098e410dd">(</td>
10215 <td class="paramtype" id="rpip27f84a86b42b295046bf">uint64_t </td>
10216 <td class="paramname" id="rpipca1ad90ce3e56986be93"><em id="rpip1e9825c585072f1576d0">us_since_boot</em></td>
10217 <td id="rpip3fe6a070f42678a5a38c">)</td>
10218 <td id="rpipc1972e7ca8cdf45cebce"></td>
10222 <td class="mlabels-right" id="rpip4293228a185a5eb8f4b7">
10223 <span class="mlabels" id="rpipb6deb32edaadc0e32816"><span class="mlabel" id="rpipb20da838da9a4112377f">inline</span><span class="mlabel" id="rpipd5ff870a8d96ee20b61c">static</span></span> </td>
10227 <div class="memdoc" id="rpip3a5a2e4e5709911c1b95">
10229 <p id="rpipb19a05ba90857b4eebc3">convert a number of microseconds since boot to an <a class="el" href="structabsolute__time__t.html" id="rpip19db95c2ac451a54d68f">absolute_time_t</a> </p>
10230 <p id="rpiped59edbfd10029ba6782">fn from_us_since_boot </p>
10231 <h4 id="rpip5da1ec98c3317edcf2b6" data-parent-id="rpip4f29fce2a8160f94e9ee" data-target-for="rpip5da1ec98c3317edcf2b6">Parameters</h4>
10232 <p class="paragraph" id="rpip9456082fbc8ea724e743" data-parent-id="rpip4f29fce2a8160f94e9ee" data-target-for="rpip9456082fbc8ea724e743">
10234 <table class="params" id="rpipc2ed7e641510b7447f47">
10235 <tr id="rpip6310bcd11c88f1fb0a8a">
10236 <td class="paramname" id="rpip278870865dc399157ce0">us_since_boot</td>
10237 <td id="rpipdd04d8af0fbd5b823110">number of microseconds since boot </td>
10243 <h4 class="label" id="rpip5fc64a172d646b85e2c9" data-parent-id="rpip209722936be07c6cdebb" data-target-for="rpip5fc64a172d646b85e2c9">Returns</h4>
10244 <p class="returns" id="rpipe1b52e5f2fb07c89b71a" data-parent-id="rpip209722936be07c6cdebb" data-target-for="rpipe1b52e5f2fb07c89b71a">an absolute time equivalent to us_since_boot </p>
10248 <a id="ga6a1d4dfb43030b6594fa050f50feb47a" name="ga6a1d4dfb43030b6594fa050f50feb47a"></a>
10250 <div class="sect4">
10251 <h5 id="rpip44f7b6a2c93b1f2927cd">
10252 <a class="anchor" href="#rpip44f7b6a2c93b1f2927cd"></a>◆ get_absolute_time()</h5>
10253 <div class="memitem" id="rpip2222929e41c5141a966d">
10254 <div class="memproto" id="rpipc1d642a8bbde16bb38e6">
10255 <table class="mlabels" id="rpip20bc693efd1f527966df">
10256 <tr id="rpip98108be03b4cf05f3e16">
10257 <td class="mlabels-left" id="rpipb17beee17dca644743c9">
10258 <table class="memname" id="rpipbf4d294f48d120c13614">
10259 <tr id="rpip1b7026794c84e3ddde9c">
10260 <td class="memname" id="rpip4534c0f63ac2d63e4727">static <a class="el" href="structabsolute__time__t.html" id="rpip71b3f3b0433d40aa3425">absolute_time_t</a> get_absolute_time </td>
10261 <td id="rpip5486108426f37fc2a104">(</td>
10262 <td class="paramtype" id="rpip11ba5fdf9cf1eaf9f94e">void </td>
10263 <td class="paramname" id="rpip15c096eb51bbd7ada929"></td>
10264 <td id="rpip6c66b80bad378bf11484">)</td>
10265 <td id="rpip80dd70852ea0b63b8019"></td>
10269 <td class="mlabels-right" id="rpipf9aa10d874f52522dbb4">
10270 <span class="mlabels" id="rpipa5330707c7bfe59b27ba"><span class="mlabel" id="rpip15132da34ad708282465">inline</span><span class="mlabel" id="rpipe283ae88ca1d668ba41a">static</span></span> </td>
10274 <div class="memdoc" id="rpipa3e98511459d56252b1d">
10276 <p id="rpip2ba92703f71677ab3b75">Return a representation of the current time. </p>
10277 <p id="rpip01ddb531d5e446331a59">Returns an opaque high fidelity representation of the current time sampled during the call.</p>
10278 <h4 class="label" id="rpip70b6840afcb0bacb9b13" data-parent-id="rpipf0e3b8d77b8a862174a5" data-target-for="rpip70b6840afcb0bacb9b13">Returns</h4>
10279 <p class="returns" id="rpip8c5d944e9b5a5aae406a" data-parent-id="rpipf0e3b8d77b8a862174a5" data-target-for="rpip8c5d944e9b5a5aae406a">the absolute time (now) of the hardware timer</p>
10280 <p class="see" id="rpip849632ef3e623fa03778" data-parent-id="rpipa3e98511459d56252b1d" data-target-for="rpip849632ef3e623fa03778"><span class="label" id="rpipa23b59dcf1963d14dd9f" data-parent-id="rpip849632ef3e623fa03778" data-target-for="rpipa23b59dcf1963d14dd9f">See also</span><span class="target" id="rpipd4f132684af4370c2b1e" data-parent-id="rpip849632ef3e623fa03778" data-target-for="rpipd4f132684af4370c2b1e"><a class="el" href="structabsolute__time__t.html" id="rpipe043b207b36f9c070ad5">absolute_time_t</a> </span>
10282 <span class="target" id="rpip6ee0c9679fabf265185a" data-parent-id="rpip849632ef3e623fa03778" data-target-for="rpip6ee0c9679fabf265185a">
10283 <a class="el" href="high_level.html#ga7abed28d3918fe2b15f8007ba6569172" title="Wait until after the given timestamp to return." id="rpip0c215ffc8b187c68d8cb" data-adjusted="true">sleep_until()</a> </span>
10285 <span class="target" id="rpip2b1e4103c98261c98e9e" data-parent-id="rpip849632ef3e623fa03778" data-target-for="rpip2b1e4103c98261c98e9e">
10286 <a class="el" href="hardware.html#ga7bbcd996dbd3dd4adc03a80272fb2fc3" title="Return the current 64 bit timestamp value in microseconds." id="rpipf07033473a35a180b088" data-adjusted="true">time_us_64()</a> </span></p>
10292 <a id="ga408e44143880dd2a9ebfe2f3ebeab242" name="ga408e44143880dd2a9ebfe2f3ebeab242"></a>
10294 <div class="sect4">
10295 <h5 id="rpipb81c945e3f26944f22ed">
10296 <a class="anchor" href="#rpipb81c945e3f26944f22ed"></a>◆ is_at_the_end_of_time()</h5>
10297 <div class="memitem" id="rpipfee7c12627b8d74b3014">
10298 <div class="memproto" id="rpip5f9f455385571b30a01d">
10299 <table class="mlabels" id="rpipb166331dadc4b514dc47">
10300 <tr id="rpip193b60ae4f4ac50364db">
10301 <td class="mlabels-left" id="rpip17485b757caea71d605e">
10302 <table class="memname" id="rpip2351ec205efefcce0d97">
10303 <tr id="rpipded48203d81d63511419">
10304 <td class="memname" id="rpip9ac608fc065d45316a00">static bool is_at_the_end_of_time </td>
10305 <td id="rpipe1627028b1723345bf7f">(</td>
10306 <td class="paramtype" id="rpip6085bcff2180a484be8f">
10307 <a class="el" href="structabsolute__time__t.html" id="rpip61152632523ca6c6a164">absolute_time_t</a>Â </td>
10308 <td class="paramname" id="rpipa205d2aa8b9bed9e9869"><em id="rpipeeb42bbfa4e433df0545">t</em></td>
10309 <td id="rpipdaaab8777293b1699836">)</td>
10310 <td id="rpip0a1facaab678612ed3a8"></td>
10314 <td class="mlabels-right" id="rpipb61663195e6bf2ec9280">
10315 <span class="mlabels" id="rpipa9174a638b2d9e062984"><span class="mlabel" id="rpipdf8e71669d7d89ff2660">inline</span><span class="mlabel" id="rpip5b5ad4fb363e64292c38">static</span></span> </td>
10319 <div class="memdoc" id="rpip93685a4826cb53b0e949">
10321 <p id="rpipafe540c80ee5d9bae7b9">Determine if the given timestamp is "at_the_end_of_time". </p>
10322 <h4 id="rpip3599d9d1579415d1c235" data-parent-id="rpipa7c52af770309aacbe6b" data-target-for="rpip3599d9d1579415d1c235">Parameters</h4>
10323 <p class="paragraph" id="rpipa7e2599478e405372c01" data-parent-id="rpipa7c52af770309aacbe6b" data-target-for="rpipa7e2599478e405372c01">
10325 <table class="params" id="rpip06b728482a0493f56a50">
10326 <tr id="rpip4db7ed0c250d91a6b71a">
10327 <td class="paramname" id="rpip90e9f232709dc27d821e">t</td>
10328 <td id="rpip6cace14f826397320a6f">the timestamp </td>
10334 <h4 class="label" id="rpipfa31475f441989cef38c" data-parent-id="rpip20ce41b9340e7704b7f3" data-target-for="rpipfa31475f441989cef38c">Returns</h4>
10335 <p class="returns" id="rpipda1d8beb1313e748a4e9" data-parent-id="rpip20ce41b9340e7704b7f3" data-target-for="rpipda1d8beb1313e748a4e9">true if the timestamp is at_the_end_of_time </p>
10336 <p class="see" id="rpip00c0dbe85b684e285d38" data-parent-id="rpip93685a4826cb53b0e949" data-target-for="rpip00c0dbe85b684e285d38"><span class="label" id="rpip6b5561c1c91d57d8de47" data-parent-id="rpip00c0dbe85b684e285d38" data-target-for="rpip6b5561c1c91d57d8de47">See also</span><span class="target" id="rpip5f35bb56bafdd83da1ff" data-parent-id="rpip00c0dbe85b684e285d38" data-target-for="rpip5f35bb56bafdd83da1ff"><a class="el" href="#gab375b40e949dce1052298f79c66f7120" title="The timestamp representing the end of time; this is actually not the maximum possible timestamp,..." id="rpipacc1265aae356e9a0921" data-adjusted="true">at_the_end_of_time</a> </span></p>
10342 <a id="ga0753884ef1d9340edacf53e9c06e42de" name="ga0753884ef1d9340edacf53e9c06e42de"></a>
10344 <div class="sect4">
10345 <h5 id="rpip9346a7b919998cb153d7">
10346 <a class="anchor" href="#rpip9346a7b919998cb153d7"></a>◆ is_nil_time()</h5>
10347 <div class="memitem" id="rpip757a2600665f82d35b3f">
10348 <div class="memproto" id="rpip14cef919fd307fe391da">
10349 <table class="mlabels" id="rpip1d27eaf8fac2938ec907">
10350 <tr id="rpip8c93244388394bf11050">
10351 <td class="mlabels-left" id="rpipa050f97c79bee7cb2e79">
10352 <table class="memname" id="rpip6ea00cbd7e24f622b64e">
10353 <tr id="rpip4fc33c62caf3ccf264e6">
10354 <td class="memname" id="rpipce21b4b72cc6781fe45f">static bool is_nil_time </td>
10355 <td id="rpip4810617129e9309aa5d9">(</td>
10356 <td class="paramtype" id="rpip4a766367d56c9dc523b3">
10357 <a class="el" href="structabsolute__time__t.html" id="rpip97f71f9eba68f2c5847d">absolute_time_t</a>Â </td>
10358 <td class="paramname" id="rpipc8deed6c10f450350f37"><em id="rpipcc77b75f25480564ce85">t</em></td>
10359 <td id="rpipae35b86d4505a373c6a2">)</td>
10360 <td id="rpip6d1e189d862a1b4ef5b1"></td>
10364 <td class="mlabels-right" id="rpip4a9680b9d3762da1dc3e">
10365 <span class="mlabels" id="rpip92aea9ba8b7dcf20b450"><span class="mlabel" id="rpip88a12641cfcc2b5a6cd8">inline</span><span class="mlabel" id="rpip1552d7cefca54c67066c">static</span></span> </td>
10369 <div class="memdoc" id="rpipedea28d555d1fe234d46">
10371 <p id="rpip85593385bcaabad1d7ff">Determine if the given timestamp is nil. </p>
10372 <h4 id="rpip01b627156d97453ba49b" data-parent-id="rpip7bd9d4f1380bd3cd48d9" data-target-for="rpip01b627156d97453ba49b">Parameters</h4>
10373 <p class="paragraph" id="rpipd44911ea8bf996ecf418" data-parent-id="rpip7bd9d4f1380bd3cd48d9" data-target-for="rpipd44911ea8bf996ecf418">
10375 <table class="params" id="rpip15fc8e0d5e467fd7d981">
10376 <tr id="rpip89a71878f440fb6d1e32">
10377 <td class="paramname" id="rpipd15ad4c00e39e6a858d2">t</td>
10378 <td id="rpipc41c6f1b39a6c92b0238">the timestamp </td>
10384 <h4 class="label" id="rpipf496a17cd57eb829cd70" data-parent-id="rpip6bc1ded0927355dcc132" data-target-for="rpipf496a17cd57eb829cd70">Returns</h4>
10385 <p class="returns" id="rpip32f67ae2ce578b319c6b" data-parent-id="rpip6bc1ded0927355dcc132" data-target-for="rpip32f67ae2ce578b319c6b">true if the timestamp is nil </p>
10386 <p class="see" id="rpip99be3b5871b2efc4b2fc" data-parent-id="rpipedea28d555d1fe234d46" data-target-for="rpip99be3b5871b2efc4b2fc"><span class="label" id="rpip3b7cad80e77b2b34a65c" data-parent-id="rpip99be3b5871b2efc4b2fc" data-target-for="rpip3b7cad80e77b2b34a65c">See also</span><span class="target" id="rpip9b80abe68096aedd2b63" data-parent-id="rpip99be3b5871b2efc4b2fc" data-target-for="rpip9b80abe68096aedd2b63"><a class="el" href="#ga978d7972634296a1870c28b0727beefb" title="The timestamp representing a null timestamp." id="rpip5cc6edc6a837acb19e65" data-adjusted="true">nil_time</a> </span></p>
10392 <a id="gab11f5a243dd585b6903a87b0127df2cc" name="gab11f5a243dd585b6903a87b0127df2cc"></a>
10394 <div class="sect4">
10395 <h5 id="rpip51c85334b2e7b66a6d2a">
10396 <a class="anchor" href="#rpip51c85334b2e7b66a6d2a"></a>◆ make_timeout_time_ms()</h5>
10397 <div class="memitem" id="rpipf56cc0242b2c9db7da89">
10398 <div class="memproto" id="rpip13cbc1fed064dc265957">
10399 <table class="mlabels" id="rpip2c57932e1d45072cbf14">
10400 <tr id="rpip6d4100be5148e5871c05">
10401 <td class="mlabels-left" id="rpipb01f1dc5ebc058918a02">
10402 <table class="memname" id="rpipc2b09996eaed6b316e2d">
10403 <tr id="rpipdeef5777cc90e6b308ac">
10404 <td class="memname" id="rpip2b74c9503aa0e5a81faf">static <a class="el" href="structabsolute__time__t.html" id="rpipfb4446bd0624f8135129">absolute_time_t</a> make_timeout_time_ms </td>
10405 <td id="rpip5bf3c294891d95859348">(</td>
10406 <td class="paramtype" id="rpipadbae15b661220c125fc">uint32_t </td>
10407 <td class="paramname" id="rpip03cbcaf5cbb846090697"><em id="rpip031387390bfb740774a1">ms</em></td>
10408 <td id="rpipdfb8abcae22d0a9af9de">)</td>
10409 <td id="rpip7f9eeeecd20a13603120"></td>
10413 <td class="mlabels-right" id="rpip5f24459433a30dc23d5e">
10414 <span class="mlabels" id="rpip96f43492637b867aaa6e"><span class="mlabel" id="rpip7b918388ff1673af00ba">inline</span><span class="mlabel" id="rpiped0454c38b8d194376a4">static</span></span> </td>
10418 <div class="memdoc" id="rpip54848af7341ee95051b7">
10420 <p id="rpip1387f95264dff19fa55a">Convenience method to get the timestamp a number of milliseconds from the current time. </p>
10421 <h4 id="rpip7e05539a7c0fab390e6f" data-parent-id="rpip8afa07909754f081ae0f" data-target-for="rpip7e05539a7c0fab390e6f">Parameters</h4>
10422 <p class="paragraph" id="rpipd42055835b90a9531cfa" data-parent-id="rpip8afa07909754f081ae0f" data-target-for="rpipd42055835b90a9531cfa">
10424 <table class="params" id="rpip95250e50416878dcf57c">
10425 <tr id="rpip2ec1d7f72ba15aaeb65f">
10426 <td class="paramname" id="rpipea9fc159053c0535ca48">ms</td>
10427 <td id="rpip097f4dc8ad71eeb966d2">the number of milliseconds to add to the current timestamp </td>
10433 <h4 class="label" id="rpipd5209c296419ab823d25" data-parent-id="rpipaeb22eb6a8edd23ab824" data-target-for="rpipd5209c296419ab823d25">Returns</h4>
10434 <p class="returns" id="rpip5a06d2bf66a8255d6aef" data-parent-id="rpipaeb22eb6a8edd23ab824" data-target-for="rpip5a06d2bf66a8255d6aef">the future timestamp </p>
10438 <a id="ga70921b9073202a54eec3494b4d19ec84" name="ga70921b9073202a54eec3494b4d19ec84"></a>
10440 <div class="sect4">
10441 <h5 id="rpipa37afd3728a221e33add">
10442 <a class="anchor" href="#rpipa37afd3728a221e33add"></a>◆ make_timeout_time_us()</h5>
10443 <div class="memitem" id="rpip51a80ad0fb666203c53b">
10444 <div class="memproto" id="rpipfc772e25e132a7ece5db">
10445 <table class="mlabels" id="rpipc0ca33bc64d034c39ef5">
10446 <tr id="rpipabfa19f8d8df1a3e2779">
10447 <td class="mlabels-left" id="rpipeb3ffcfb35e32eeb5d52">
10448 <table class="memname" id="rpip7102a3cd44c7571fe5c7">
10449 <tr id="rpip9e66cc114477f1aced6b">
10450 <td class="memname" id="rpip95bf0d1f025724be6e59">static <a class="el" href="structabsolute__time__t.html" id="rpip9687926524188aa060e7">absolute_time_t</a> make_timeout_time_us </td>
10451 <td id="rpip953cbce2d98c6d78d680">(</td>
10452 <td class="paramtype" id="rpip4dfab51a99cd11451472">uint64_t </td>
10453 <td class="paramname" id="rpipaa629df8dadf8b5a8fae"><em id="rpipbe695d9a8e9e1aeb4437">us</em></td>
10454 <td id="rpipd4a14b8182cd173ea625">)</td>
10455 <td id="rpip67ccb65addc6117ff7b9"></td>
10459 <td class="mlabels-right" id="rpipb93f703bf986be84e1bc">
10460 <span class="mlabels" id="rpip56815269fd0272252fa7"><span class="mlabel" id="rpip6a11b9c28f1a18f83b6a">inline</span><span class="mlabel" id="rpip9a2cf2deb4cdebff9291">static</span></span> </td>
10464 <div class="memdoc" id="rpip08c6cc2143d0e55f6ea6">
10466 <p id="rpipaa6104348a46636e7bcb">Convenience method to get the timestamp a number of microseconds from the current time. </p>
10467 <h4 id="rpip433dfa649ab318a1379c" data-parent-id="rpip919d03eb85b09289fe5e" data-target-for="rpip433dfa649ab318a1379c">Parameters</h4>
10468 <p class="paragraph" id="rpip54b2a5b3f443dc134116" data-parent-id="rpip919d03eb85b09289fe5e" data-target-for="rpip54b2a5b3f443dc134116">
10470 <table class="params" id="rpip91f39ef2b7b8c00bee6a">
10471 <tr id="rpipdac47153c7ea396eb38b">
10472 <td class="paramname" id="rpip18ab985aeafd09237647">us</td>
10473 <td id="rpip255a57b6808a9e061a6d">the number of microseconds to add to the current timestamp </td>
10479 <h4 class="label" id="rpip1750fcf491634ae66517" data-parent-id="rpip0a77c955cb2913192489" data-target-for="rpip1750fcf491634ae66517">Returns</h4>
10480 <p class="returns" id="rpip04668c020228efa2063d" data-parent-id="rpip0a77c955cb2913192489" data-target-for="rpip04668c020228efa2063d">the future timestamp </p>
10484 <a id="gab12467c48bde27171b552ac4dc8c7d59" name="gab12467c48bde27171b552ac4dc8c7d59"></a>
10486 <div class="sect4">
10487 <h5 id="rpipff0e476a90c82d634199">
10488 <a class="anchor" href="#rpipff0e476a90c82d634199"></a>◆ to_ms_since_boot()</h5>
10489 <div class="memitem" id="rpip027ca9cafd07e615abd7">
10490 <div class="memproto" id="rpipd1c4e1fc12968e166b87">
10491 <table class="mlabels" id="rpip2b3cd5c3b70b0a8b7c1a">
10492 <tr id="rpipda2fe8864851a21354ef">
10493 <td class="mlabels-left" id="rpip03fc96b07c451dc09882">
10494 <table class="memname" id="rpip0393436c5969dd791d1a">
10495 <tr id="rpip623941314a8fa88afee0">
10496 <td class="memname" id="rpipd89a7576a6c12ee72c0a">static uint32_t to_ms_since_boot </td>
10497 <td id="rpip120c4099adc309dfddca">(</td>
10498 <td class="paramtype" id="rpipf4e1eee27c498004432a">
10499 <a class="el" href="structabsolute__time__t.html" id="rpip7295928e18f94bbd53c2">absolute_time_t</a>Â </td>
10500 <td class="paramname" id="rpipf6961ea69a5f519fc189"><em id="rpipcab4f8f702b3e23f12f7">t</em></td>
10501 <td id="rpip1438c2bb70cc00136672">)</td>
10502 <td id="rpipadca09eb2ce511e9fe99"></td>
10506 <td class="mlabels-right" id="rpipa20e88e00e89e8a31ec6">
10507 <span class="mlabels" id="rpip6852315399aa92ca67e8"><span class="mlabel" id="rpip87205e2dded73ecba212">inline</span><span class="mlabel" id="rpip4ef3c185f21227d59efc">static</span></span> </td>
10511 <div class="memdoc" id="rpip44c4c82ac55128ecb135">
10513 <p id="rpip0b4972467456e07426d1">Convert a timestamp into a number of milliseconds since boot. </p>
10514 <p id="rpipf5aa7376906d397a21d3">fn to_ms_since_boot</p>
10515 <h4 id="rpipebe5054ef81eb48b76e8" data-parent-id="rpip2ce42f2965dcab48b932" data-target-for="rpipebe5054ef81eb48b76e8">Parameters</h4>
10516 <p class="paragraph" id="rpipcaea99222017d91982c8" data-parent-id="rpip2ce42f2965dcab48b932" data-target-for="rpipcaea99222017d91982c8">
10518 <table class="params" id="rpip7ca2c1cbaa6e4c2f5e04">
10519 <tr id="rpipc7dca6e5b15ae70eeb5f">
10520 <td class="paramname" id="rpipc59539854f50350299de">t</td>
10521 <td id="rpip9467989bff2d561b1168">an <a class="el" href="structabsolute__time__t.html" id="rpip261db043018d325d4d6b">absolute_time_t</a> value to convert </td>
10527 <h4 class="label" id="rpip4581e988ca1481a4859e" data-parent-id="rpipb1ff3a2e1256803b53ac" data-target-for="rpip4581e988ca1481a4859e">Returns</h4>
10528 <p class="returns" id="rpip384ed13afb585a32f685" data-parent-id="rpipb1ff3a2e1256803b53ac" data-target-for="rpip384ed13afb585a32f685">the number of milliseconds since boot represented by t </p>
10529 <p class="see" id="rpip55ef84b235e57bc36917" data-parent-id="rpip44c4c82ac55128ecb135" data-target-for="rpip55ef84b235e57bc36917"><span class="label" id="rpipc02631587b01eb7c9cef" data-parent-id="rpip55ef84b235e57bc36917" data-target-for="rpipc02631587b01eb7c9cef">See also</span><span class="target" id="rpip2f10b1a5c17b14dbcc02" data-parent-id="rpip55ef84b235e57bc36917" data-target-for="rpip2f10b1a5c17b14dbcc02"><a class="el" href="#ga173698876ae00331c92ed4e8c3ba98d1" title="convert an absolute_time_t into a number of microseconds since boot." id="rpip361dfb20e5b6c774f709" data-adjusted="true">to_us_since_boot()</a> </span></p>
10535 <a id="ga173698876ae00331c92ed4e8c3ba98d1" name="ga173698876ae00331c92ed4e8c3ba98d1"></a>
10537 <div class="sect4">
10538 <h5 id="rpip9d9461ee6ae05d9da3aa">
10539 <a class="anchor" href="#rpip9d9461ee6ae05d9da3aa"></a>◆ to_us_since_boot()</h5>
10540 <div class="memitem" id="rpipc289588aef377affa8a5">
10541 <div class="memproto" id="rpip648164cb59855b8c5b06">
10542 <table class="mlabels" id="rpip65f8d7facf9f7d3c570b">
10543 <tr id="rpipa848f41809d59ccbeca2">
10544 <td class="mlabels-left" id="rpip7d50b7156e6b32ea5571">
10545 <table class="memname" id="rpip2e045a49c6da109a893a">
10546 <tr id="rpip513c3c9c5d34550a2a73">
10547 <td class="memname" id="rpipb9f4e454d4469b856c3a">static uint64_t to_us_since_boot </td>
10548 <td id="rpip1fa007568e8325090f8c">(</td>
10549 <td class="paramtype" id="rpip7379fe29a1e82e024d80">
10550 <a class="el" href="structabsolute__time__t.html" id="rpip61116c2e8fe02445a15a">absolute_time_t</a>Â </td>
10551 <td class="paramname" id="rpip3dbe01fe9dd1bf19f0e7"><em id="rpip9a91965da92c876218a8">t</em></td>
10552 <td id="rpipbd21eccf54bb17876bcb">)</td>
10553 <td id="rpip4dc7748de5451c484958"></td>
10557 <td class="mlabels-right" id="rpip823a5710d5ff26b5fa45">
10558 <span class="mlabels" id="rpip5cc7844874b3b9380cff"><span class="mlabel" id="rpip815b384983c763c6c2b9">inline</span><span class="mlabel" id="rpipbf1f088c99050ef3a05b">static</span></span> </td>
10562 <div class="memdoc" id="rpiped3190c089f27a8544a7">
10564 <p id="rpipd8545cbaf82711db6803">convert an <a class="el" href="structabsolute__time__t.html" id="rpip1b766a60a3f6115c73e3">absolute_time_t</a> into a number of microseconds since boot. </p>
10565 <p id="rpip63b22d1f3f01a7bd2eca">fn to_us_since_boot </p>
10566 <h4 id="rpip698c0259941dd795532f" data-parent-id="rpip1883580502cd7923b085" data-target-for="rpip698c0259941dd795532f">Parameters</h4>
10567 <p class="paragraph" id="rpip2d34266def3d204bc621" data-parent-id="rpip1883580502cd7923b085" data-target-for="rpip2d34266def3d204bc621">
10569 <table class="params" id="rpip7dd92d9224d115a6eb66">
10570 <tr id="rpip9d00661885e8de56256d">
10571 <td class="paramname" id="rpip823b1444f4914b699917">t</td>
10572 <td id="rpipf0cd6434dc32415eb670">the absolute time to convert </td>
10578 <h4 class="label" id="rpip911bbb1b0fe7ee7fba51" data-parent-id="rpip9b9183d51ba296f90bf2" data-target-for="rpip911bbb1b0fe7ee7fba51">Returns</h4>
10579 <p class="returns" id="rpip3b994e226ed11eaf2ccb" data-parent-id="rpip9b9183d51ba296f90bf2" data-target-for="rpip3b994e226ed11eaf2ccb">a number of microseconds since boot, equivalent to t </p>
10583 <a id="gacb69a734d588b758f1ada8af8efe6968" name="gacb69a734d588b758f1ada8af8efe6968"></a>
10585 <div class="sect4">
10586 <h5 id="rpipc72b12378fdbce02fa5f">
10587 <a class="anchor" href="#rpipc72b12378fdbce02fa5f"></a>◆ update_us_since_boot()</h5>
10588 <div class="memitem" id="rpipe92c5344d7e5c1f7e8c5">
10589 <div class="memproto" id="rpipbb957ac8682d9a064bb4">
10590 <table class="mlabels" id="rpipdb7f092b8dd7065587b1">
10591 <tr id="rpip10eb579fea19eefb791a">
10592 <td class="mlabels-left" id="rpip578c4f48d49c59c2cf28">
10593 <table class="memname" id="rpipa0cdffd6a970362f726d">
10594 <tr id="rpip8821dc30bc09effb4fb8">
10595 <td class="memname" id="rpip20dfd4dba9178bc63e8b">static void update_us_since_boot </td>
10596 <td id="rpipddd72cf38a58c51e39da">(</td>
10597 <td class="paramtype" id="rpip24585d41b1c160694397">
10598 <a class="el" href="structabsolute__time__t.html" id="rpip5fa94f2ef4182fddf671">absolute_time_t</a> *Â </td>
10599 <td class="paramname" id="rpip226fe3b5f79078a77024">
10600 <em id="rpip2de60d6112979284a24c">t</em>, </td>
10602 <tr id="rpip8cea37401d0cc49ca95b">
10603 <td class="paramkey" id="rpip63ddf5b84716365a682b"></td>
10604 <td id="rpip36ee8f095692d82f71dc"></td>
10605 <td class="paramtype" id="rpipdde74e2e26b7618b71aa">uint64_t </td>
10606 <td class="paramname" id="rpipa1801c8815b42c40080c">
10607 <em id="rpipb785dc5afbcf80175f06">us_since_boot</em>Â </td>
10609 <tr id="rpipb9fdd728a70dda5ade56">
10610 <td id="rpip7224b1c297233fd9e4d4"></td>
10611 <td id="rpipd56774ca76190f120cb0">)</td>
10612 <td id="rpip3dfcbc7f02a78042fdac"></td>
10613 <td id="rpip444681512483aa5f9bce"></td>
10617 <td class="mlabels-right" id="rpip36e1aa2cd4165218d00b">
10618 <span class="mlabels" id="rpip2765c317aa181ab7ac2f"><span class="mlabel" id="rpip33926cec884d0eec99fd">inline</span><span class="mlabel" id="rpipab17c9c214876d2170da">static</span></span> </td>
10622 <div class="memdoc" id="rpipe3cc42f215c10f18699d">
10624 <p id="rpip9061eeadb30e4c98ec3a">update an <a class="el" href="structabsolute__time__t.html" id="rpip23cf7103f314795217a6">absolute_time_t</a> value to represent a given number of microseconds since boot </p>
10625 <p id="rpip74076ad35077a4116413">fn update_us_since_boot </p>
10626 <h4 id="rpipf37ab4726ab44b228d91" data-parent-id="rpip76ded31bfa0d92f31c8f" data-target-for="rpipf37ab4726ab44b228d91">Parameters</h4>
10627 <p class="paragraph" id="rpipfc71a2b0b7402b77d839" data-parent-id="rpip76ded31bfa0d92f31c8f" data-target-for="rpipfc71a2b0b7402b77d839">
10629 <table class="params" id="rpipa7f571bddea8b847261e">
10630 <tr id="rpip89b70de085b03cec5085">
10631 <td class="paramname" id="rpipa40721447a3c4bdcdc08">t</td>
10632 <td id="rpip2aad02b00d89e90cfa2b">the absolute time value to update </td>
10634 <tr id="rpipde54cc015cfb1771ba72">
10635 <td class="paramname" id="rpipe72326d9883cd0987dcf">us_since_boot</td>
10636 <td id="rpipf00b231002e82718af99">the number of microseconds since boot to represent. Note this should be representable as a signed 64 bit integer </td>
10648 <div class="sect2">
10650 <a class="anchor" href="#sleep"></a>sleep</h3>
10651 <div class="ingroups" id="rpip5d35d908be713151641c">Part of: <a class="el" href="high_level.html" id="rpip43fb34e2975baaac015e">High Level APIs</a> » <a class="el" href="high_level.html#pico_time" id="rpipe25cf1eac455f199b5ab">pico_time</a>
10653 <p id="rpip0d817b5e4fba87a938f3">Sleep functions for delaying execution in a lower power state.
10654 <a href="#gaf469c6d691230e9d1008" id="rpip25976d77ba63da21f03c" data-adjusted="true">More...</a></p>
10655 <div class="sect3">
10656 <h4 id="rpip73bbceeb3de43a9a7c52">
10657 <a class="anchor" href="#rpip73bbceeb3de43a9a7c52"></a>Functions</h4>
10658 <ul class="memberdecls" id="rpip90459f0dcab29ba90f70" data-parent-id="rpip42c3cf8831009160d86f">
10659 <li class="memitem">
10660 <p data-target="true" data-target-for="rpip90459f0dcab29ba90f70"><span class="memItemLeft" data-target="true" id="rpip1171d1430b554622087c" data-parent-id="rpip90459f0dcab29ba90f70" data-target-for="rpip1171d1430b554622087c">void </span><span class="memItemRight" data-target="true" id="rpip67b45c08c10a831e0cd4" data-parent-id="rpip90459f0dcab29ba90f70" data-target-for="rpip67b45c08c10a831e0cd4"><a class="el" href="#ga7abed28d3918fe2b15f8007ba6569172" id="rpipec5445d7572925bc6218" data-adjusted="true">sleep_until</a> (<a class="el" href="structabsolute__time__t.html" id="rpip328fdd17c047dd25824d">absolute_time_t</a> target)</span></p>
10662 <li class="memdesc">
10663 <p data-target="true" data-target-for="rpip7a916846b570c22057bc"><span class="mdescLeft" data-target="true" id="rpip75abd28c4925e7890dcc" data-parent-id="rpip7a916846b570c22057bc" data-target-for="rpip75abd28c4925e7890dcc">Â </span><span class="mdescRight" data-target="true" id="rpip9e30fc9c66440b0142dd" data-parent-id="rpip7a916846b570c22057bc" data-target-for="rpip9e30fc9c66440b0142dd">Wait until after the given timestamp to return. <br id="rpipb4a6377b42f8b08ab92f"></span></p>
10665 <li class="memitem">
10666 <p data-target="true" data-target-for="rpip9f962b999627a9c8b561"><span class="memItemLeft" data-target="true" id="rpipadbc24812ba2c221dff0" data-parent-id="rpip9f962b999627a9c8b561" data-target-for="rpipadbc24812ba2c221dff0">void </span><span class="memItemRight" data-target="true" id="rpip733f39549bea7864b3fa" data-parent-id="rpip9f962b999627a9c8b561" data-target-for="rpip733f39549bea7864b3fa"><a class="el" href="#gaeeaebd3a10e0a193022f15c8603772ba" id="rpip5282273851594811c0da" data-adjusted="true">sleep_us</a> (uint64_t us)</span></p>
10668 <li class="memdesc">
10669 <p data-target="true" data-target-for="rpipdbf3e3d37d79dca54323"><span class="mdescLeft" data-target="true" id="rpip00797c2983e372657007" data-parent-id="rpipdbf3e3d37d79dca54323" data-target-for="rpip00797c2983e372657007">Â </span><span class="mdescRight" data-target="true" id="rpip8561afd0564567727918" data-parent-id="rpipdbf3e3d37d79dca54323" data-target-for="rpip8561afd0564567727918">Wait for the given number of microseconds before returning. <br id="rpip492387220b4e91be4e2b"></span></p>
10671 <li class="memitem">
10672 <p data-target="true" data-target-for="rpip74ec9ba21c7835a96663"><span class="memItemLeft" data-target="true" id="rpipe76a15b38543cfb185d1" data-parent-id="rpip74ec9ba21c7835a96663" data-target-for="rpipe76a15b38543cfb185d1">void </span><span class="memItemRight" data-target="true" id="rpipdd0f2e8fa90e7e897728" data-parent-id="rpip74ec9ba21c7835a96663" data-target-for="rpipdd0f2e8fa90e7e897728"><a class="el" href="#gae617a6842d4f3a192064c4354b88fcff" id="rpip6b72369c3bd73ac41757" data-adjusted="true">sleep_ms</a> (uint32_t ms)</span></p>
10674 <li class="memdesc">
10675 <p data-target="true" data-target-for="rpipdb44dcf62db42826a704"><span class="mdescLeft" data-target="true" id="rpip9deb4a591598af1b593e" data-parent-id="rpipdb44dcf62db42826a704" data-target-for="rpip9deb4a591598af1b593e">Â </span><span class="mdescRight" data-target="true" id="rpip775b6e555bbd459a7a94" data-parent-id="rpipdb44dcf62db42826a704" data-target-for="rpip775b6e555bbd459a7a94">Wait for the given number of milliseconds before returning. <br id="rpip889d1e404977bb82ef05"></span></p>
10677 <li class="memitem">
10678 <p data-target="true" data-target-for="rpip98500a97c516511dc87e"><span class="memItemLeft" data-target="true" id="rpip3373617cc1f622cd4b0b" data-parent-id="rpip98500a97c516511dc87e" data-target-for="rpip3373617cc1f622cd4b0b">bool </span><span class="memItemRight" data-target="true" id="rpip2243918b64c31fd1ec93" data-parent-id="rpip98500a97c516511dc87e" data-target-for="rpip2243918b64c31fd1ec93"><a class="el" href="#gaedc0ed51a5e908ddd660a5d279009abc" id="rpip4148573fb2d0bf7f01f7" data-adjusted="true">best_effort_wfe_or_timeout</a> (<a class="el" href="structabsolute__time__t.html" id="rpipa722323cdbd725565e07">absolute_time_t</a> timeout_timestamp)</span></p>
10680 <li class="memdesc">
10681 <p data-target="true" data-target-for="rpipd5993cfe615572a5a800"><span class="mdescLeft" data-target="true" id="rpipdb24f97e6244893e9ff1" data-parent-id="rpipd5993cfe615572a5a800" data-target-for="rpipdb24f97e6244893e9ff1">Â </span><span class="mdescRight" data-target="true" id="rpip8d3e90e7f01fd1740540" data-parent-id="rpipd5993cfe615572a5a800" data-target-for="rpip8d3e90e7f01fd1740540">Helper method for blocking on a timeout. <br id="rpip14f3eed56875f007a1f4"></span></p>
10684 <a name="details" id="gaf469c6d691230e9d1008"></a>
10686 <div class="sect3">
10687 <h4 id="rpipd6263c0dc72229b455b1">
10688 <a class="anchor" href="#rpipd6263c0dc72229b455b1"></a>Detailed Description</h4>
10689 <p id="rpip62ff714b86a565b2d936">Sleep functions for delaying execution in a lower power state. </p>
10690 <p id="rpip841fb7d28783e49d2caa">These functions allow the calling core to sleep. This is a lower powered sleep; waking and re-checking time on every processor event (WFE)</p>
10691 <div class="admonitionblock note" id="rpipb9794c260d025c8c12c2" data-parent-id="rpip726e0f5412e1b84c867c"><table>
10692 <tr data-target="true" data-target-for="rpipb9794c260d025c8c12c2">
10693 <td class="icon" id="rpip42abff9df61a61ac5ab2" data-parent-id="rpipb9794c260d025c8c12c2"><div class="title" data-target="true" data-target-for="rpip42abff9df61a61ac5ab2">Note</div></td>
10694 <td class="content" id="rpip764b338f14c665fc2d84" data-parent-id="rpipb9794c260d025c8c12c2" data-target-for="rpip764b338f14c665fc2d84">
10695 <p>These functions should not be called from an IRQ handler.</p>
10697 Lower powered sleep requires use of the <a class="el" href="high_level.html#ga5092ceb879289c0a597a389f34b4815e" id="rpipbc84af42895c24eaa505" data-adjusted="true">default alarm pool</a> which may be disabled by the PICO_TIME_DEFAULT_ALARM_POOL_DISABLED #define or currently full in which case these functions become busy waits instead.</p>
10699 Whilst <em id="rpip87289cce08f7b6ecbb02">sleep_</em> functions are preferable to <em id="rpip8a71979fb1a9a1e5bd3f">busy_wait</em> functions from a power perspective, the <em id="rpip3ab5ebffe80660bcbfa6">busy_wait</em> equivalent function may return slightly sooner after the target is reached.</p>
10704 <p class="see" id="rpip5c3be0ef1677fc4f87a2" data-parent-id="rpip726e0f5412e1b84c867c" data-target-for="rpip5c3be0ef1677fc4f87a2"><span class="label" id="rpipb68059ea1e2426a15ba2" data-parent-id="rpip5c3be0ef1677fc4f87a2" data-target-for="rpipb68059ea1e2426a15ba2">See also</span><span class="target" id="rpip786548ff29cc11e1ac72" data-parent-id="rpip5c3be0ef1677fc4f87a2" data-target-for="rpip786548ff29cc11e1ac72"><a class="el" href="hardware.html#gab1c72f391015ff00a96b24477aa327ee" title="Busy wait wasting cycles until after the specified timestamp." id="rpip9d7456d6c8dfecd9ab4d" data-adjusted="true">busy_wait_until()</a> </span>
10706 <span class="target" id="rpip520aee70aed5ddf78fb7" data-parent-id="rpip5c3be0ef1677fc4f87a2" data-target-for="rpip520aee70aed5ddf78fb7">
10707 <a class="el" href="hardware.html#gac089d1c42bb7658bb43c798454f66e2f" title="Busy wait wasting cycles for the given (64 bit) number of microseconds." id="rpipcf56b2694f0d034f57f2" data-adjusted="true">busy_wait_us()</a> </span>
10709 <span class="target" id="rpip74860a25dfa98b53aff4" data-parent-id="rpip5c3be0ef1677fc4f87a2" data-target-for="rpip74860a25dfa98b53aff4">
10710 <a class="el" href="hardware.html#ga89b0f1dcbbdf81c92ade2930e8e38ab6" title="Busy wait wasting cycles for the given (32 bit) number of microseconds." id="rpip48c4bccb77643eabf09f" data-adjusted="true">busy_wait_us_32()</a> </span></p>
10712 <div class="sect3">
10713 <h4 id="rpip77c3a4ca8dcf69f1cb63">
10714 <a class="anchor" href="#rpip77c3a4ca8dcf69f1cb63"></a>Function Documentation</h4>
10715 <a id="gaedc0ed51a5e908ddd660a5d279009abc" name="gaedc0ed51a5e908ddd660a5d279009abc"></a>
10716 <div class="sect4">
10717 <h5 id="rpipa2fec359fd1f2a974d41">
10718 <a class="anchor" href="#rpipa2fec359fd1f2a974d41"></a>◆ best_effort_wfe_or_timeout()</h5>
10719 <div class="memitem" id="rpip557c1f330db72b4df2a7">
10720 <div class="memproto" id="rpipd69d4f9ecc5e04c06ec4">
10721 <table class="memname" id="rpipfa69ab76382a96eef5c7">
10722 <tr id="rpip214513c6f7c16d237fbd">
10723 <td class="memname" id="rpip2446ae35922b493f50dc">bool best_effort_wfe_or_timeout </td>
10724 <td id="rpipdd7f96fdcec688ba92f9">(</td>
10725 <td class="paramtype" id="rpip4511fe44c69aa22c126f">
10726 <a class="el" href="structabsolute__time__t.html" id="rpipe20b95248939737e91af">absolute_time_t</a>Â </td>
10727 <td class="paramname" id="rpip624b37bdf01a5f493c9b"><em id="rpip8cb846ccb3dfcb5a1eeb">timeout_timestamp</em></td>
10728 <td id="rpip93441d26a9f2904ce32c">)</td>
10729 <td id="rpip2ebc3e8b399bc8394b24"></td>
10733 <div class="memdoc" id="rpip2c601303bf2f4a367aaa">
10735 <p id="rpip33ab0dac7ad09f08e35a">Helper method for blocking on a timeout. </p>
10736 <p id="rpipb9d6115feeb7f730c935">This method will return in response to an event (as per __wfe) or when the target time is reached, or at any point before.</p>
10737 <p id="rpipb7378ad396217db856d5">This method can be used to implement a lower power polling loop waiting on some condition signalled by an event (<a class="el" href="hardware.html#ga486eada32246494118f8273a80ae6856" title="Insert a SEV instruction in to the code path." id="rpip570ecadbcdff28a2f6a8" data-adjusted="true">__sev()</a>).</p>
10738 <p id="rpipdf4607d72ed5b8f927d3">This is called <em id="rpip446e80a2876c904c18e5">best_effort</em> because under certain circumstances (notably the default timer pool being disabled or full) the best effort is simply to return immediately without a __wfe, thus turning the calling code into a busy wait.</p>
10739 <p id="rpipbc163124acfb803c4c5e">Example usage: </p>
10740 <div class="listingblock" id="rpipd17db6d7e37705d5ba35" data-parent-id="rpip2c601303bf2f4a367aaa">
10741 <button class="copy-button hidden" aria-label="copy code to clipboard" type="button" aria-hidden="true"><div class="copy-button-inner">
10742 <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 12 12"><rect x="1" y="6" width="5" height="1"></rect><path d="M10,1H8A1,1,0,0,0,7,0H6A1,1,0,0,0,5,1H3A1,1,0,0,0,2,2V5H3V2H4V3H9V2h1v9H3V8H2v3a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,10,1ZM6.5,2.25a.75.75,0,1,1,.75-.75A.76.76,0,0,1,6.5,2.25Z"></path><path d="M6.32,6.32,4.43,4.43A.25.25,0,0,0,4,4.6V8.4a.25.25,0,0,0,.43.17L6.32,6.68A.25.25,0,0,0,6.32,6.32Z"></path></svg><strong class="copy-button-label"></strong><span class="tooltip hidden"> Copy to Clipboard</span>
10743 </div></button><div class="content" data-target="true" data-target-for="rpipd17db6d7e37705d5ba35">
10744 <div class="line" id="rpip372fb85453867310d6e1">
10745 <span class="keywordtype" id="rpip3596fa329322bed573b2">bool</span> my_function_with_timeout_us(uint64_t timeout_us) {</div>
10746 <div class="line" id="rpipd41841196940ef11afd7"> <a class="code hl_struct" href="structabsolute__time__t.html" id="rpip9ff17e56c28efa8a29dc">absolute_time_t</a> timeout_time = <a class="code hl_function" href="high_level.html#ga70921b9073202a54eec3494b4d19ec84" id="rpip6497c6edc24ba1e01aee" data-adjusted="true">make_timeout_time_us</a>(timeout_us);</div>
10747 <div class="line" id="rpip4486eda8788da2d74b7a"> <span class="keywordflow" id="rpip34f6d4de01a5565c7acb">do</span> {</div>
10748 <div class="line" id="rpipe43c11c14c0894cbb911"> <span class="comment" id="rpip23401a43b6d42629db10">// each time round the loop, we check to see if the condition</span>
10750 <div class="line" id="rpip280d656398907f9f815e"> <span class="comment" id="rpip3774811700bd94d16aa4">// we are waiting on has happened</span>
10752 <div class="line" id="rpip565e7bc49984046624cf"> <span class="keywordflow" id="rpip7df614bef132a287e6d2">if</span> (my_check_done()) {</div>
10753 <div class="line" id="rpipd18dc812fa2fd19972fa"> <span class="comment" id="rpip2fde264a2ec2c4046a26">// do something</span>
10755 <div class="line" id="rpipa3c0cbcbfaaba63a7394"> <span class="keywordflow" id="rpipa12c50d641d42961fc1f">return</span> <span class="keyword" id="rpipd63c6410efceba7163f8">true</span>;</div>
10756 <div class="line" id="rpipe6c8e9d9394aa269fa5d"> }</div>
10757 <div class="line" id="rpip02f63b54b23a4619719e"> <span class="comment" id="rpip68d196ae183972c8ce41">// will try to sleep until timeout or the next processor event </span>
10759 <div class="line" id="rpip1ac9e426488ebb02fa62"> } <span class="keywordflow" id="rpiped432283e907ad50593a">while</span> (!<a class="code hl_function" href="#gaedc0ed51a5e908ddd660a5d279009abc" id="rpipb1714474e0918811c476" data-adjusted="true">best_effort_wfe_or_timeout</a>(timeout_time));</div>
10760 <div class="line" id="rpip3c40060873066d6faa5b"> <span class="keywordflow" id="rpipb9854529d2cfaa7357be">return</span> <span class="keyword" id="rpipe7232a0a756a2c34c5e6">false</span>; <span class="comment" id="rpip765f2df231134a96c2f2">// timed out</span>
10762 <div class="line" id="rpip48a634b9d67a597473e7">}</div>
10763 <div class="ttc" id="agroup__sleep_html_gaedc0ed51a5e908ddd660a5d279009abc">
10764 <div class="ttname" id="rpip69d06e28b31e41ddc477"><a href="#gaedc0ed51a5e908ddd660a5d279009abc" id="rpip819695f3139a698c453e" data-adjusted="true">best_effort_wfe_or_timeout</a></div>
10765 <div class="ttdeci" id="rpip19d34bcafce62a00dd50">bool best_effort_wfe_or_timeout(absolute_time_t timeout_timestamp)</div>
10766 <div class="ttdoc" id="rpip47e0f81f5da4755bae35">Helper method for blocking on a timeout.</div>
10767 <div class="ttdef" id="rpipf7f7520b646933a9474c">
10768 <b id="rpipc806b2ecd2a3a1f34c78">Definition:</b> time.c:433</div>
10770 <div class="ttc" id="agroup__timestamp_html_ga70921b9073202a54eec3494b4d19ec84">
10771 <div class="ttname" id="rpipdfa2dad3e29c4815b7b8"><a href="high_level.html#ga70921b9073202a54eec3494b4d19ec84" id="rpip04f4cf786440961cd82f" data-adjusted="true">make_timeout_time_us</a></div>
10772 <div class="ttdeci" id="rpip29ee9859f3bcba496f10">static absolute_time_t make_timeout_time_us(uint64_t us)</div>
10773 <div class="ttdoc" id="rpip6a5afc9b7c790316fc3c">Convenience method to get the timestamp a number of microseconds from the current time.</div>
10774 <div class="ttdef" id="rpip6441447b9053ac78604c">
10775 <b id="rpip75ef70580077087cd007">Definition:</b> time.h:131</div>
10777 <div class="ttc" id="astructabsolute__time__t_html">
10778 <div class="ttname" id="rpipcc4bafc857b37dd38012"><a href="structabsolute__time__t.html" id="rpip6855cb91a2b32ecdf6a7">absolute_time_t</a></div>
10779 <div class="ttdef" id="rpipbac6a8a97db2d6ff6953">
10780 <b id="rpip86023b66ed9cd2b9e85b">Definition:</b> types.h:33</div>
10784 <!-- fragment --><h4 id="rpip593910bbac942653c85d" data-parent-id="rpipeb71394952b98a387d23" data-target-for="rpip593910bbac942653c85d">Parameters</h4>
10785 <p class="paragraph" id="rpip685c9670ae253d320d40" data-parent-id="rpipeb71394952b98a387d23" data-target-for="rpip685c9670ae253d320d40">
10787 <table class="params" id="rpip249bbeb4099007391ed0">
10788 <tr id="rpip7cdd85428a1617165c8c">
10789 <td class="paramname" id="rpip7dd98aaeceea6fa07f06">timeout_timestamp</td>
10790 <td id="rpip8d92dd86fb3bbec70e06">the timeout time </td>
10796 <h4 class="label" id="rpipd50fb997c06ed46d29ff" data-parent-id="rpip4adb31e86058b0b257cf" data-target-for="rpipd50fb997c06ed46d29ff">Returns</h4>
10797 <p class="returns" id="rpipa97a7059afb3d644d40c" data-parent-id="rpip4adb31e86058b0b257cf" data-target-for="rpipa97a7059afb3d644d40c">true if the target time is reached, false otherwise </p>
10801 <a id="gae617a6842d4f3a192064c4354b88fcff" name="gae617a6842d4f3a192064c4354b88fcff"></a>
10803 <div class="sect4">
10804 <h5 id="rpip0013d7648ebd0984380c">
10805 <a class="anchor" href="#rpip0013d7648ebd0984380c"></a>◆ sleep_ms()</h5>
10806 <div class="memitem" id="rpip98228843050cab9fce22">
10807 <div class="memproto" id="rpipdb86f97f7383e9665d2f">
10808 <table class="memname" id="rpip8b8e47943d3cb97407d6">
10809 <tr id="rpipbcc27282c7035442ef84">
10810 <td class="memname" id="rpip1414d501a6d8d03b1026">void sleep_ms </td>
10811 <td id="rpip5a5c5636297d9c19155d">(</td>
10812 <td class="paramtype" id="rpip5f595a1229c12d25f44b">uint32_t </td>
10813 <td class="paramname" id="rpip759b3827ed11bedc6947"><em id="rpip18cdd3630103cd1d8936">ms</em></td>
10814 <td id="rpip2c425f0733ecfe968be4">)</td>
10815 <td id="rpip2569742ebb394b219cff"></td>
10819 <div class="memdoc" id="rpipbfb02381261c3c990436">
10821 <p id="rpip5552ce1ec0151e26c155">Wait for the given number of milliseconds before returning. </p>
10822 <div class="admonitionblock note" id="rpip38918235fb0e2b0783cf" data-parent-id="rpipbfb02381261c3c990436"><table>
10823 <tr data-target="true" data-target-for="rpip38918235fb0e2b0783cf">
10824 <td class="icon" id="rpipc31f6ee758d88e6e9c50" data-parent-id="rpip38918235fb0e2b0783cf"><div class="title" data-target="true" data-target-for="rpipc31f6ee758d88e6e9c50">Note</div></td>
10825 <td class="content" id="rpipb8bd8b8d9e7a3fc41595" data-parent-id="rpip38918235fb0e2b0783cf" data-target-for="rpipb8bd8b8d9e7a3fc41595">This method attempts to perform a lower power sleep (using WFE) as much as possible.</td>
10828 <h4 id="rpip37f48f973effb48ead67" data-parent-id="rpip42e94b22396b0d3dedb5" data-target-for="rpip37f48f973effb48ead67">Parameters</h4>
10829 <p class="paragraph" id="rpip1e2a2ae89506bd9fa2d2" data-parent-id="rpip42e94b22396b0d3dedb5" data-target-for="rpip1e2a2ae89506bd9fa2d2">
10831 <table class="params" id="rpip6644ec31c8b2d3178dfc">
10832 <tr id="rpip5b04deb61fd2cb5199d7">
10833 <td class="paramname" id="rpipd9e0ebc18b41743e3da5">ms</td>
10834 <td id="rpipbc4dc6c192593e233ebe">the number of milliseconds to sleep </td>
10843 <a id="ga7abed28d3918fe2b15f8007ba6569172" name="ga7abed28d3918fe2b15f8007ba6569172"></a>
10845 <div class="sect4">
10846 <h5 id="rpip2b9f48020dc2c4801fbb">
10847 <a class="anchor" href="#rpip2b9f48020dc2c4801fbb"></a>◆ sleep_until()</h5>
10848 <div class="memitem" id="rpipd62c074a169dc0e424eb">
10849 <div class="memproto" id="rpipa18087cfa5b614542805">
10850 <table class="memname" id="rpipf0ff09a56186df182423">
10851 <tr id="rpip0095b395685443b6cf2b">
10852 <td class="memname" id="rpip4affff0a536341275d94">void sleep_until </td>
10853 <td id="rpip73b291621da7848f4b27">(</td>
10854 <td class="paramtype" id="rpipcc9b54fbe8311bba0fbf">
10855 <a class="el" href="structabsolute__time__t.html" id="rpipfd2e722547295b1e44af">absolute_time_t</a>Â </td>
10856 <td class="paramname" id="rpip08b891ef94201a3607eb"><em id="rpip461c40f0ced9ed8493fe">target</em></td>
10857 <td id="rpipc65513f67404e6bb512b">)</td>
10858 <td id="rpip1b56c6db21bc6efe6ec1"></td>
10862 <div class="memdoc" id="rpip74029a4049e9caa2867c">
10864 <p id="rpipbf4381093832f1b487f1">Wait until after the given timestamp to return. </p>
10865 <div class="admonitionblock note" id="rpipce80edea1dbc5a8ab458" data-parent-id="rpip74029a4049e9caa2867c"><table>
10866 <tr data-target="true" data-target-for="rpipce80edea1dbc5a8ab458">
10867 <td class="icon" id="rpipa33808597fe1ee857c71" data-parent-id="rpipce80edea1dbc5a8ab458"><div class="title" data-target="true" data-target-for="rpipa33808597fe1ee857c71">Note</div></td>
10868 <td class="content" id="rpip9a8ddb9425abeaa8731d" data-parent-id="rpipce80edea1dbc5a8ab458" data-target-for="rpip9a8ddb9425abeaa8731d">This method attempts to perform a lower power (WFE) sleep</td>
10871 <h4 id="rpip3b64ee0aca167459fd5f" data-parent-id="rpip3d56b260fd42eea01565" data-target-for="rpip3b64ee0aca167459fd5f">Parameters</h4>
10872 <p class="paragraph" id="rpipce304bb264e5df6ad5d0" data-parent-id="rpip3d56b260fd42eea01565" data-target-for="rpipce304bb264e5df6ad5d0">
10874 <table class="params" id="rpip2710afd1e44c1ef7a201">
10875 <tr id="rpipb4fa906b150f4f064f91">
10876 <td class="paramname" id="rpipdb4a4c1e5696eb97452d">target</td>
10877 <td id="rpip9efd7a5e41ad779e41fb">the time after which to return </td>
10883 <p class="see" id="rpip95f4052d606b97fc81e4" data-parent-id="rpip74029a4049e9caa2867c" data-target-for="rpip95f4052d606b97fc81e4"><span class="label" id="rpip09dc10e27a6f4fbbcf88" data-parent-id="rpip95f4052d606b97fc81e4" data-target-for="rpip09dc10e27a6f4fbbcf88">See also</span><span class="target" id="rpip36dc914ab3dc4a680046" data-parent-id="rpip95f4052d606b97fc81e4" data-target-for="rpip36dc914ab3dc4a680046"><a class="el" href="#gaeeaebd3a10e0a193022f15c8603772ba" title="Wait for the given number of microseconds before returning." id="rpip114c0c4633ba3f349b3f" data-adjusted="true">sleep_us()</a> </span>
10885 <span class="target" id="rpip51e3d221f3e42cdb983b" data-parent-id="rpip95f4052d606b97fc81e4" data-target-for="rpip51e3d221f3e42cdb983b">
10886 <a class="el" href="hardware.html#gab1c72f391015ff00a96b24477aa327ee" title="Busy wait wasting cycles until after the specified timestamp." id="rpip53b8c62bee37518105dd" data-adjusted="true">busy_wait_until()</a> </span></p>
10892 <a id="gaeeaebd3a10e0a193022f15c8603772ba" name="gaeeaebd3a10e0a193022f15c8603772ba"></a>
10894 <div class="sect4">
10895 <h5 id="rpipce367e3a8e2e0ca18799">
10896 <a class="anchor" href="#rpipce367e3a8e2e0ca18799"></a>◆ sleep_us()</h5>
10897 <div class="memitem" id="rpipaa775dd2536927aad364">
10898 <div class="memproto" id="rpipfdf4c0f13c90adc1b197">
10899 <table class="memname" id="rpip0ac6bb5e4e8660204644">
10900 <tr id="rpipa369d92da807c3dc2fb1">
10901 <td class="memname" id="rpip87b582b1b11544d92d35">void sleep_us </td>
10902 <td id="rpip9849dcee7edaf0735eff">(</td>
10903 <td class="paramtype" id="rpipdea6e6a18bc728ea434f">uint64_t </td>
10904 <td class="paramname" id="rpip64660441394dba02cf9e"><em id="rpip9a000340c46253aa4946">us</em></td>
10905 <td id="rpip31c4d04ee7caa37f5fe7">)</td>
10906 <td id="rpip8c5a3dec2ebc4857383c"></td>
10910 <div class="memdoc" id="rpip11fecfcaba9e162ee18e">
10912 <p id="rpipc2f0c63ce83b018b591b">Wait for the given number of microseconds before returning. </p>
10913 <div class="admonitionblock note" id="rpip168ef4c1126bef56a70f" data-parent-id="rpip11fecfcaba9e162ee18e"><table>
10914 <tr data-target="true" data-target-for="rpip168ef4c1126bef56a70f">
10915 <td class="icon" id="rpip9a5304458466e180c135" data-parent-id="rpip168ef4c1126bef56a70f"><div class="title" data-target="true" data-target-for="rpip9a5304458466e180c135">Note</div></td>
10916 <td class="content" id="rpip42b008440ea8df1e7125" data-parent-id="rpip168ef4c1126bef56a70f" data-target-for="rpip42b008440ea8df1e7125">This method attempts to perform a lower power (WFE) sleep</td>
10919 <h4 id="rpip505b2ed393036fe5f845" data-parent-id="rpip16223ccc36ccb85ea512" data-target-for="rpip505b2ed393036fe5f845">Parameters</h4>
10920 <p class="paragraph" id="rpip442759ee90e865ca040c" data-parent-id="rpip16223ccc36ccb85ea512" data-target-for="rpip442759ee90e865ca040c">
10922 <table class="params" id="rpipf9f9daf94600f5637085">
10923 <tr id="rpip8f6bf9082fa416cc1b02">
10924 <td class="paramname" id="rpip630f6e6a6dd9abd51f98">us</td>
10925 <td id="rpip87a741ab7256b96f883a">the number of microseconds to sleep </td>
10931 <p class="see" id="rpipf90488134bcc59e31482" data-parent-id="rpip11fecfcaba9e162ee18e" data-target-for="rpipf90488134bcc59e31482"><span class="label" id="rpipecbac9d65ff414177b83" data-parent-id="rpipf90488134bcc59e31482" data-target-for="rpipecbac9d65ff414177b83">See also</span><span class="target" id="rpipbe0d46f10dfa0f67c091" data-parent-id="rpipf90488134bcc59e31482" data-target-for="rpipbe0d46f10dfa0f67c091"><a class="el" href="hardware.html#gac089d1c42bb7658bb43c798454f66e2f" title="Busy wait wasting cycles for the given (64 bit) number of microseconds." id="rpipe7f537ea19e6916460fa" data-adjusted="true">busy_wait_us()</a> </span></p>
10940 <div class="sect2">
10942 <a class="anchor" href="#alarm"></a>alarm</h3>
10943 <div class="ingroups" id="rpip37880e2a90572b87c3a2">Part of: <a class="el" href="high_level.html" id="rpipe8b4bd5da95da0334bae">High Level APIs</a> » <a class="el" href="high_level.html#pico_time" id="rpipfb1dfc6b8fde8a84ec1d">pico_time</a>
10945 <p id="rpipdc5e8961b28d026dd966">Alarm functions for scheduling future execution.
10946 <a href="#gaefd5a65cece04d08240e" id="rpipb3a6d9913b9488c95e7e" data-adjusted="true">More...</a></p>
10947 <div class="sect3">
10948 <h4 id="rpipbc708ff2929dcd149721">
10949 <a class="anchor" href="#rpipbc708ff2929dcd149721"></a>Macros</h4>
10950 <ul class="memberdecls" id="rpip37f36ebf3d18e35e5c2b" data-parent-id="rpip293d238195cf40a10ef4">
10951 <li class="memitem">
10952 <p data-target="true" data-target-for="rpip37f36ebf3d18e35e5c2b"><span class="memItemLeft" data-target="true" id="rpipe539aed8189643554987" data-parent-id="rpip37f36ebf3d18e35e5c2b" data-target-for="rpipe539aed8189643554987">#define </span><span class="memItemRight" data-target="true" id="rpipc144491e27ccc6ab6c0c" data-parent-id="rpip37f36ebf3d18e35e5c2b" data-target-for="rpipc144491e27ccc6ab6c0c"><a class="el" href="#ga72314cafa18f7b2f90f9200be136ca27" id="rpip21c3f787948c45a13fa3" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</a>   0</span></p>
10954 <li class="memdesc">
10955 <p data-target="true" data-target-for="rpipdaa431ebd42aabe632d9"><span class="mdescLeft" data-target="true" id="rpipc4970998465a6f4216cf" data-parent-id="rpipdaa431ebd42aabe632d9" data-target-for="rpipc4970998465a6f4216cf">Â </span><span class="mdescRight" data-target="true" id="rpip7551d16661376d4ccee5" data-parent-id="rpipdaa431ebd42aabe632d9" data-target-for="rpip7551d16661376d4ccee5">If 1 then the default alarm pool is disabled (so no hardware alarm is claimed for the pool) <br id="rpip54860e181562bd989148"></span></p>
10957 <li class="memitem">
10958 <p data-target="true" data-target-for="rpipf7d2b9eb0e5f5462ba2b"><span class="memItemLeft" data-target="true" id="rpipaac6635b56b2b4f9ef51" data-parent-id="rpipf7d2b9eb0e5f5462ba2b" data-target-for="rpipaac6635b56b2b4f9ef51">#define </span><span class="memItemRight" data-target="true" id="rpip1809ca8c4b3cad3347a1" data-parent-id="rpipf7d2b9eb0e5f5462ba2b" data-target-for="rpip1809ca8c4b3cad3347a1"><a class="el" href="#ga40b4a03bf9e967d4e7170d20c5c9fb15" id="rpip967dc76c390184a400b2" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</a>   3</span></p>
10960 <li class="memdesc">
10961 <p data-target="true" data-target-for="rpipecb8e97bbf30db906a4a"><span class="mdescLeft" data-target="true" id="rpip889d6fb76b5c6c75c7ed" data-parent-id="rpipecb8e97bbf30db906a4a" data-target-for="rpip889d6fb76b5c6c75c7ed">Â </span><span class="mdescRight" data-target="true" id="rpip867f8c01a810bb0fdec4" data-parent-id="rpipecb8e97bbf30db906a4a" data-target-for="rpip867f8c01a810bb0fdec4">Selects which hardware alarm is used for the default alarm pool. <br id="rpip08dd98c9f41f7108f97b"></span></p>
10963 <li class="memitem">
10964 <p data-target="true" data-target-for="rpip5da66b394d6f4c248ab6"><span class="memItemLeft" data-target="true" id="rpipfa9dafc5912155f4ffb8" data-parent-id="rpip5da66b394d6f4c248ab6" data-target-for="rpipfa9dafc5912155f4ffb8">#define </span><span class="memItemRight" data-target="true" id="rpipa311fe6a68de16917b4c" data-parent-id="rpip5da66b394d6f4c248ab6" data-target-for="rpipa311fe6a68de16917b4c"><a class="el" href="#ga4bb3180aa64f3c9af8c521ec1b22bdb2" id="rpipa3411439082d49df4cad" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS</a>   16</span></p>
10966 <li class="memdesc">
10967 <p data-target="true" data-target-for="rpip1a5ffaff44ed450fd0d7"><span class="mdescLeft" data-target="true" id="rpip94b7512da421b291853b" data-parent-id="rpip1a5ffaff44ed450fd0d7" data-target-for="rpip94b7512da421b291853b">Â </span><span class="mdescRight" data-target="true" id="rpipf12ed59259b5edea1d3b" data-parent-id="rpip1a5ffaff44ed450fd0d7" data-target-for="rpipf12ed59259b5edea1d3b">Selects the maximum number of concurrent timers in the default alarm pool. <br id="rpip1c06d993943665a44dfa"></span></p>
10971 <div class="sect3">
10972 <h4 id="rpip468e097aecc15347c440">
10973 <a class="anchor" href="#rpip468e097aecc15347c440"></a>Typedefs</h4>
10974 <ul class="memberdecls" id="rpip4d31f107d5b2508e9358" data-parent-id="rpipfca2c4e0ac140d947f7a">
10975 <li class="memitem">
10976 <p data-target="true" data-target-for="rpip4d31f107d5b2508e9358"><span class="memItemLeft" data-target="true" id="rpip91ae40504c5147d08e21" data-parent-id="rpip4d31f107d5b2508e9358" data-target-for="rpip91ae40504c5147d08e21">typedef int32_t </span><span class="memItemRight" data-target="true" id="rpipfb74e622d2be48963bfc" data-parent-id="rpip4d31f107d5b2508e9358" data-target-for="rpipfb74e622d2be48963bfc"><a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipc61f0e69e7ba59c72270" data-adjusted="true">alarm_id_t</a></span></p>
10978 <li class="memdesc">
10979 <p data-target="true" data-target-for="rpipc01589ca9909d3139e97"><span class="mdescLeft" data-target="true" id="rpipef8cd145100767f48b25" data-parent-id="rpipc01589ca9909d3139e97" data-target-for="rpipef8cd145100767f48b25">Â </span><span class="mdescRight" data-target="true" id="rpipb1ac4eeed74acbfd3857" data-parent-id="rpipc01589ca9909d3139e97" data-target-for="rpipb1ac4eeed74acbfd3857">The identifier for an alarm. <br id="rpipa2f1cff523bac175ccc1"></span></p>
10981 <li class="memitem">
10982 <p data-target="true" data-target-for="rpip508a0fe41154b3ae3bd3"><span class="memItemLeft" data-target="true" id="rpip71e6c5b316670acec75d" data-parent-id="rpip508a0fe41154b3ae3bd3" data-target-for="rpip71e6c5b316670acec75d">typedef int64_t(*Â </span><span class="memItemRight" data-target="true" id="rpip316436fe185eb9f23981" data-parent-id="rpip508a0fe41154b3ae3bd3" data-target-for="rpip316436fe185eb9f23981"><a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip0071404d84f203d4951f" data-adjusted="true">alarm_callback_t</a>) (<a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip42a61614444652007e4f" data-adjusted="true">alarm_id_t</a> id, void *user_data)</span></p>
10984 <li class="memdesc">
10985 <p data-target="true" data-target-for="rpip4908541e925d80f42d06"><span class="mdescLeft" data-target="true" id="rpip0ee0b239a899a6bfd372" data-parent-id="rpip4908541e925d80f42d06" data-target-for="rpip0ee0b239a899a6bfd372">Â </span><span class="mdescRight" data-target="true" id="rpip3ec0437aa14d0a42eb04" data-parent-id="rpip4908541e925d80f42d06" data-target-for="rpip3ec0437aa14d0a42eb04">User alarm callback. <br id="rpip967d1b5ef43904690f3a"></span></p>
10989 <div class="sect3">
10990 <h4 id="rpip33d9ce3ebe3ca9ae2ca7">
10991 <a class="anchor" href="#rpip33d9ce3ebe3ca9ae2ca7"></a>Functions</h4>
10992 <ul class="memberdecls" id="rpipa2fe4503d158f6780b02" data-parent-id="rpipddc2b37b08c85bac1b3c">
10993 <li class="memitem">
10994 <p data-target="true" data-target-for="rpipa2fe4503d158f6780b02"><span class="memItemLeft" data-target="true" id="rpip8632275fb329e64b4453" data-parent-id="rpipa2fe4503d158f6780b02" data-target-for="rpip8632275fb329e64b4453"><a id="gab363026fa15b43405538eb087ee7cfa9" name="gab363026fa15b43405538eb087ee7cfa9"></a>
10995 void </span><span class="memItemRight" data-target="true" id="rpip97f6ec12f575cd9f88db" data-parent-id="rpipa2fe4503d158f6780b02" data-target-for="rpip97f6ec12f575cd9f88db"><b id="rpip260090f9ef92e2e68c75">alarm_pool_init_default</b> (void)</span></p>
10997 <li class="memdesc">
10998 <p data-target="true" data-target-for="rpip5cb1b47b00d930e3e757"><span class="mdescLeft" data-target="true" id="rpip1be25ea15a5b28dc5b58" data-parent-id="rpip5cb1b47b00d930e3e757" data-target-for="rpip1be25ea15a5b28dc5b58">Â </span><span class="mdescRight" data-target="true" id="rpipa86d9445e718bf253e5a" data-parent-id="rpip5cb1b47b00d930e3e757" data-target-for="rpipa86d9445e718bf253e5a">Create the default alarm pool (if not already created or disabled) <br id="rpip74885a1467961ece86ee"></span></p>
11000 <li class="memitem">
11001 <p data-target="true" data-target-for="rpipc2310b91677c87eafa96"><span class="memItemLeft" data-target="true" id="rpipe5b9fd91cdc7d255369a" data-parent-id="rpipc2310b91677c87eafa96" data-target-for="rpipe5b9fd91cdc7d255369a"><a class="el" href="structalarm__pool.html" id="rpip28ce7e54279603c84773">alarm_pool_t</a> *Â </span><span class="memItemRight" data-target="true" id="rpip5d52ebb9282d2d8f392b" data-parent-id="rpipc2310b91677c87eafa96" data-target-for="rpip5d52ebb9282d2d8f392b"><a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" id="rpipa3d6befe597c64d4f8f3" data-adjusted="true">alarm_pool_get_default</a> (void)</span></p>
11003 <li class="memdesc">
11004 <p data-target="true" data-target-for="rpip5a9a0d93f1297a34a6e2"><span class="mdescLeft" data-target="true" id="rpip81b35c9043abd321a513" data-parent-id="rpip5a9a0d93f1297a34a6e2" data-target-for="rpip81b35c9043abd321a513">Â </span><span class="mdescRight" data-target="true" id="rpip3bb78c358c6847685f73" data-parent-id="rpip5a9a0d93f1297a34a6e2" data-target-for="rpip3bb78c358c6847685f73">The default alarm pool used when alarms are added without specifying an alarm pool, and also used by the SDK to support lower power sleeps and timeouts. <br id="rpipe95528174abcde4b2804"></span></p>
11006 <li class="memitem">
11007 <p data-target="true" data-target-for="rpipaa556bb59bbd8e034edb"><span class="memItemLeft" data-target="true" id="rpipcf288a2cec0879bd8d16" data-parent-id="rpipaa556bb59bbd8e034edb" data-target-for="rpipcf288a2cec0879bd8d16"><a class="el" href="structalarm__pool.html" id="rpip1253d9d42638aa91b65a">alarm_pool_t</a> *Â </span><span class="memItemRight" data-target="true" id="rpip001e6ed8c18d1f3f1b0c" data-parent-id="rpipaa556bb59bbd8e034edb" data-target-for="rpip001e6ed8c18d1f3f1b0c"><a class="el" href="#ga1c0e0970bd838e2319ee73eba7ff3b71" id="rpip1f740b45f64a77c16cee" data-adjusted="true">alarm_pool_create</a> (uint hardware_alarm_num, uint max_timers)</span></p>
11009 <li class="memdesc">
11010 <p data-target="true" data-target-for="rpip371b07c3eb1275696b64"><span class="mdescLeft" data-target="true" id="rpipfcdd371abca93371df2e" data-parent-id="rpip371b07c3eb1275696b64" data-target-for="rpipfcdd371abca93371df2e">Â </span><span class="mdescRight" data-target="true" id="rpip877905e72f9e43e97386" data-parent-id="rpip371b07c3eb1275696b64" data-target-for="rpip877905e72f9e43e97386">Create an alarm pool. <br id="rpip996427a8da735ccfd1f5"></span></p>
11012 <li class="memitem">
11013 <p data-target="true" data-target-for="rpip6816a9399143fa544c7c"><span class="memItemLeft" data-target="true" id="rpipefb30f7c7cf257036ea4" data-parent-id="rpip6816a9399143fa544c7c" data-target-for="rpipefb30f7c7cf257036ea4"><a class="el" href="structalarm__pool.html" id="rpip4b1a1672c0bac034d163">alarm_pool_t</a> *Â </span><span class="memItemRight" data-target="true" id="rpipa586f443bd9e703b4cc6" data-parent-id="rpip6816a9399143fa544c7c" data-target-for="rpipa586f443bd9e703b4cc6"><a class="el" href="#ga6eeda3248dca1d0d26e92206faceb23e" id="rpipccb57cf65ea42677a177" data-adjusted="true">alarm_pool_create_with_unused_hardware_alarm</a> (uint max_timers)</span></p>
11015 <li class="memdesc">
11016 <p data-target="true" data-target-for="rpip987e742ab05e1ad5286a"><span class="mdescLeft" data-target="true" id="rpip9bec3f29771439a38860" data-parent-id="rpip987e742ab05e1ad5286a" data-target-for="rpip9bec3f29771439a38860">Â </span><span class="mdescRight" data-target="true" id="rpipa7c2c2e5898d43a7d6de" data-parent-id="rpip987e742ab05e1ad5286a" data-target-for="rpipa7c2c2e5898d43a7d6de">Create an alarm pool, claiming an used hardware alarm to back it. <br id="rpip47b0ebeb1714e029cfc8"></span></p>
11018 <li class="memitem">
11019 <p data-target="true" data-target-for="rpip623f36eafaee5fb48f69"><span class="memItemLeft" data-target="true" id="rpipd3736b2f8b59f36740d9" data-parent-id="rpip623f36eafaee5fb48f69" data-target-for="rpipd3736b2f8b59f36740d9">uint </span><span class="memItemRight" data-target="true" id="rpip2d9753cf0808d6b1af1e" data-parent-id="rpip623f36eafaee5fb48f69" data-target-for="rpip2d9753cf0808d6b1af1e"><a class="el" href="#ga2dc626c1e534842c85c3902d212f7eef" id="rpipb5fe1e7d2d7c6f692285" data-adjusted="true">alarm_pool_hardware_alarm_num</a> (<a class="el" href="structalarm__pool.html" id="rpipc491e47d4771353f460c">alarm_pool_t</a> *pool)</span></p>
11021 <li class="memdesc">
11022 <p data-target="true" data-target-for="rpip75575f7c823d24892586"><span class="mdescLeft" data-target="true" id="rpip645eaade75e6034de579" data-parent-id="rpip75575f7c823d24892586" data-target-for="rpip645eaade75e6034de579">Â </span><span class="mdescRight" data-target="true" id="rpip1671069474dfdac7db34" data-parent-id="rpip75575f7c823d24892586" data-target-for="rpip1671069474dfdac7db34">Return the hardware alarm used by an alarm pool. <br id="rpip8683430c4aeb63a5cf73"></span></p>
11024 <li class="memitem">
11025 <p data-target="true" data-target-for="rpipc3ad7db308f9a4fa154a"><span class="memItemLeft" data-target="true" id="rpip0ad6b7d7f90b698bdf70" data-parent-id="rpipc3ad7db308f9a4fa154a" data-target-for="rpip0ad6b7d7f90b698bdf70">uint </span><span class="memItemRight" data-target="true" id="rpipb20f6df31df785f97d2e" data-parent-id="rpipc3ad7db308f9a4fa154a" data-target-for="rpipb20f6df31df785f97d2e"><a class="el" href="#ga4918e03a3ddd5c328d65bd014d26856b" id="rpip7a51fb14087dc3420b16" data-adjusted="true">alarm_pool_core_num</a> (<a class="el" href="structalarm__pool.html" id="rpipf70c9ef15f9874ae9797">alarm_pool_t</a> *pool)</span></p>
11027 <li class="memdesc">
11028 <p data-target="true" data-target-for="rpip8e283629d7661afe5140"><span class="mdescLeft" data-target="true" id="rpipdcf957fa9120d271691c" data-parent-id="rpip8e283629d7661afe5140" data-target-for="rpipdcf957fa9120d271691c">Â </span><span class="mdescRight" data-target="true" id="rpip776d020354944d6e38f2" data-parent-id="rpip8e283629d7661afe5140" data-target-for="rpip776d020354944d6e38f2">Return the core number the alarm pool was initialized on (and hence callbacks are called on) <br id="rpip6cc2b902393bfef45fc5"></span></p>
11030 <li class="memitem">
11031 <p data-target="true" data-target-for="rpipdbc548a127d01cdb84c6"><span class="memItemLeft" data-target="true" id="rpipb7ed43f11f564eb3c8f2" data-parent-id="rpipdbc548a127d01cdb84c6" data-target-for="rpipb7ed43f11f564eb3c8f2">void </span><span class="memItemRight" data-target="true" id="rpip64191e859264b5e25a16" data-parent-id="rpipdbc548a127d01cdb84c6" data-target-for="rpip64191e859264b5e25a16"><a class="el" href="#gae7536c4d34088a2d19b2da92b87cbb4e" id="rpipdf0bd8d8970724127a4d" data-adjusted="true">alarm_pool_destroy</a> (<a class="el" href="structalarm__pool.html" id="rpipe5420a550264ddb81a82">alarm_pool_t</a> *pool)</span></p>
11033 <li class="memdesc">
11034 <p data-target="true" data-target-for="rpip43df9eea6345a9d59f5c"><span class="mdescLeft" data-target="true" id="rpip65b6978608be906593fc" data-parent-id="rpip43df9eea6345a9d59f5c" data-target-for="rpip65b6978608be906593fc">Â </span><span class="mdescRight" data-target="true" id="rpipf6e78c094a67bd2073d5" data-parent-id="rpip43df9eea6345a9d59f5c" data-target-for="rpipf6e78c094a67bd2073d5">Destroy the alarm pool, cancelling all alarms and freeing up the underlying hardware alarm. <br id="rpip766d72f1878a7f4a4f39"></span></p>
11036 <li class="memitem">
11037 <p data-target="true" data-target-for="rpipda1ccaef591ee06bba34"><span class="memItemLeft" data-target="true" id="rpipcc1d81b9f119d0679af6" data-parent-id="rpipda1ccaef591ee06bba34" data-target-for="rpipcc1d81b9f119d0679af6"><a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip178249abc02b0a18712a" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipbe7bea205ccc5e114bf1" data-parent-id="rpipda1ccaef591ee06bba34" data-target-for="rpipbe7bea205ccc5e114bf1"><a class="el" href="#gab75446a927e4e870ad27fde145a88019" id="rpip999d90253f6a43c0ccd7" data-adjusted="true">alarm_pool_add_alarm_at</a> (<a class="el" href="structalarm__pool.html" id="rpipec5d6aee3c8608da4800">alarm_pool_t</a> *pool, <a class="el" href="structabsolute__time__t.html" id="rpip0d4a24abe6153bea9c33">absolute_time_t</a> time, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip6d7912948e01bcc4bd6c" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11039 <li class="memdesc">
11040 <p data-target="true" data-target-for="rpip7d567c62017378cb5987"><span class="mdescLeft" data-target="true" id="rpip8e6edd3dcf5380c3af67" data-parent-id="rpip7d567c62017378cb5987" data-target-for="rpip8e6edd3dcf5380c3af67">Â </span><span class="mdescRight" data-target="true" id="rpipce24b397db5adca963ee" data-parent-id="rpip7d567c62017378cb5987" data-target-for="rpipce24b397db5adca963ee">Add an alarm callback to be called at a specific time. <br id="rpipc05a567bc5be0d1be8f0"></span></p>
11042 <li class="memitem">
11043 <p data-target="true" data-target-for="rpipfea447b2839054530c6b"><span class="memItemLeft" data-target="true" id="rpip7572714e837f6932282f" data-parent-id="rpipfea447b2839054530c6b" data-target-for="rpip7572714e837f6932282f"><a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip35e8f99f9047d4660864" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipd63a1c3786aa29c5c936" data-parent-id="rpipfea447b2839054530c6b" data-target-for="rpipd63a1c3786aa29c5c936"><a class="el" href="#ga72bfc8c2dd5bf334cd68af2e349a1b37" id="rpip2aa5fba658a7db8f8f04" data-adjusted="true">alarm_pool_add_alarm_at_force_in_context</a> (<a class="el" href="structalarm__pool.html" id="rpip816a225161f98ffca91d">alarm_pool_t</a> *pool, <a class="el" href="structabsolute__time__t.html" id="rpipb5d28efe51e2c8a39ce0">absolute_time_t</a> time, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip4aa92f7a8bac36359080" data-adjusted="true">alarm_callback_t</a> callback, void *user_data)</span></p>
11045 <li class="memdesc">
11046 <p data-target="true" data-target-for="rpipde6e66d441e2ad1776fe"><span class="mdescLeft" data-target="true" id="rpip137849adacab9c8bdb4e" data-parent-id="rpipde6e66d441e2ad1776fe" data-target-for="rpip137849adacab9c8bdb4e">Â </span><span class="mdescRight" data-target="true" id="rpip7ae0a27bc63b9035528c" data-parent-id="rpipde6e66d441e2ad1776fe" data-target-for="rpip7ae0a27bc63b9035528c">Add an alarm callback to be called at or after a specific time. <br id="rpip9e51721a3c72907fd163"></span></p>
11048 <li class="memitem">
11049 <p data-target="true" data-target-for="rpipb1db2d656631936dabe5"><span class="memItemLeft" data-target="true" id="rpip1a5f364f43ad1b4a2381" data-parent-id="rpipb1db2d656631936dabe5" data-target-for="rpip1a5f364f43ad1b4a2381">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipc829e3eabe3244052b9e" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipa3dcd1319ec9b5cf1a1f" data-parent-id="rpipb1db2d656631936dabe5" data-target-for="rpipa3dcd1319ec9b5cf1a1f"><a class="el" href="#ga0d00072e81de2d54fa690dc4b4bfe408" id="rpip2e0c32f11676b354b151" data-adjusted="true">alarm_pool_add_alarm_in_us</a> (<a class="el" href="structalarm__pool.html" id="rpip3bb1150d5c2a57e6406e">alarm_pool_t</a> *pool, uint64_t us, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip6e714dc3c962ccee11a4" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11051 <li class="memdesc">
11052 <p data-target="true" data-target-for="rpip1cc617cb0b1d5982e8d0"><span class="mdescLeft" data-target="true" id="rpip1303964a1055173f7c19" data-parent-id="rpip1cc617cb0b1d5982e8d0" data-target-for="rpip1303964a1055173f7c19">Â </span><span class="mdescRight" data-target="true" id="rpip6cf40a30f41b3c30e8ba" data-parent-id="rpip1cc617cb0b1d5982e8d0" data-target-for="rpip6cf40a30f41b3c30e8ba">Add an alarm callback to be called after a delay specified in microseconds. <br id="rpipc7f5d0f084f74a27d3f5"></span></p>
11054 <li class="memitem">
11055 <p data-target="true" data-target-for="rpip126385525627f17a42cb"><span class="memItemLeft" data-target="true" id="rpipd820b65deb98d604571f" data-parent-id="rpip126385525627f17a42cb" data-target-for="rpipd820b65deb98d604571f">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip0f168f7818665522123b" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip7ef7ec87d09e4fd201d0" data-parent-id="rpip126385525627f17a42cb" data-target-for="rpip7ef7ec87d09e4fd201d0"><a class="el" href="#ga6e32765c525683f216fc42bd1984e239" id="rpip401674c1f8d3449315b6" data-adjusted="true">alarm_pool_add_alarm_in_ms</a> (<a class="el" href="structalarm__pool.html" id="rpip8b02fd14ecba7f272244">alarm_pool_t</a> *pool, uint32_t ms, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip730af6fa626db824ac33" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11057 <li class="memdesc">
11058 <p data-target="true" data-target-for="rpip4f70225ecd844bcf90b4"><span class="mdescLeft" data-target="true" id="rpipce40973f5a96379be228" data-parent-id="rpip4f70225ecd844bcf90b4" data-target-for="rpipce40973f5a96379be228">Â </span><span class="mdescRight" data-target="true" id="rpip7cd2f8570aff173b4d40" data-parent-id="rpip4f70225ecd844bcf90b4" data-target-for="rpip7cd2f8570aff173b4d40">Add an alarm callback to be called after a delay specified in milliseconds. <br id="rpipd1f550db51a0e70dd44c"></span></p>
11060 <li class="memitem">
11061 <p data-target="true" data-target-for="rpip67ae26cebed873a98eb3"><span class="memItemLeft" data-target="true" id="rpipbb4c25fa63e2cfe5559d" data-parent-id="rpip67ae26cebed873a98eb3" data-target-for="rpipbb4c25fa63e2cfe5559d">bool </span><span class="memItemRight" data-target="true" id="rpip4a67da94c8b8603bbb30" data-parent-id="rpip67ae26cebed873a98eb3" data-target-for="rpip4a67da94c8b8603bbb30"><a class="el" href="#ga02cc23b4a3109fb8c2d57e24981f2932" id="rpip8906684a5f00c7a43979" data-adjusted="true">alarm_pool_cancel_alarm</a> (<a class="el" href="structalarm__pool.html" id="rpipcaa1c56d94347943b42b">alarm_pool_t</a> *pool, <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipe0f88bfa68a782a1f9dc" data-adjusted="true">alarm_id_t</a> alarm_id)</span></p>
11063 <li class="memdesc">
11064 <p data-target="true" data-target-for="rpip64428e562aa6924ec95d"><span class="mdescLeft" data-target="true" id="rpip36095b75cb48a7561125" data-parent-id="rpip64428e562aa6924ec95d" data-target-for="rpip36095b75cb48a7561125">Â </span><span class="mdescRight" data-target="true" id="rpipc12af94e39db7a8287b2" data-parent-id="rpip64428e562aa6924ec95d" data-target-for="rpipc12af94e39db7a8287b2">Cancel an alarm. <br id="rpipc1648b30137ff0fc4d56"></span></p>
11066 <li class="memitem">
11067 <p data-target="true" data-target-for="rpipbacdce9a1ce27bb5eacf"><span class="memItemLeft" data-target="true" id="rpip706adb6a5ef8e51420fd" data-parent-id="rpipbacdce9a1ce27bb5eacf" data-target-for="rpip706adb6a5ef8e51420fd">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipfbd2200e1471bb9ef6a6" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipae7507da97b4314b54c8" data-parent-id="rpipbacdce9a1ce27bb5eacf" data-target-for="rpipae7507da97b4314b54c8"><a class="el" href="#gae98ddd58a2c1d142eb6db7882512ce8d" id="rpip35fa8182af92b7e2fa09" data-adjusted="true">add_alarm_at</a> (<a class="el" href="structabsolute__time__t.html" id="rpipefc6967c7cc326d2f27b">absolute_time_t</a> time, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip3deda8724bd67407e43f" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11069 <li class="memdesc">
11070 <p data-target="true" data-target-for="rpipe2d0d8cc22c8343f655f"><span class="mdescLeft" data-target="true" id="rpipdf49e1e7cb01a2274c5a" data-parent-id="rpipe2d0d8cc22c8343f655f" data-target-for="rpipdf49e1e7cb01a2274c5a">Â </span><span class="mdescRight" data-target="true" id="rpipa3813d8777d8eaa69b99" data-parent-id="rpipe2d0d8cc22c8343f655f" data-target-for="rpipa3813d8777d8eaa69b99">Add an alarm callback to be called at a specific time. <br id="rpip3e3c9326f6108e5cd3d6"></span></p>
11072 <li class="memitem">
11073 <p data-target="true" data-target-for="rpip4de373896e7319cf772d"><span class="memItemLeft" data-target="true" id="rpip0c0d8d9ec27bfa0a9992" data-parent-id="rpip4de373896e7319cf772d" data-target-for="rpip0c0d8d9ec27bfa0a9992">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip617bdbceb79b5bb099db" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpipcb79bfca58b4999a3c46" data-parent-id="rpip4de373896e7319cf772d" data-target-for="rpipcb79bfca58b4999a3c46"><a class="el" href="#ga69b4481d9d9a906caefb31c54a048575" id="rpip6e51b92199b1f47a7134" data-adjusted="true">add_alarm_in_us</a> (uint64_t us, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpipb86ecf3c32c3d4d3c43d" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11075 <li class="memdesc">
11076 <p data-target="true" data-target-for="rpip9ef0fb9c0d10fc8f9c7d"><span class="mdescLeft" data-target="true" id="rpip41ab9f22e8d1908ad6e7" data-parent-id="rpip9ef0fb9c0d10fc8f9c7d" data-target-for="rpip41ab9f22e8d1908ad6e7">Â </span><span class="mdescRight" data-target="true" id="rpipb72b150ba13f951896f2" data-parent-id="rpip9ef0fb9c0d10fc8f9c7d" data-target-for="rpipb72b150ba13f951896f2">Add an alarm callback to be called after a delay specified in microseconds. <br id="rpipd1439b5532f919f718d5"></span></p>
11078 <li class="memitem">
11079 <p data-target="true" data-target-for="rpip8fad86a4d154051b5d24"><span class="memItemLeft" data-target="true" id="rpipe313720c0163ccd8bc44" data-parent-id="rpip8fad86a4d154051b5d24" data-target-for="rpipe313720c0163ccd8bc44">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipcbd2b0afb17ee9a3f9e7" data-adjusted="true">alarm_id_t</a>Â </span><span class="memItemRight" data-target="true" id="rpip4b6b95b9cd88b03710e1" data-parent-id="rpip8fad86a4d154051b5d24" data-target-for="rpip4b6b95b9cd88b03710e1"><a class="el" href="#ga8bb045ab597f773d7d5fdfea5db94f69" id="rpip5ed2c7b2f5b1bf44cb78" data-adjusted="true">add_alarm_in_ms</a> (uint32_t ms, <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip7236d7d700e7ce6a8f47" data-adjusted="true">alarm_callback_t</a> callback, void *user_data, bool fire_if_past)</span></p>
11081 <li class="memdesc">
11082 <p data-target="true" data-target-for="rpip8666e95afb5a5c067b4d"><span class="mdescLeft" data-target="true" id="rpip8f4a9d7cd722b2b3df00" data-parent-id="rpip8666e95afb5a5c067b4d" data-target-for="rpip8f4a9d7cd722b2b3df00">Â </span><span class="mdescRight" data-target="true" id="rpipbb216f3076351b8d8322" data-parent-id="rpip8666e95afb5a5c067b4d" data-target-for="rpipbb216f3076351b8d8322">Add an alarm callback to be called after a delay specified in milliseconds. <br id="rpipf2c3e451486b083c77b0"></span></p>
11084 <li class="memitem">
11085 <p data-target="true" data-target-for="rpip64f5399d99e7ace11f7d"><span class="memItemLeft" data-target="true" id="rpipddd51e27750acf79fe08" data-parent-id="rpip64f5399d99e7ace11f7d" data-target-for="rpipddd51e27750acf79fe08">static bool </span><span class="memItemRight" data-target="true" id="rpipf3252f836097be581a13" data-parent-id="rpip64f5399d99e7ace11f7d" data-target-for="rpipf3252f836097be581a13"><a class="el" href="#gae99f63dc25fe5c3a0d78d9fb90308b1b" id="rpip8c59c27d87b9ff33bbd3" data-adjusted="true">cancel_alarm</a> (<a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip844ad0a2dbf701d4a51c" data-adjusted="true">alarm_id_t</a> alarm_id)</span></p>
11087 <li class="memdesc">
11088 <p data-target="true" data-target-for="rpip760017fe993cb4d01639"><span class="mdescLeft" data-target="true" id="rpip1ec0691ac3566b50dfcd" data-parent-id="rpip760017fe993cb4d01639" data-target-for="rpip1ec0691ac3566b50dfcd">Â </span><span class="mdescRight" data-target="true" id="rpip9c9713c14e1e50dc71f9" data-parent-id="rpip760017fe993cb4d01639" data-target-for="rpip9c9713c14e1e50dc71f9">Cancel an alarm from the default alarm pool. <br id="rpipd9cabaf4d428b20232a5"></span></p>
11091 <a name="details" id="gaefd5a65cece04d08240e"></a>
11093 <div class="sect3">
11094 <h4 id="rpipa18d290bb3463e923f76">
11095 <a class="anchor" href="#rpipa18d290bb3463e923f76"></a>Detailed Description</h4>
11096 <p id="rpipc0877ac1f352eec1a086">Alarm functions for scheduling future execution. </p>
11097 <p id="rpip1e89470c22191e144b9f">Alarms are added to alarm pools, which may hold a certain fixed number of active alarms. Each alarm pool utilizes one of four underlying hardware alarms, thus you may have up to four alarm pools. An alarm pool calls (except when the callback would happen before or during being set) the callback on the core from which the alarm pool was created. Callbacks are called from the hardware alarm IRQ handler, so care must be taken in their implementation.</p>
11098 <p id="rpip5b3ff6b2b32ac635c7a5">A default pool is created the core specified by PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM on core 0, and may be used by the method variants that take no alarm pool parameter.</p>
11099 <p class="see" id="rpipaf97fd7b08442f0a0f97" data-parent-id="rpip21dea420724fa4a0d64a" data-target-for="rpipaf97fd7b08442f0a0f97"><span class="label" id="rpip93e2edad445ac513123f" data-parent-id="rpipaf97fd7b08442f0a0f97" data-target-for="rpip93e2edad445ac513123f">See also</span><span class="target" id="rpip8cf34a093f2f3c448e3e" data-parent-id="rpipaf97fd7b08442f0a0f97" data-target-for="rpip8cf34a093f2f3c448e3e">struct <a class="el" href="structalarm__pool.html" id="rpip603774e2a20c522bf36b">alarm_pool</a> </span>
11101 <span class="target" id="rpip4e378c52862e3efd1c2c" data-parent-id="rpipaf97fd7b08442f0a0f97" data-target-for="rpip4e378c52862e3efd1c2c">
11102 <a class="el" href="hardware.html#hardware_timer" id="rpipe42f37aa6403bd8e84df">hardware_timer</a> </span></p>
11104 <div class="sect3">
11105 <h4 id="rpipefc2674eeb6c4b94e448">
11106 <a class="anchor" href="#rpipefc2674eeb6c4b94e448"></a>Macro Definition Documentation</h4>
11107 <a id="ga72314cafa18f7b2f90f9200be136ca27" name="ga72314cafa18f7b2f90f9200be136ca27"></a>
11108 <div class="sect4">
11109 <h5 id="rpip08fa2ea0ffaab2938140">
11110 <a class="anchor" href="#rpip08fa2ea0ffaab2938140"></a>◆ PICO_TIME_DEFAULT_ALARM_POOL_DISABLED</h5>
11111 <div class="memitem" id="rpipf32aaf74c60e78b8a577">
11112 <div class="memproto" id="rpipba0d9c4cbf878850be78">
11113 <table class="memname" id="rpip05ecb4ed6479fe54ac74">
11114 <tr id="rpipe85a09f5e782bea19d67">
11115 <td class="memname" id="rpip5bdcc5968bdd4a1a5f74">#define PICO_TIME_DEFAULT_ALARM_POOL_DISABLEDÂ Â Â 0</td>
11119 <div class="memdoc" id="rpipc025e58e14560a00a7d0">
11121 <p id="rpipcef77f59315f7774d4ef">If 1 then the default alarm pool is disabled (so no hardware alarm is claimed for the pool) </p>
11122 <div class="admonitionblock note" id="rpipc542067ce0ee1582bf9f" data-parent-id="rpipc025e58e14560a00a7d0"><table>
11123 <tr data-target="true" data-target-for="rpipc542067ce0ee1582bf9f">
11124 <td class="icon" id="rpip04abbbff1989b3080766" data-parent-id="rpipc542067ce0ee1582bf9f"><div class="title" data-target="true" data-target-for="rpip04abbbff1989b3080766">Note</div></td>
11125 <td class="content" id="rpipe5b123ad36622a463a59" data-parent-id="rpipc542067ce0ee1582bf9f" data-target-for="rpipe5b123ad36622a463a59">
11126 <p>Setting to 1 may cause some code not to compile as default timer pool related methods are removed</p>
11128 When the default alarm pool is disabled, <em id="rpip23b046e77c6ffd8f53b3">sleep_</em> methods and timeouts are no longer lower powered (they become <em id="rpip1027c11bdd1903c6a756">busy_wait_</em>)</p>
11133 <p class="see" id="rpipcd95a3d592e1ed51644d" data-parent-id="rpipc025e58e14560a00a7d0" data-target-for="rpipcd95a3d592e1ed51644d"><span class="label" id="rpip5328b7c1dca091e4e2d9" data-parent-id="rpipcd95a3d592e1ed51644d" data-target-for="rpip5328b7c1dca091e4e2d9">See also</span><span class="target" id="rpipc9a12959090609712d71" data-parent-id="rpipcd95a3d592e1ed51644d" data-target-for="rpipc9a12959090609712d71"><a class="el" href="#ga40b4a03bf9e967d4e7170d20c5c9fb15" title="Selects which hardware alarm is used for the default alarm pool." id="rpipbbd4b810a79ad147a388" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</a> </span>
11135 <span class="target" id="rpip0f92f96202b6456a6b28" data-parent-id="rpipcd95a3d592e1ed51644d" data-target-for="rpip0f92f96202b6456a6b28">
11136 <a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" title="The default alarm pool used when alarms are added without specifying an alarm pool,..." id="rpipc2ef59b1bddb848ba2a1" data-adjusted="true">alarm_pool_get_default()</a> </span></p>
11142 <a id="ga40b4a03bf9e967d4e7170d20c5c9fb15" name="ga40b4a03bf9e967d4e7170d20c5c9fb15"></a>
11144 <div class="sect4">
11145 <h5 id="rpip1cd284d8268c7de5d811">
11146 <a class="anchor" href="#rpip1cd284d8268c7de5d811"></a>◆ PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</h5>
11147 <div class="memitem" id="rpipcf6793a96d596b1f0389">
11148 <div class="memproto" id="rpipcdef34c405753e9fad45">
11149 <table class="memname" id="rpip91a83eec6ffd28d64e0b">
11150 <tr id="rpip9423dbc0852a4528306a">
11151 <td class="memname" id="rpip349a41d895c10a43e6db">#define PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUMÂ Â Â 3</td>
11155 <div class="memdoc" id="rpip32f6842194d849ccd08d">
11157 <p id="rpip7864de0980dd1e58dd70">Selects which hardware alarm is used for the default alarm pool. </p>
11158 <p class="see" id="rpip7d6e4db41f87c63c7e19" data-parent-id="rpip32f6842194d849ccd08d" data-target-for="rpip7d6e4db41f87c63c7e19"><span class="label" id="rpip65ab446400fb2f0832f8" data-parent-id="rpip7d6e4db41f87c63c7e19" data-target-for="rpip65ab446400fb2f0832f8">See also</span><span class="target" id="rpip79341b97044622b27814" data-parent-id="rpip7d6e4db41f87c63c7e19" data-target-for="rpip79341b97044622b27814"><a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" title="The default alarm pool used when alarms are added without specifying an alarm pool,..." id="rpip17aef40a13106ce6191b" data-adjusted="true">alarm_pool_get_default()</a> </span></p>
11164 <a id="ga4bb3180aa64f3c9af8c521ec1b22bdb2" name="ga4bb3180aa64f3c9af8c521ec1b22bdb2"></a>
11166 <div class="sect4">
11167 <h5 id="rpip3a9a1337e98b5e11225f">
11168 <a class="anchor" href="#rpip3a9a1337e98b5e11225f"></a>◆ PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS</h5>
11169 <div class="memitem" id="rpipc93b6832f94c01baf44c">
11170 <div class="memproto" id="rpipd207baf0d4e86ea04473">
11171 <table class="memname" id="rpip2439e0cc3d70ea6c0d0c">
11172 <tr id="rpip7d010f14211728f11502">
11173 <td class="memname" id="rpipd019a2a2cd00d54a32d3">#define PICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERSÂ Â Â 16</td>
11177 <div class="memdoc" id="rpip67f6d51a61cf57aad85f">
11179 <p id="rpip0d9709ed19488ee256b3">Selects the maximum number of concurrent timers in the default alarm pool. </p>
11180 <div class="admonitionblock note" id="rpip09245fe978d20238755e" data-parent-id="rpip67f6d51a61cf57aad85f"><table>
11181 <tr data-target="true" data-target-for="rpip09245fe978d20238755e">
11182 <td class="icon" id="rpip73b8d26c752e7416b7ee" data-parent-id="rpip09245fe978d20238755e"><div class="title" data-target="true" data-target-for="rpip73b8d26c752e7416b7ee">Note</div></td>
11183 <td class="content" id="rpip437d1c6b4f315c2cb1cd" data-parent-id="rpip09245fe978d20238755e" data-target-for="rpip437d1c6b4f315c2cb1cd">For implementation reasons this is limited to PICO_PHEAP_MAX_ENTRIES which defaults to 255 </td>
11186 <p class="see" id="rpipbe169ee56b0e4927be90" data-parent-id="rpip67f6d51a61cf57aad85f" data-target-for="rpipbe169ee56b0e4927be90"><span class="label" id="rpip2b638a59a24461fa7221" data-parent-id="rpipbe169ee56b0e4927be90" data-target-for="rpip2b638a59a24461fa7221">See also</span><span class="target" id="rpipf670cd9c7cd7d6c87802" data-parent-id="rpipbe169ee56b0e4927be90" data-target-for="rpipf670cd9c7cd7d6c87802"><a class="el" href="#ga40b4a03bf9e967d4e7170d20c5c9fb15" title="Selects which hardware alarm is used for the default alarm pool." id="rpip3d105883b294d11ca7c7" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</a> </span>
11188 <span class="target" id="rpip4d747d8e8bfff3a45fc9" data-parent-id="rpipbe169ee56b0e4927be90" data-target-for="rpip4d747d8e8bfff3a45fc9">
11189 <a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" title="The default alarm pool used when alarms are added without specifying an alarm pool,..." id="rpipd441aa254e5be3e562e0" data-adjusted="true">alarm_pool_get_default()</a> </span></p>
11197 <div class="sect3">
11198 <h4 id="rpip67e34cbb9ba08a564ff9">
11199 <a class="anchor" href="#rpip67e34cbb9ba08a564ff9"></a>Typedef Documentation</h4>
11200 <a id="gade88ed45e9b59ad39d91f17c8709c16a" name="gade88ed45e9b59ad39d91f17c8709c16a"></a>
11201 <div class="sect4">
11202 <h5 id="rpip8321e954df96e69a58bc">
11203 <a class="anchor" href="#rpip8321e954df96e69a58bc"></a>◆ alarm_callback_t</h5>
11204 <div class="memitem" id="rpip0f000a4ece14015b82b9">
11205 <div class="memproto" id="rpip25d87985958906981bdb">
11206 <table class="memname" id="rpip647adefd210932ebf4b5">
11207 <tr id="rpip5b245183a1cdc2579708">
11208 <td class="memname" id="rpip83d42898a3b2fc3355ca">typedef int64_t(* alarm_callback_t) (<a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip0bdce610cfe0aba2ace9" data-adjusted="true">alarm_id_t</a> id, void *user_data)</td>
11212 <div class="memdoc" id="rpipb6dfbb0693d32526c66e">
11214 <p id="rpipd8a4c73b75c6133168ad">User alarm callback. </p>
11215 <h4 id="rpip5acc7b185ff19b872b26" data-parent-id="rpip7328931053cf14457431" data-target-for="rpip5acc7b185ff19b872b26">Parameters</h4>
11216 <p class="paragraph" id="rpip3f21ffb1bbb028a63c79" data-parent-id="rpip7328931053cf14457431" data-target-for="rpip3f21ffb1bbb028a63c79">
11218 <table class="params" id="rpipfd1f60cb04d31645b111">
11219 <tr id="rpipd81099bbac64b0b6a1de">
11220 <td class="paramname" id="rpip1c8871e5f09d5a58546a">id</td>
11221 <td id="rpip72d8c9534d268382ed3c">the alarm_id as returned when the alarm was added </td>
11223 <tr id="rpip73478601f00e096904dd">
11224 <td class="paramname" id="rpip6cda1626a1ddb00e27b7">user_data</td>
11225 <td id="rpip1cd38fc265d7ca2a09e6">the user data passed when the alarm was added </td>
11231 <h4 class="label" id="rpip8c5b4a9d21489a21fcc8" data-parent-id="rpip9b68a4ee95c2c66a87cb" data-target-for="rpip8c5b4a9d21489a21fcc8">Returns</h4>
11232 <p class="returns" id="rpip4fb2880774f70d0c01d3" data-parent-id="rpip9b68a4ee95c2c66a87cb" data-target-for="rpip4fb2880774f70d0c01d3"><0 to reschedule the same alarm this many us from the time the alarm was previously scheduled to fire </p>
11234 <p class="returns" id="rpip544e3f229013d9db2bec" data-parent-id="rpip9b68a4ee95c2c66a87cb" data-target-for="rpip544e3f229013d9db2bec">
11235 >0 to reschedule the same alarm this many us from the time this method returns </p>
11237 <p class="returns" id="rpipb67971a2f33b783a68f8" data-parent-id="rpip9b68a4ee95c2c66a87cb" data-target-for="rpipb67971a2f33b783a68f8">
11238 0 to not reschedule the alarm </p>
11242 <a id="gaa593548569c182a0d65d2e06a9c3493b" name="gaa593548569c182a0d65d2e06a9c3493b"></a>
11244 <div class="sect4">
11245 <h5 id="rpip3e1e0630a05ead955f89">
11246 <a class="anchor" href="#rpip3e1e0630a05ead955f89"></a>◆ alarm_id_t</h5>
11247 <div class="memitem" id="rpip96e623d010b259f785f7">
11248 <div class="memproto" id="rpip67c845cc68927bb91333">
11249 <table class="memname" id="rpip2cdd55dbe85ef1c7f9fd">
11250 <tr id="rpip2193d36e96f45be7dc90">
11251 <td class="memname" id="rpip6f6cc96bbb087e10d6fe">typedef int32_t <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip8919341022da52703ad3" data-adjusted="true">alarm_id_t</a>
11256 <div class="memdoc" id="rpip6dd010850ad4b17005b2">
11258 <p id="rpipebb95948e5b2b65dac53">The identifier for an alarm. </p>
11259 <div class="admonitionblock note" id="rpip6c00ece4f76a44254006" data-parent-id="rpip6dd010850ad4b17005b2"><table>
11260 <tr data-target="true" data-target-for="rpip6c00ece4f76a44254006">
11261 <td class="icon" id="rpip7fedcd41ca51f7893974" data-parent-id="rpip6c00ece4f76a44254006"><div class="title" data-target="true" data-target-for="rpip7fedcd41ca51f7893974">Note</div></td>
11262 <td class="content" id="rpip389527c817fb7beb68d4" data-parent-id="rpip6c00ece4f76a44254006" data-target-for="rpip389527c817fb7beb68d4">
11263 <p>this identifier is signed because -1 is used as an error condition when creating alarms</p>
11265 alarm ids may be reused, however for convenience the implementation makes an attempt to defer reusing as long as possible. You should certainly expect it to be hundreds of ids before one is reused, although in most cases it is more. Nonetheless care must still be taken when cancelling alarms or other functionality based on alarms when the alarm may have expired, as eventually the alarm id may be reused for another alarm. </p>
11276 <div class="sect3">
11277 <h4 id="rpip4c04d34ae50cd32215e4">
11278 <a class="anchor" href="#rpip4c04d34ae50cd32215e4"></a>Function Documentation</h4>
11279 <a id="gae98ddd58a2c1d142eb6db7882512ce8d" name="gae98ddd58a2c1d142eb6db7882512ce8d"></a>
11280 <div class="sect4">
11281 <h5 id="rpip36652030ce86bd7e77a6">
11282 <a class="anchor" href="#rpip36652030ce86bd7e77a6"></a>◆ add_alarm_at()</h5>
11283 <div class="memitem" id="rpip6bed5c4d6ebdb630d35f">
11284 <div class="memproto" id="rpip599a2380bd74707d4c91">
11285 <table class="mlabels" id="rpip7cff684471997f52f585">
11286 <tr id="rpip261a2e02833224c89d58">
11287 <td class="mlabels-left" id="rpipbdaf19db46adf25b1d0c">
11288 <table class="memname" id="rpipff0cce0278cde0eafc53">
11289 <tr id="rpip4d115e7b45d379fc6b3c">
11290 <td class="memname" id="rpip7e796a894ab8c88d7bc4">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip3497bc1a5aa37d5e65c0" data-adjusted="true">alarm_id_t</a> add_alarm_at </td>
11291 <td id="rpipf54f8ca1c271173f0708">(</td>
11292 <td class="paramtype" id="rpip0e63b997405c942a6ec8">
11293 <a class="el" href="structabsolute__time__t.html" id="rpip977e2a91eed3fe884999">absolute_time_t</a>Â </td>
11294 <td class="paramname" id="rpip3bb8701161a6f7e3ba33">
11295 <em id="rpipdec27b16facff8827f23">time</em>, </td>
11297 <tr id="rpip043982af53a79e5d4577">
11298 <td class="paramkey" id="rpip16d358f6d162a5737ce2"></td>
11299 <td id="rpipc1ca7871acd09cdbccc1"></td>
11300 <td class="paramtype" id="rpip655916899b9a8c64fbaa">
11301 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpipc7dbf3781da30c1a9a88" data-adjusted="true">alarm_callback_t</a>Â </td>
11302 <td class="paramname" id="rpip576ed8c2ce75ccde4b40">
11303 <em id="rpip593a2ac39d19f7d4723f">callback</em>, </td>
11305 <tr id="rpip2817ac3646a42cc99ba6">
11306 <td class="paramkey" id="rpipcf7eb9c73e2ba718a311"></td>
11307 <td id="rpip28b8528a7f4b671a1a36"></td>
11308 <td class="paramtype" id="rpipbe4a6868e3484fd0eea1">void *Â </td>
11309 <td class="paramname" id="rpip59ba357a1ba7f9668df6">
11310 <em id="rpip282603b0c2e58c2366ad">user_data</em>, </td>
11312 <tr id="rpip287c06073470b1d01ae9">
11313 <td class="paramkey" id="rpipfee2ae3659c70cd8f357"></td>
11314 <td id="rpip0bf7d399bcaa4b385006"></td>
11315 <td class="paramtype" id="rpipf28da2d381b8a56138c4">bool </td>
11316 <td class="paramname" id="rpip11defc54bc0c094844b1">
11317 <em id="rpip2661f393a47ea3f8fd02">fire_if_past</em>Â </td>
11319 <tr id="rpip18e190ce541588784a6e">
11320 <td id="rpip05959bda98795023711f"></td>
11321 <td id="rpipd2955fae7cbc2bdb6cc0">)</td>
11322 <td id="rpipafb4decf817250c9299f"></td>
11323 <td id="rpip3b8f97ce0951d541ff1f"></td>
11327 <td class="mlabels-right" id="rpip6bf37e797c7b6e054e4f">
11328 <span class="mlabels" id="rpip0b59b68a5a246ebb3ea1"><span class="mlabel" id="rpip23cbf6774a1b8eb9062f">inline</span><span class="mlabel" id="rpipbdf6efff4a6f60198d35">static</span></span> </td>
11332 <div class="memdoc" id="rpipc4df292e619e3a58d667">
11334 <p id="rpip4d72c1e086435b3b8980">Add an alarm callback to be called at a specific time. </p>
11335 <p id="rpip2b620f27b06a4edd0bc5">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11336 <div class="admonitionblock note" id="rpipe93e8cb0714d7d315867" data-parent-id="rpipc4df292e619e3a58d667"><table>
11337 <tr data-target="true" data-target-for="rpipe93e8cb0714d7d315867">
11338 <td class="icon" id="rpipc423568938167f1cc15a" data-parent-id="rpipe93e8cb0714d7d315867"><div class="title" data-target="true" data-target-for="rpipc423568938167f1cc15a">Note</div></td>
11339 <td class="content" id="rpip9771c564d2a18518fffa" data-parent-id="rpipe93e8cb0714d7d315867" data-target-for="rpip9771c564d2a18518fffa">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11342 <h4 id="rpipe496218b57833632a604" data-parent-id="rpip3259568ee8eb0b4eefb8" data-target-for="rpipe496218b57833632a604">Parameters</h4>
11343 <p class="paragraph" id="rpip21889a7d6ee382310a1e" data-parent-id="rpip3259568ee8eb0b4eefb8" data-target-for="rpip21889a7d6ee382310a1e">
11345 <table class="params" id="rpipfe437dccd553f66c24a9">
11346 <tr id="rpip4b74776e98a086276d4c">
11347 <td class="paramname" id="rpip84413eaa298764b3543f">time</td>
11348 <td id="rpipd049ef1fbc4b7b3bd9af">the timestamp when (after which) the callback should fire </td>
11350 <tr id="rpip11a8508a7301d6cc966d">
11351 <td class="paramname" id="rpipda55a155c95f35662cc6">callback</td>
11352 <td id="rpipdd12b42f9948aacff8cf">the callback function </td>
11354 <tr id="rpip1c59551937cabd26b747">
11355 <td class="paramname" id="rpip01bf3052b418b893743e">user_data</td>
11356 <td id="rpip2a12d618f410f8712435">user data to pass to the callback function </td>
11358 <tr id="rpip199f342f35b092cfee2c">
11359 <td class="paramname" id="rpip06d507e2bbecf33ca9c0">fire_if_past</td>
11360 <td id="rpip80d424651d359f0209e8">if true, and the alarm time falls before or during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11366 <h4 class="label" id="rpipc4dd1525b43396013e2b" data-parent-id="rpip13489e0732d19a77cc08" data-target-for="rpipc4dd1525b43396013e2b">Returns</h4>
11367 <p class="returns" id="rpip630c4c7864be66d04c63" data-parent-id="rpip13489e0732d19a77cc08" data-target-for="rpip630c4c7864be66d04c63">>0 the alarm id </p>
11369 <p class="returns" id="rpip7657ffba35bbccce5cf6" data-parent-id="rpip13489e0732d19a77cc08" data-target-for="rpip7657ffba35bbccce5cf6">
11370 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpipea5bdd5630808cab6f7e">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11372 <p class="returns" id="rpip72eee8de3115703f399e" data-parent-id="rpip13489e0732d19a77cc08" data-target-for="rpip72eee8de3115703f399e">
11373 -1 if there were no alarm slots available </p>
11377 <a id="ga8bb045ab597f773d7d5fdfea5db94f69" name="ga8bb045ab597f773d7d5fdfea5db94f69"></a>
11379 <div class="sect4">
11380 <h5 id="rpipbcd38f9c524557e7c03e">
11381 <a class="anchor" href="#rpipbcd38f9c524557e7c03e"></a>◆ add_alarm_in_ms()</h5>
11382 <div class="memitem" id="rpip68c1b134f480c5264ef8">
11383 <div class="memproto" id="rpip69123d1da61ed9449129">
11384 <table class="mlabels" id="rpip495f4bf20fc85f4a4528">
11385 <tr id="rpipa0bc859d84e9f105b698">
11386 <td class="mlabels-left" id="rpip06ca908f166f36037589">
11387 <table class="memname" id="rpip913788d7a7f716e6ba9a">
11388 <tr id="rpipd94acb4ed4196c2637ba">
11389 <td class="memname" id="rpipd1eb85e4f12b9238f374">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipcf1ed2e6787c6b89ff3c" data-adjusted="true">alarm_id_t</a> add_alarm_in_ms </td>
11390 <td id="rpipfe3e74491afe1a03cae4">(</td>
11391 <td class="paramtype" id="rpip1f3392854790a97aa2b5">uint32_t </td>
11392 <td class="paramname" id="rpipb9f310009a1c96444a75">
11393 <em id="rpip6ba7ffca458b8dd780c8">ms</em>, </td>
11395 <tr id="rpip9aef8f1e97177260f70d">
11396 <td class="paramkey" id="rpip58d72d292f5644db8aea"></td>
11397 <td id="rpip5566413401eb48ec7d6e"></td>
11398 <td class="paramtype" id="rpipf4657d0a69538ce059f3">
11399 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip2616dc764f7ef86590e6" data-adjusted="true">alarm_callback_t</a>Â </td>
11400 <td class="paramname" id="rpip3d2903e87c71f2ae3541">
11401 <em id="rpip213fe6722d6003d0dd0e">callback</em>, </td>
11403 <tr id="rpip0e3cfadea2c4907b35fb">
11404 <td class="paramkey" id="rpipcdc3f7a10fe11ec21448"></td>
11405 <td id="rpip47429d183e3690314bf6"></td>
11406 <td class="paramtype" id="rpip20988412de1cf075e13f">void *Â </td>
11407 <td class="paramname" id="rpip8df154ef173239461d3e">
11408 <em id="rpip8cdda26a5419c25a4220">user_data</em>, </td>
11410 <tr id="rpip1b777cda8d8353fcd515">
11411 <td class="paramkey" id="rpip86dfd4e4b8e9b5b451d9"></td>
11412 <td id="rpip71cd2c7b265b5205669a"></td>
11413 <td class="paramtype" id="rpip5bf41ac5aec80e742df5">bool </td>
11414 <td class="paramname" id="rpip030c0cb4c78f12118c6b">
11415 <em id="rpipaf9a88a2ca7dd2d25179">fire_if_past</em>Â </td>
11417 <tr id="rpip9abb2a8df8126f0ff876">
11418 <td id="rpipfec094b19a1c21c19e28"></td>
11419 <td id="rpip2f17322eb6014c89a09a">)</td>
11420 <td id="rpip3da148b4a70c04ae77a4"></td>
11421 <td id="rpipc27b3e4c3ef44e1bfc29"></td>
11425 <td class="mlabels-right" id="rpipf1767a4fad676e2d9143">
11426 <span class="mlabels" id="rpipbcd8059a404bae00467b"><span class="mlabel" id="rpip4c11fb6e754a6e7fc0f1">inline</span><span class="mlabel" id="rpip2c05bbdbcb526bf88060">static</span></span> </td>
11430 <div class="memdoc" id="rpip5ed3d300f7d31ee1d8bd">
11432 <p id="rpipaacb50e9badcd5f65b15">Add an alarm callback to be called after a delay specified in milliseconds. </p>
11433 <p id="rpip89218d2ef2526168bda7">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11434 <div class="admonitionblock note" id="rpip6f29b5ab52bc583c92c1" data-parent-id="rpip5ed3d300f7d31ee1d8bd"><table>
11435 <tr data-target="true" data-target-for="rpip6f29b5ab52bc583c92c1">
11436 <td class="icon" id="rpip549232231bc9414de771" data-parent-id="rpip6f29b5ab52bc583c92c1"><div class="title" data-target="true" data-target-for="rpip549232231bc9414de771">Note</div></td>
11437 <td class="content" id="rpipb0d72184da95c393a7c8" data-parent-id="rpip6f29b5ab52bc583c92c1" data-target-for="rpipb0d72184da95c393a7c8">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11440 <h4 id="rpip2a790e582150ceacc95c" data-parent-id="rpip5c99403e04ef6e18b604" data-target-for="rpip2a790e582150ceacc95c">Parameters</h4>
11441 <p class="paragraph" id="rpipc559d7deb65610f32c6a" data-parent-id="rpip5c99403e04ef6e18b604" data-target-for="rpipc559d7deb65610f32c6a">
11443 <table class="params" id="rpip0f5db2b4efe3c0cb9c4f">
11444 <tr id="rpip6f977ab638afa2aa2738">
11445 <td class="paramname" id="rpipb5d49f9152ee254fc4ca">ms</td>
11446 <td id="rpipad7d02a99f768a412e5a">the delay (from now) in milliseconds when (after which) the callback should fire </td>
11448 <tr id="rpip3584614d31783ef299e6">
11449 <td class="paramname" id="rpipbbadefc583d71299c783">callback</td>
11450 <td id="rpipdd53c187564b9cb0caff">the callback function </td>
11452 <tr id="rpipf4839196a48da8db6793">
11453 <td class="paramname" id="rpip6adf910787fb23ae520b">user_data</td>
11454 <td id="rpip24164d9381632cf5eef8">user data to pass to the callback function </td>
11456 <tr id="rpip5dfa77f731042fd35c02">
11457 <td class="paramname" id="rpipef73506fbb683e9b5206">fire_if_past</td>
11458 <td id="rpip5aeaf76df61f0993320c">if true, and the alarm time falls during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11464 <h4 class="label" id="rpipb00b5d8ded38986304f6" data-parent-id="rpip79624a8bcc509bfa16e8" data-target-for="rpipb00b5d8ded38986304f6">Returns</h4>
11465 <p class="returns" id="rpipbab70158971e956db31e" data-parent-id="rpip79624a8bcc509bfa16e8" data-target-for="rpipbab70158971e956db31e">>0 the alarm id </p>
11467 <p class="returns" id="rpipedc48792633940cde3e8" data-parent-id="rpip79624a8bcc509bfa16e8" data-target-for="rpipedc48792633940cde3e8">
11468 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpip5a9c1a89cbd805684b16">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11470 <p class="returns" id="rpip4279ed1f6f73262469bb" data-parent-id="rpip79624a8bcc509bfa16e8" data-target-for="rpip4279ed1f6f73262469bb">
11471 -1 if there were no alarm slots available </p>
11475 <a id="ga69b4481d9d9a906caefb31c54a048575" name="ga69b4481d9d9a906caefb31c54a048575"></a>
11477 <div class="sect4">
11478 <h5 id="rpipf818579f3d7ba1ee3288">
11479 <a class="anchor" href="#rpipf818579f3d7ba1ee3288"></a>◆ add_alarm_in_us()</h5>
11480 <div class="memitem" id="rpip6e2afcd45221054abfb1">
11481 <div class="memproto" id="rpip553f2b1e4a6a98d9f08e">
11482 <table class="mlabels" id="rpipf72062d127ca753101e6">
11483 <tr id="rpip1d0483515e6b8bbd6442">
11484 <td class="mlabels-left" id="rpip188a8b4d0c8cbf8f6c23">
11485 <table class="memname" id="rpipde187dceeecaa94f42f6">
11486 <tr id="rpip108eebf0523b5f1689d4">
11487 <td class="memname" id="rpip5d0aca8cbce13942e8c5">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip62497d1ad9a9dd4c96b7" data-adjusted="true">alarm_id_t</a> add_alarm_in_us </td>
11488 <td id="rpip2b1478cdf734170122c4">(</td>
11489 <td class="paramtype" id="rpip9853af2e4fb84d6b7def">uint64_t </td>
11490 <td class="paramname" id="rpipb40a047eac6834cb9c13">
11491 <em id="rpip573c0e2af437fc1c8cc4">us</em>, </td>
11493 <tr id="rpiped7b69b5a8830d730324">
11494 <td class="paramkey" id="rpip9e6694581265e3caf7d3"></td>
11495 <td id="rpip83d6cb76d2323fb153d0"></td>
11496 <td class="paramtype" id="rpip55678418af68eab56060">
11497 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip714aeeb5ae0bc8207165" data-adjusted="true">alarm_callback_t</a>Â </td>
11498 <td class="paramname" id="rpip2ad5ca6a4b6a1f723d17">
11499 <em id="rpip0e04c6209c291ea2b8fd">callback</em>, </td>
11501 <tr id="rpip11a5ed2e847123b4a776">
11502 <td class="paramkey" id="rpip23fd3d65a22ee544072b"></td>
11503 <td id="rpipf5ff0725affb6144d5af"></td>
11504 <td class="paramtype" id="rpip6bd5c43427289fc36f3d">void *Â </td>
11505 <td class="paramname" id="rpip12b64c7c47ef2fe8d994">
11506 <em id="rpip7d4105be7c75b3e8f2ac">user_data</em>, </td>
11508 <tr id="rpipbf10ade182f0dcdd6728">
11509 <td class="paramkey" id="rpip46f27faa6770289d410e"></td>
11510 <td id="rpip3e307d3f3f8baee4e694"></td>
11511 <td class="paramtype" id="rpipd7615955d8f38a872a2e">bool </td>
11512 <td class="paramname" id="rpip1b6ff15913381d743e4d">
11513 <em id="rpip4cc9f5ec93eec21659fc">fire_if_past</em>Â </td>
11515 <tr id="rpip47df64d7ee8cb4be5600">
11516 <td id="rpip1fbbb4afaaa294c38d44"></td>
11517 <td id="rpip35a601a6bdcf958fdcd0">)</td>
11518 <td id="rpipd64a7956169167f2dde9"></td>
11519 <td id="rpipbe868f925c62b491f658"></td>
11523 <td class="mlabels-right" id="rpipbc3c1d562400200b56f2">
11524 <span class="mlabels" id="rpipf157697f2281bb229a5b"><span class="mlabel" id="rpip9d679e09b9776d8a286c">inline</span><span class="mlabel" id="rpip3a223048b0ba70bb6fb7">static</span></span> </td>
11528 <div class="memdoc" id="rpip279821df313ec0ccbf28">
11530 <p id="rpip1b9e0127fcee15cebfc5">Add an alarm callback to be called after a delay specified in microseconds. </p>
11531 <p id="rpipb5431b81f72543e1d7f9">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11532 <div class="admonitionblock note" id="rpip25a5e62f2b2b357e9ce0" data-parent-id="rpip279821df313ec0ccbf28"><table>
11533 <tr data-target="true" data-target-for="rpip25a5e62f2b2b357e9ce0">
11534 <td class="icon" id="rpipa8128742191d47287cee" data-parent-id="rpip25a5e62f2b2b357e9ce0"><div class="title" data-target="true" data-target-for="rpipa8128742191d47287cee">Note</div></td>
11535 <td class="content" id="rpip210e9825dd122e435130" data-parent-id="rpip25a5e62f2b2b357e9ce0" data-target-for="rpip210e9825dd122e435130">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11538 <h4 id="rpip237edbc13ac91a0564f3" data-parent-id="rpip684a1ce4cc6abf73bb83" data-target-for="rpip237edbc13ac91a0564f3">Parameters</h4>
11539 <p class="paragraph" id="rpipf868e7a1b61548ac2a32" data-parent-id="rpip684a1ce4cc6abf73bb83" data-target-for="rpipf868e7a1b61548ac2a32">
11541 <table class="params" id="rpip347b5b8c6860d3e61fc3">
11542 <tr id="rpip2fa0051dbd0248c039c3">
11543 <td class="paramname" id="rpipb4b0fccf884c363ccf4c">us</td>
11544 <td id="rpip15a294f992a9415a0c23">the delay (from now) in microseconds when (after which) the callback should fire </td>
11546 <tr id="rpip5965fcf1ebb8ade5e347">
11547 <td class="paramname" id="rpip5c28f60462e3b4d48d22">callback</td>
11548 <td id="rpip430ca6f2b6f680b4da61">the callback function </td>
11550 <tr id="rpip31e0f6d4823a593b2b74">
11551 <td class="paramname" id="rpip9e997fc31741e162e024">user_data</td>
11552 <td id="rpip5bdb55e080c6ff203b84">user data to pass to the callback function </td>
11554 <tr id="rpip6e6feb52182c380e654d">
11555 <td class="paramname" id="rpip1c0bfe7f61f6426b8b0b">fire_if_past</td>
11556 <td id="rpipa5a106dd4ac2d89de6ee">if true, and the alarm time falls during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11562 <h4 class="label" id="rpip66672d1248322fe81e1b" data-parent-id="rpip0540a644752c13aada54" data-target-for="rpip66672d1248322fe81e1b">Returns</h4>
11563 <p class="returns" id="rpip33413d25d8f81ea302c3" data-parent-id="rpip0540a644752c13aada54" data-target-for="rpip33413d25d8f81ea302c3">>0 the alarm id </p>
11565 <p class="returns" id="rpip2d1d6491bae2d4870ebb" data-parent-id="rpip0540a644752c13aada54" data-target-for="rpip2d1d6491bae2d4870ebb">
11566 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpip1b667d11f9c4ceb15347">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11568 <p class="returns" id="rpipb7c92d72f53e605a6e37" data-parent-id="rpip0540a644752c13aada54" data-target-for="rpipb7c92d72f53e605a6e37">
11569 -1 if there were no alarm slots available </p>
11573 <a id="gab75446a927e4e870ad27fde145a88019" name="gab75446a927e4e870ad27fde145a88019"></a>
11575 <div class="sect4">
11576 <h5 id="rpip071e21fe146cf416c3f7">
11577 <a class="anchor" href="#rpip071e21fe146cf416c3f7"></a>◆ alarm_pool_add_alarm_at()</h5>
11578 <div class="memitem" id="rpipe8a464a09670bd40d92f">
11579 <div class="memproto" id="rpip358f3ea96633c4b3df46">
11580 <table class="memname" id="rpipa0547d75f00524b7c310">
11581 <tr id="rpipedd7490cdbf86ca3dff7">
11582 <td class="memname" id="rpipd76b0f65d8652b5457ad">
11583 <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip3c87670304cd112f8483" data-adjusted="true">alarm_id_t</a> alarm_pool_add_alarm_at </td>
11584 <td id="rpipe55628982e91539c4f98">(</td>
11585 <td class="paramtype" id="rpip397f569155434e40c730">
11586 <a class="el" href="structalarm__pool.html" id="rpip4ef489ba0348ce2e061c">alarm_pool_t</a> *Â </td>
11587 <td class="paramname" id="rpip60ba9851213c8c9fb36c">
11588 <em id="rpipc13772cd4113e6540c49">pool</em>, </td>
11590 <tr id="rpip5dcc0df250a8c7bbd25f">
11591 <td class="paramkey" id="rpipd96a28bcbc18113536de"></td>
11592 <td id="rpip25d5fb5e17558cf0a952"></td>
11593 <td class="paramtype" id="rpip11300ca2a87c45238889">
11594 <a class="el" href="structabsolute__time__t.html" id="rpipe369992e114175898c9c">absolute_time_t</a>Â </td>
11595 <td class="paramname" id="rpip9d5f20c802da9f2a05ba">
11596 <em id="rpip64374c1911e7bfd73cc9">time</em>, </td>
11598 <tr id="rpip83f1ef1c33eea2869128">
11599 <td class="paramkey" id="rpipffdd46d9b74c02bac683"></td>
11600 <td id="rpip1aa6ad8cfa350be91de5"></td>
11601 <td class="paramtype" id="rpipb5e6df0096878b131417">
11602 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip7c06dcbb8440eeffbff0" data-adjusted="true">alarm_callback_t</a>Â </td>
11603 <td class="paramname" id="rpip532b829723c50dd4be12">
11604 <em id="rpip0e08fa201e1a1985cdcb">callback</em>, </td>
11606 <tr id="rpip092080c74dfae861647f">
11607 <td class="paramkey" id="rpip2b8dd16b64436c714867"></td>
11608 <td id="rpip6b018915afea9e4d4070"></td>
11609 <td class="paramtype" id="rpipbb14efa3ddf242365e73">void *Â </td>
11610 <td class="paramname" id="rpipcdedc838233e82f7c043">
11611 <em id="rpipff4ee7e1643abf1c644c">user_data</em>, </td>
11613 <tr id="rpip7f96a8dc98b0de03d5e8">
11614 <td class="paramkey" id="rpipd13eb3135308f9ffe6de"></td>
11615 <td id="rpip031691e04939fe0ef755"></td>
11616 <td class="paramtype" id="rpipde420dec33ea7715d757">bool </td>
11617 <td class="paramname" id="rpip4a0079fdc4c1335b27b2">
11618 <em id="rpip112e6e47c5ef6d8070c3">fire_if_past</em>Â </td>
11620 <tr id="rpip3e4fd90b8cd457159784">
11621 <td id="rpipf970408e1d29e9fc9f2c"></td>
11622 <td id="rpipa67a51da4858db07a047">)</td>
11623 <td id="rpipa2aa5e339fac5262a436"></td>
11624 <td id="rpipcf063f75b99b04df8e56"></td>
11628 <div class="memdoc" id="rpip76bd3c9a083a98aee553">
11630 <p id="rpipe771cc7cd851ec714796">Add an alarm callback to be called at a specific time. </p>
11631 <p id="rpip7a8dbb35cf1851e3c827">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11632 <div class="admonitionblock note" id="rpip1e4c4692baf4bc9b1534" data-parent-id="rpip76bd3c9a083a98aee553"><table>
11633 <tr data-target="true" data-target-for="rpip1e4c4692baf4bc9b1534">
11634 <td class="icon" id="rpip9e9dd8e82dadb7904190" data-parent-id="rpip1e4c4692baf4bc9b1534"><div class="title" data-target="true" data-target-for="rpip9e9dd8e82dadb7904190">Note</div></td>
11635 <td class="content" id="rpip858dc8a6151d33ff02a5" data-parent-id="rpip1e4c4692baf4bc9b1534" data-target-for="rpip858dc8a6151d33ff02a5">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11638 <h4 id="rpip7b34726aad63b61dcd2a" data-parent-id="rpip11cbc8b9bcc9b1bf3f2f" data-target-for="rpip7b34726aad63b61dcd2a">Parameters</h4>
11639 <p class="paragraph" id="rpip1558bde3cdcbe234adcb" data-parent-id="rpip11cbc8b9bcc9b1bf3f2f" data-target-for="rpip1558bde3cdcbe234adcb">
11641 <table class="params" id="rpipb04f5515fa2cea19d438">
11642 <tr id="rpip33aee39942b40d43eaa2">
11643 <td class="paramname" id="rpipca9263900e67c4dcb79a">pool</td>
11644 <td id="rpip5d1e55b866e09dbea9e0">the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) </td>
11646 <tr id="rpip46025f4f4a723123ac25">
11647 <td class="paramname" id="rpip1ea047a17317d57ddc68">time</td>
11648 <td id="rpip7b071722ae98c9a99b35">the timestamp when (after which) the callback should fire </td>
11650 <tr id="rpip037721fb41eb78d9ca5c">
11651 <td class="paramname" id="rpip16636d771b1564143da7">callback</td>
11652 <td id="rpip81a9620835eb3b8bab14">the callback function </td>
11654 <tr id="rpip1afc0f5533b595df9fbc">
11655 <td class="paramname" id="rpipc058a664e8b039bddeb7">user_data</td>
11656 <td id="rpip2af9c55521db436f43d1">user data to pass to the callback function </td>
11658 <tr id="rpip6f7c821e9b91e645078d">
11659 <td class="paramname" id="rpipe49fc8487d356fd76054">fire_if_past</td>
11660 <td id="rpip60e902ac49d33ab737d4">if true, and the alarm time falls before or during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11666 <h4 class="label" id="rpipf9850e53395dca97c510" data-parent-id="rpip048ae958bd2553f51754" data-target-for="rpipf9850e53395dca97c510">Returns</h4>
11667 <p class="returns" id="rpip56c48552181bf328fe05" data-parent-id="rpip048ae958bd2553f51754" data-target-for="rpip56c48552181bf328fe05">>0 the alarm id for an active (at the time of return) alarm </p>
11669 <p class="returns" id="rpipd53cb50a5d833f31be61" data-parent-id="rpip048ae958bd2553f51754" data-target-for="rpipd53cb50a5d833f31be61">
11670 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpip521463936db02697e380">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11672 <p class="returns" id="rpipf29806e200cf292f55a3" data-parent-id="rpip048ae958bd2553f51754" data-target-for="rpipf29806e200cf292f55a3">
11673 -1 if there were no alarm slots available </p>
11677 <a id="ga72bfc8c2dd5bf334cd68af2e349a1b37" name="ga72bfc8c2dd5bf334cd68af2e349a1b37"></a>
11679 <div class="sect4">
11680 <h5 id="rpip3688756c8b754f88e4ba">
11681 <a class="anchor" href="#rpip3688756c8b754f88e4ba"></a>◆ alarm_pool_add_alarm_at_force_in_context()</h5>
11682 <div class="memitem" id="rpip7c058d0e0c0ff43cb007">
11683 <div class="memproto" id="rpip9d22defc6780018233b8">
11684 <table class="memname" id="rpip4fee775bee7175d55584">
11685 <tr id="rpip52d167a56b1e5ad91ad0">
11686 <td class="memname" id="rpip4573d3b8dca1b61a85a2">
11687 <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip8f2574934f95f17f62e0" data-adjusted="true">alarm_id_t</a> alarm_pool_add_alarm_at_force_in_context </td>
11688 <td id="rpipadb75c942226539171e8">(</td>
11689 <td class="paramtype" id="rpipf19ac8a016c15210d4de">
11690 <a class="el" href="structalarm__pool.html" id="rpip246de5a0c3fafa87982c">alarm_pool_t</a> *Â </td>
11691 <td class="paramname" id="rpipc938df2a22168b5f4e07">
11692 <em id="rpip8d96b13a26489af52e87">pool</em>, </td>
11694 <tr id="rpip403c6ba77516918ac90e">
11695 <td class="paramkey" id="rpipafc428ace05631ad64c8"></td>
11696 <td id="rpip92529eaad9dfaaf3c2a8"></td>
11697 <td class="paramtype" id="rpipbf780f82e2561355a37f">
11698 <a class="el" href="structabsolute__time__t.html" id="rpipbd7f9660a6b08021459d">absolute_time_t</a>Â </td>
11699 <td class="paramname" id="rpipd9366d111d7b6787b8d2">
11700 <em id="rpipd1751cd58b751bd090ba">time</em>, </td>
11702 <tr id="rpip1a7366bcc2c250b00f4f">
11703 <td class="paramkey" id="rpip80d5c29a544da166fbd3"></td>
11704 <td id="rpip0f0ee1dcfd132f710094"></td>
11705 <td class="paramtype" id="rpip4f5b9c81ceccd135bf9e">
11706 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip6cc05fdb27c59407dc6a" data-adjusted="true">alarm_callback_t</a>Â </td>
11707 <td class="paramname" id="rpip4807cb486891eb3a260e">
11708 <em id="rpipf01a1ffc4786745a96f0">callback</em>, </td>
11710 <tr id="rpipc39b4197dd6491e72c0e">
11711 <td class="paramkey" id="rpipcadb2f92065f8213bd2f"></td>
11712 <td id="rpip125b01654457b41231e8"></td>
11713 <td class="paramtype" id="rpip9c862f53d5cc623f9a19">void *Â </td>
11714 <td class="paramname" id="rpip342b24fac837676a591f">
11715 <em id="rpip2b8173b7d0a605426453">user_data</em>Â </td>
11717 <tr id="rpip7b7b702a2dcc1f544546">
11718 <td id="rpip0df32ae142f892cbf015"></td>
11719 <td id="rpipfd123bdf131d793bc6fd">)</td>
11720 <td id="rpip213386ee3553f0d48071"></td>
11721 <td id="rpip1f0e81237bf1fb01e588"></td>
11725 <div class="memdoc" id="rpip4f2c79dfdf013ceeef02">
11727 <p id="rpip52eabb0d56cef408c6b4">Add an alarm callback to be called at or after a specific time. </p>
11728 <p id="rpip55859c86b8150f893d8b">The callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. Unlike <a class="el" href="#gab75446a927e4e870ad27fde145a88019" id="rpip4dafc400b0a99a8fd795" data-adjusted="true">alarm_pool_add_alarm_at</a>, this method guarantees to call the callback from that core even if the time is during this method call or in the past.</p>
11729 <div class="admonitionblock note" id="rpip87636d74dde9baac61db" data-parent-id="rpip4f2c79dfdf013ceeef02"><table>
11730 <tr data-target="true" data-target-for="rpip87636d74dde9baac61db">
11731 <td class="icon" id="rpip75db7c39f4a01118c53f" data-parent-id="rpip87636d74dde9baac61db"><div class="title" data-target="true" data-target-for="rpip75db7c39f4a01118c53f">Note</div></td>
11732 <td class="content" id="rpip80a14f045d131dadf252" data-parent-id="rpip87636d74dde9baac61db" data-target-for="rpip80a14f045d131dadf252">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11735 <h4 id="rpip9a4580dba8ea3d5792c8" data-parent-id="rpip053d58b70ccd680811fa" data-target-for="rpip9a4580dba8ea3d5792c8">Parameters</h4>
11736 <p class="paragraph" id="rpip6eb67626ec9ac9462a04" data-parent-id="rpip053d58b70ccd680811fa" data-target-for="rpip6eb67626ec9ac9462a04">
11738 <table class="params" id="rpip25eb55f6562a3ef7e0da">
11739 <tr id="rpip82a5e5c3e8bbdbe832e7">
11740 <td class="paramname" id="rpip12b68769f958ec15027e">pool</td>
11741 <td id="rpip67bf9c6701bb370d4130">the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) </td>
11743 <tr id="rpipa2ff8c89f2acfa036cdb">
11744 <td class="paramname" id="rpip2d7641428931006fc2e4">time</td>
11745 <td id="rpip3ff95c6b567d7d92fa6e">the timestamp when (after which) the callback should fire </td>
11747 <tr id="rpip1bb82f58c176fa44c8cc">
11748 <td class="paramname" id="rpip2c5a2167b5ccee1de90d">callback</td>
11749 <td id="rpip70f2a27ab81b39f9a4f6">the callback function </td>
11751 <tr id="rpip5308b64fc4d257d569db">
11752 <td class="paramname" id="rpipfc5c2b174bfde386b996">user_data</td>
11753 <td id="rpip2c90039e5b95ebd0f1eb">user data to pass to the callback function </td>
11759 <h4 class="label" id="rpip0ba239fabcc7193c3b72" data-parent-id="rpip85034495c2605052077b" data-target-for="rpip0ba239fabcc7193c3b72">Returns</h4>
11760 <p class="returns" id="rpipf7f600a4feb91eef6b1c" data-parent-id="rpip85034495c2605052077b" data-target-for="rpipf7f600a4feb91eef6b1c">>0 the alarm id for an active (at the time of return) alarm </p>
11762 <p class="returns" id="rpip10dcd22bf26bc8e2ef74" data-parent-id="rpip85034495c2605052077b" data-target-for="rpip10dcd22bf26bc8e2ef74">
11763 -1 if there were no alarm slots available </p>
11767 <a id="ga6e32765c525683f216fc42bd1984e239" name="ga6e32765c525683f216fc42bd1984e239"></a>
11769 <div class="sect4">
11770 <h5 id="rpip2d1a1740ccf30dee86d3">
11771 <a class="anchor" href="#rpip2d1a1740ccf30dee86d3"></a>◆ alarm_pool_add_alarm_in_ms()</h5>
11772 <div class="memitem" id="rpipc4e55706ada3b1183d1b">
11773 <div class="memproto" id="rpip4f11a505fc080cff8b80">
11774 <table class="mlabels" id="rpip510f90e1655a51f8a18d">
11775 <tr id="rpipb9118c1278eaf1dc6a55">
11776 <td class="mlabels-left" id="rpipeec0c441cfa0c8467ed4">
11777 <table class="memname" id="rpip1bc4ae1e59b41a14ff80">
11778 <tr id="rpip8f3e9d5953f34c171de6">
11779 <td class="memname" id="rpipb052402720715db181ee">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip2fbea12559cea0dc8369" data-adjusted="true">alarm_id_t</a> alarm_pool_add_alarm_in_ms </td>
11780 <td id="rpip45fceaf5a68ab256130f">(</td>
11781 <td class="paramtype" id="rpip8bf5fa64303c2ac7aece">
11782 <a class="el" href="structalarm__pool.html" id="rpipfce0ffe520f92c5090f9">alarm_pool_t</a> *Â </td>
11783 <td class="paramname" id="rpipf88fe6a678c257f07bf5">
11784 <em id="rpipb5ced27c7a6cfedf4c31">pool</em>, </td>
11786 <tr id="rpip69aeba8cda68588bfa4d">
11787 <td class="paramkey" id="rpip46cfc4c7045d73109230"></td>
11788 <td id="rpipd219a013598ec3a002f8"></td>
11789 <td class="paramtype" id="rpipc83e68c1c79422d7c946">uint32_t </td>
11790 <td class="paramname" id="rpip4da82a0ebb715eeb11ed">
11791 <em id="rpip3b954fd47da37a468ae6">ms</em>, </td>
11793 <tr id="rpipd3ad2f7676f9ce70c0c3">
11794 <td class="paramkey" id="rpip5e651a6a07e5a5d329ff"></td>
11795 <td id="rpip2e309681a9f6481c8782"></td>
11796 <td class="paramtype" id="rpip94c5a0c510f06686d1f9">
11797 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip7de423c8690e277af894" data-adjusted="true">alarm_callback_t</a>Â </td>
11798 <td class="paramname" id="rpip34788fb1292ba09fdd75">
11799 <em id="rpip23da27823c9c7a599cc3">callback</em>, </td>
11801 <tr id="rpip057f7fb69e815e13c99c">
11802 <td class="paramkey" id="rpipc9f15408b95fa6757b29"></td>
11803 <td id="rpipb42715986f8c8ee52f82"></td>
11804 <td class="paramtype" id="rpipd7c6739dc0560e912069">void *Â </td>
11805 <td class="paramname" id="rpipf580700624ccb45830fe">
11806 <em id="rpip8e1d051f2fa8ef88a48f">user_data</em>, </td>
11808 <tr id="rpipf980a5237610d0ce8a27">
11809 <td class="paramkey" id="rpiped92c82951a2560a21a6"></td>
11810 <td id="rpip2c8d417f5374e44fcd25"></td>
11811 <td class="paramtype" id="rpipa3e14c15656889fe5721">bool </td>
11812 <td class="paramname" id="rpip5f56a53846084f801a80">
11813 <em id="rpip451aa9816186f2f7136c">fire_if_past</em>Â </td>
11815 <tr id="rpipf006527b3c286fcb9e0d">
11816 <td id="rpip8175cfd81c270b509681"></td>
11817 <td id="rpipdc354c027d6e7ee85709">)</td>
11818 <td id="rpipb0fe77f7fe275dc626bd"></td>
11819 <td id="rpip7feb04ad010b03ad6399"></td>
11823 <td class="mlabels-right" id="rpipa51443747f983db83ab1">
11824 <span class="mlabels" id="rpip5a4e572a1cc6cd751450"><span class="mlabel" id="rpip5912366a8d0a00f16973">inline</span><span class="mlabel" id="rpipe1386029c53f7251e92e">static</span></span> </td>
11828 <div class="memdoc" id="rpipde88b42168595fc4210b">
11830 <p id="rpipeeb9f7226f88fdfa470e">Add an alarm callback to be called after a delay specified in milliseconds. </p>
11831 <p id="rpip60bd5e1ffb914d6ec5c0">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11832 <div class="admonitionblock note" id="rpip66f406714b6b50bbe975" data-parent-id="rpipde88b42168595fc4210b"><table>
11833 <tr data-target="true" data-target-for="rpip66f406714b6b50bbe975">
11834 <td class="icon" id="rpipce30d62c36d7cb38277d" data-parent-id="rpip66f406714b6b50bbe975"><div class="title" data-target="true" data-target-for="rpipce30d62c36d7cb38277d">Note</div></td>
11835 <td class="content" id="rpipdb1fb4896ac059819006" data-parent-id="rpip66f406714b6b50bbe975" data-target-for="rpipdb1fb4896ac059819006">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11838 <h4 id="rpipc1cbad8972628828b93a" data-parent-id="rpipe7236962073cf7e62199" data-target-for="rpipc1cbad8972628828b93a">Parameters</h4>
11839 <p class="paragraph" id="rpip35f43bf4c68861c86792" data-parent-id="rpipe7236962073cf7e62199" data-target-for="rpip35f43bf4c68861c86792">
11841 <table class="params" id="rpip6f1f75ed8022b592bda2">
11842 <tr id="rpipe1e7ed95b242acd42238">
11843 <td class="paramname" id="rpipd5c27f43a2d13b7ce17b">pool</td>
11844 <td id="rpipdb281de81e692f75beee">the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) </td>
11846 <tr id="rpip2fed52f7457662195e17">
11847 <td class="paramname" id="rpip3641a1b45e474bf79d91">ms</td>
11848 <td id="rpipe56483c6e7a4712b0f67">the delay (from now) in milliseconds when (after which) the callback should fire </td>
11850 <tr id="rpip92cae9ed5ba83a673480">
11851 <td class="paramname" id="rpip637b04b4487f7485410d">callback</td>
11852 <td id="rpip6642d292fb1de957341d">the callback function </td>
11854 <tr id="rpip76a491dd1ae342ac51da">
11855 <td class="paramname" id="rpip800759576ad7d3e5cc7b">user_data</td>
11856 <td id="rpip96dc13ed18b551c182ff">user data to pass to the callback function </td>
11858 <tr id="rpip5af62fd0029d43019e1b">
11859 <td class="paramname" id="rpipb81a5075b8189337f706">fire_if_past</td>
11860 <td id="rpip136c98eebdd4c1599541">if true, and the alarm time falls before or during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11866 <h4 class="label" id="rpipadada50b593d70fdd052" data-parent-id="rpip297066d2ba9129d01717" data-target-for="rpipadada50b593d70fdd052">Returns</h4>
11867 <p class="returns" id="rpip89882a38f7aa7b3e89a5" data-parent-id="rpip297066d2ba9129d01717" data-target-for="rpip89882a38f7aa7b3e89a5">>0 the alarm id </p>
11869 <p class="returns" id="rpipd55a960fa311e3a6bd05" data-parent-id="rpip297066d2ba9129d01717" data-target-for="rpipd55a960fa311e3a6bd05">
11870 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpipcf5e1889f456dda93b74">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11872 <p class="returns" id="rpip8e618cb5426c05c6d34c" data-parent-id="rpip297066d2ba9129d01717" data-target-for="rpip8e618cb5426c05c6d34c">
11873 -1 if there were no alarm slots available </p>
11877 <a id="ga0d00072e81de2d54fa690dc4b4bfe408" name="ga0d00072e81de2d54fa690dc4b4bfe408"></a>
11879 <div class="sect4">
11880 <h5 id="rpip3229b79fe96eedc18fa4">
11881 <a class="anchor" href="#rpip3229b79fe96eedc18fa4"></a>◆ alarm_pool_add_alarm_in_us()</h5>
11882 <div class="memitem" id="rpip1b71ba159eb24a0d6eed">
11883 <div class="memproto" id="rpip58fc3a7bed8be367f43d">
11884 <table class="mlabels" id="rpipfd075349bad776c5922f">
11885 <tr id="rpipa86b7c3fddba617eb894">
11886 <td class="mlabels-left" id="rpipe806c7501fdc8e55bf2a">
11887 <table class="memname" id="rpip2057d318f1a28cb227d9">
11888 <tr id="rpip8d742cef56ae9b352418">
11889 <td class="memname" id="rpipef71d88093bec238ea7c">static <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip77b9cd0023359d1059e1" data-adjusted="true">alarm_id_t</a> alarm_pool_add_alarm_in_us </td>
11890 <td id="rpip1069bb43ea3a5b561855">(</td>
11891 <td class="paramtype" id="rpip123ef4a57a761dedd186">
11892 <a class="el" href="structalarm__pool.html" id="rpip74203afcbefcb4950e2f">alarm_pool_t</a> *Â </td>
11893 <td class="paramname" id="rpip6a85a0c1cc20e40a113b">
11894 <em id="rpip6126e7415fce66cfa281">pool</em>, </td>
11896 <tr id="rpip7eea3a282ec712409abd">
11897 <td class="paramkey" id="rpipe5d522f17b8c5be0d7c2"></td>
11898 <td id="rpip0a052f90b57f66782e46"></td>
11899 <td class="paramtype" id="rpip9ff671795293cae327dd">uint64_t </td>
11900 <td class="paramname" id="rpip44a9da5af02934afcdb7">
11901 <em id="rpipa54c9983dbf2e00a5e24">us</em>, </td>
11903 <tr id="rpip13f4c2ee933aef72f948">
11904 <td class="paramkey" id="rpip213408778feddbae8f84"></td>
11905 <td id="rpip49a8efe3b55535be16f4"></td>
11906 <td class="paramtype" id="rpip9d1a86215a8dea286b38">
11907 <a class="el" href="#gade88ed45e9b59ad39d91f17c8709c16a" id="rpip6ba1b9ee4b354d42c2a3" data-adjusted="true">alarm_callback_t</a>Â </td>
11908 <td class="paramname" id="rpip756586f6541c83819c9f">
11909 <em id="rpip34ba4ed86fe063eac318">callback</em>, </td>
11911 <tr id="rpip21445814b0e76b77a7a5">
11912 <td class="paramkey" id="rpipedf27b741ff1d3df40fd"></td>
11913 <td id="rpip35b1efc943da858e8a7a"></td>
11914 <td class="paramtype" id="rpipbb938e3b456bef815a60">void *Â </td>
11915 <td class="paramname" id="rpip8cfbd3ef6db5ffdd3973">
11916 <em id="rpip201f17fd1911e0bf1daf">user_data</em>, </td>
11918 <tr id="rpipc12de553d95909ac0f98">
11919 <td class="paramkey" id="rpip5b8bc6b691c28c2036e7"></td>
11920 <td id="rpip89d1d9a57c4e4740dad8"></td>
11921 <td class="paramtype" id="rpip29105f2ac9e84469d9a2">bool </td>
11922 <td class="paramname" id="rpip0f2b35594a52cb7b40aa">
11923 <em id="rpip413886b5f50a65a53d36">fire_if_past</em>Â </td>
11925 <tr id="rpipff4a0db30e5e777c67fe">
11926 <td id="rpip4f441b70bd0c27b4c771"></td>
11927 <td id="rpip45fac47c77c029c38834">)</td>
11928 <td id="rpip87521e7fd00d88001a0d"></td>
11929 <td id="rpipe440bf65ad978c7598fa"></td>
11933 <td class="mlabels-right" id="rpipaee2f938fb724faca17c">
11934 <span class="mlabels" id="rpip3c0fc49104230043d2d3"><span class="mlabel" id="rpip63351022f80d44759a42">inline</span><span class="mlabel" id="rpipcc74e57b05ce85783d0b">static</span></span> </td>
11938 <div class="memdoc" id="rpip80f7768dab360241298c">
11940 <p id="rpipfdd1bff8a7e167c9fe0e">Add an alarm callback to be called after a delay specified in microseconds. </p>
11941 <p id="rpip4c6cbef93ef020a0f179">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
11942 <div class="admonitionblock note" id="rpip3450ccd3358a6cdd3a01" data-parent-id="rpip80f7768dab360241298c"><table>
11943 <tr data-target="true" data-target-for="rpip3450ccd3358a6cdd3a01">
11944 <td class="icon" id="rpipea7c0566abbc0c292376" data-parent-id="rpip3450ccd3358a6cdd3a01"><div class="title" data-target="true" data-target-for="rpipea7c0566abbc0c292376">Note</div></td>
11945 <td class="content" id="rpip608dd9809eacc2ebab33" data-parent-id="rpip3450ccd3358a6cdd3a01" data-target-for="rpip608dd9809eacc2ebab33">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
11948 <h4 id="rpipfa66d88e254e6d939689" data-parent-id="rpipbbbc5097f109529a5533" data-target-for="rpipfa66d88e254e6d939689">Parameters</h4>
11949 <p class="paragraph" id="rpip717f7ccbe48231a2276e" data-parent-id="rpipbbbc5097f109529a5533" data-target-for="rpip717f7ccbe48231a2276e">
11951 <table class="params" id="rpip6708f99abaf801f7c7a6">
11952 <tr id="rpip5542cb297d6f172d1b6c">
11953 <td class="paramname" id="rpip7be42a1664255036818b">pool</td>
11954 <td id="rpipf367e0c6687c9c40d720">the alarm pool to use for scheduling the callback (this determines which hardware alarm is used, and which core calls the callback) </td>
11956 <tr id="rpip5b38bfd30fb932fa0d51">
11957 <td class="paramname" id="rpip4247503075466c60c96e">us</td>
11958 <td id="rpipdb23c680bebed6eead44">the delay (from now) in microseconds when (after which) the callback should fire </td>
11960 <tr id="rpipca0821530986e26c2f2f">
11961 <td class="paramname" id="rpipcfe95ad05c6571b16b6b">callback</td>
11962 <td id="rpip2ca8ade7c3251880d72c">the callback function </td>
11964 <tr id="rpip3bfd8c572d605d9c33b1">
11965 <td class="paramname" id="rpipc848808aeca085c8b266">user_data</td>
11966 <td id="rpip58594491d7ef1553e2cf">user data to pass to the callback function </td>
11968 <tr id="rpip69e1e47afe301fb25d13">
11969 <td class="paramname" id="rpip542ce9f43a32f88b5b53">fire_if_past</td>
11970 <td id="rpip6153027700c081bd89e3">if true, and the alarm time falls during this call before the alarm can be set, then the callback should be called during (by) this function instead </td>
11976 <h4 class="label" id="rpip55e9a77974a777f707bc" data-parent-id="rpip43880e054638cc96c06c" data-target-for="rpip55e9a77974a777f707bc">Returns</h4>
11977 <p class="returns" id="rpipe86248fbe46a08f0dc30" data-parent-id="rpip43880e054638cc96c06c" data-target-for="rpipe86248fbe46a08f0dc30">>0 the alarm id </p>
11979 <p class="returns" id="rpip5c6e15b4d034a91c5d44" data-parent-id="rpip43880e054638cc96c06c" data-target-for="rpip5c6e15b4d034a91c5d44">
11980 0 if the alarm time passed before or during the call AND there is no active alarm to return the id of. The latter can either happen because fire_if_past was false (i.e. no timer was ever created), or if the callback <em id="rpip12b60756cdd8d61cb4a1">was</em> called during this method but the callback cancelled itself by returning 0 </p>
11982 <p class="returns" id="rpip7b8aaf631afe7ea2c5d6" data-parent-id="rpip43880e054638cc96c06c" data-target-for="rpip7b8aaf631afe7ea2c5d6">
11983 -1 if there were no alarm slots available </p>
11987 <a id="ga02cc23b4a3109fb8c2d57e24981f2932" name="ga02cc23b4a3109fb8c2d57e24981f2932"></a>
11989 <div class="sect4">
11990 <h5 id="rpip9f500dc0c7b8f777aa47">
11991 <a class="anchor" href="#rpip9f500dc0c7b8f777aa47"></a>◆ alarm_pool_cancel_alarm()</h5>
11992 <div class="memitem" id="rpip40c702c90fab0299f42e">
11993 <div class="memproto" id="rpipdb5743f560b55dfe6c7f">
11994 <table class="memname" id="rpip6f3672eb54c3bfb855eb">
11995 <tr id="rpip9855c75f67eefbd2f1cd">
11996 <td class="memname" id="rpip708eaf92c5045cfaaa43">bool alarm_pool_cancel_alarm </td>
11997 <td id="rpip2c5fe767cb39ace4dff5">(</td>
11998 <td class="paramtype" id="rpip50e3d7652e0493fd2fe3">
11999 <a class="el" href="structalarm__pool.html" id="rpip4cb0f5d8f23c1eaf5e27">alarm_pool_t</a> *Â </td>
12000 <td class="paramname" id="rpipbb5d4dae4d72be051380">
12001 <em id="rpipb1bc49b509dc8319dc63">pool</em>, </td>
12003 <tr id="rpip5a02ee2b93b10421504b">
12004 <td class="paramkey" id="rpip8b93ff3e06850cb5f224"></td>
12005 <td id="rpip9f35cf543ee08bc51af4"></td>
12006 <td class="paramtype" id="rpipb7596b5a3707300a2bfd">
12007 <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpip93842475d61cf0e57efd" data-adjusted="true">alarm_id_t</a>Â </td>
12008 <td class="paramname" id="rpip2f1f90284a4e3e822d05">
12009 <em id="rpip3715e82f35af0d2d1108">alarm_id</em>Â </td>
12011 <tr id="rpip818eb54a7b654b4e75ec">
12012 <td id="rpip7fc86fdc15b297e3c547"></td>
12013 <td id="rpip85a03d961eddffd6bc16">)</td>
12014 <td id="rpip993609b9a8129d4e5399"></td>
12015 <td id="rpipceaefb4f3dd30f2622e9"></td>
12019 <div class="memdoc" id="rpip992ac7bf787911149167">
12021 <p id="rpip6c28cf2fcb4c736562e5">Cancel an alarm. </p>
12022 <h4 id="rpip4d7d5a59c700d98f60de" data-parent-id="rpip68e16bee0792c836c8ff" data-target-for="rpip4d7d5a59c700d98f60de">Parameters</h4>
12023 <p class="paragraph" id="rpip49d7fb02fc2a24d21089" data-parent-id="rpip68e16bee0792c836c8ff" data-target-for="rpip49d7fb02fc2a24d21089">
12025 <table class="params" id="rpip4a4d59f600b22c30206a">
12026 <tr id="rpip9d49efecf8a6f800f97f">
12027 <td class="paramname" id="rpip8703ef38bc45de18550b">pool</td>
12028 <td id="rpipa10dd90cf820ab9ea5b3">the <a class="el" href="structalarm__pool.html" id="rpipa61a860ab47f252c8fb9">alarm_pool</a> containing the alarm </td>
12030 <tr id="rpip4f430f032e10e22a560a">
12031 <td class="paramname" id="rpipddc3a86117bc15922eef">alarm_id</td>
12032 <td id="rpip3300c9b821c839246af4">the alarm </td>
12038 <h4 class="label" id="rpipc12bb872d15c4cf20507" data-parent-id="rpipdee285383f210f26bf00" data-target-for="rpipc12bb872d15c4cf20507">Returns</h4>
12039 <p class="returns" id="rpip9a9e86e2406fbfaf14d7" data-parent-id="rpipdee285383f210f26bf00" data-target-for="rpip9a9e86e2406fbfaf14d7">true if the alarm was cancelled, false if it didn't exist </p>
12040 <p class="see" id="rpipcd33cf2d000aec464c86" data-parent-id="rpip992ac7bf787911149167" data-target-for="rpipcd33cf2d000aec464c86"><span class="label" id="rpip12c83b15f423be2018ef" data-parent-id="rpipcd33cf2d000aec464c86" data-target-for="rpip12c83b15f423be2018ef">See also</span><span class="target" id="rpip0e3012a88aa0619d2645" data-parent-id="rpipcd33cf2d000aec464c86" data-target-for="rpip0e3012a88aa0619d2645"><a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" title="The identifier for an alarm." id="rpipb71f64094b4725c48dd3" data-adjusted="true">alarm_id_t</a> for a note on reuse of IDs </span></p>
12046 <a id="ga4918e03a3ddd5c328d65bd014d26856b" name="ga4918e03a3ddd5c328d65bd014d26856b"></a>
12048 <div class="sect4">
12049 <h5 id="rpipf31181baac4b77bbd089">
12050 <a class="anchor" href="#rpipf31181baac4b77bbd089"></a>◆ alarm_pool_core_num()</h5>
12051 <div class="memitem" id="rpip252871d5c891d22c575d">
12052 <div class="memproto" id="rpip3b1e9f7167878f474fb4">
12053 <table class="memname" id="rpip5ec5a464f9fede9f9e33">
12054 <tr id="rpipc86f9f553e42feca77e2">
12055 <td class="memname" id="rpip1b07fd4f5956eee0753b">uint alarm_pool_core_num </td>
12056 <td id="rpip2866fa4f856148d5b81c">(</td>
12057 <td class="paramtype" id="rpipdfc87d87273baaea5754">
12058 <a class="el" href="structalarm__pool.html" id="rpip1b0555c3e81fff09b1dd">alarm_pool_t</a> *Â </td>
12059 <td class="paramname" id="rpipf693511638fa0187ce37"><em id="rpip3ad2355c47ecf804f448">pool</em></td>
12060 <td id="rpipebc99b1fddb60d2f3d8b">)</td>
12061 <td id="rpip974f13b2a5912326a87b"></td>
12065 <div class="memdoc" id="rpip02fadae9ce6d453ffffc">
12067 <p id="rpip3bdc421974a4c6c94fa0">Return the core number the alarm pool was initialized on (and hence callbacks are called on) </p>
12068 <h4 id="rpip13bebc3890429e283dc1" data-parent-id="rpip7f488d9403d389b160e6" data-target-for="rpip13bebc3890429e283dc1">Parameters</h4>
12069 <p class="paragraph" id="rpipac128135171c32d97f5c" data-parent-id="rpip7f488d9403d389b160e6" data-target-for="rpipac128135171c32d97f5c">
12071 <table class="params" id="rpip658372231ebea35ff07c">
12072 <tr id="rpipeb83106a035c00b699fa">
12073 <td class="paramname" id="rpipb0d182182aeb933e5faa">pool</td>
12074 <td id="rpipc498b211c58c85c87da0">the pool </td>
12080 <h4 class="label" id="rpip45121dd47f88e24ac9f6" data-parent-id="rpip22a8def6e22947c5e00f" data-target-for="rpip45121dd47f88e24ac9f6">Returns</h4>
12081 <p class="returns" id="rpip20c13403f763a2b75b51" data-parent-id="rpip22a8def6e22947c5e00f" data-target-for="rpip20c13403f763a2b75b51">the core used by the pool </p>
12085 <a id="ga1c0e0970bd838e2319ee73eba7ff3b71" name="ga1c0e0970bd838e2319ee73eba7ff3b71"></a>
12087 <div class="sect4">
12088 <h5 id="rpipa538ebd2fcbbd2d9eba5">
12089 <a class="anchor" href="#rpipa538ebd2fcbbd2d9eba5"></a>◆ alarm_pool_create()</h5>
12090 <div class="memitem" id="rpip65f69a77184f4babcc2d">
12091 <div class="memproto" id="rpip9fc9753de1578848113d">
12092 <table class="memname" id="rpipfd8d4f98745dd7335bf3">
12093 <tr id="rpip501a1e56cf5b65d10449">
12094 <td class="memname" id="rpip4427cb648c995f1f001b">
12095 <a class="el" href="structalarm__pool.html" id="rpipd3f6ca4bfe866571227b">alarm_pool_t</a> * alarm_pool_create </td>
12096 <td id="rpipd57817212d53f4cac63d">(</td>
12097 <td class="paramtype" id="rpip18f47dc809f7ac27ceea">uint </td>
12098 <td class="paramname" id="rpip3219792cee58e73f139d">
12099 <em id="rpip1feea5cf37e80fd75733">hardware_alarm_num</em>, </td>
12101 <tr id="rpip213af3fc9c965aed637f">
12102 <td class="paramkey" id="rpip9452fe89d47053ed6296"></td>
12103 <td id="rpip57f437e75c2f2eb60fc8"></td>
12104 <td class="paramtype" id="rpipd77af20f83ce7a1d2851">uint </td>
12105 <td class="paramname" id="rpip9ec5284c95f875c6459d">
12106 <em id="rpip3b32e7a08b88b093ceff">max_timers</em>Â </td>
12108 <tr id="rpipb40e66cefc8bea60aa8c">
12109 <td id="rpip0c85b715347f5fdb6648"></td>
12110 <td id="rpip8ed5a8de78becf8d1dcd">)</td>
12111 <td id="rpip20b435b044c9a8d9c446"></td>
12112 <td id="rpipa19ad57ff23881940b86"></td>
12116 <div class="memdoc" id="rpip923baddc039c78120734">
12118 <p id="rpipaa0067619d4c51ec8a7c">Create an alarm pool. </p>
12119 <p id="rpipde8bd695e1dd378fbb82">The alarm pool will call callbacks from an alarm IRQ Handler on the core of this function is called from.</p>
12120 <p id="rpipb6520f82da3028a8b4d2">In many situations there is never any need for anything other than the default alarm pool, however you might want to create another if you want alarm callbacks on core 1 or require alarm pools of different priority (IRQ priority based preemption of callbacks)</p>
12121 <div class="admonitionblock note" id="rpip4139dce5280594413d5a" data-parent-id="rpip923baddc039c78120734"><table>
12122 <tr data-target="true" data-target-for="rpip4139dce5280594413d5a">
12123 <td class="icon" id="rpip04490c6bb11bb9760763" data-parent-id="rpip4139dce5280594413d5a"><div class="title" data-target="true" data-target-for="rpip04490c6bb11bb9760763">Note</div></td>
12124 <td class="content" id="rpip25217d988bd36ca92d51" data-parent-id="rpip4139dce5280594413d5a" data-target-for="rpip25217d988bd36ca92d51">This method will hard assert if the hardware alarm is already claimed.</td>
12127 <h4 id="rpip870f8549ff28fdf402a2" data-parent-id="rpip4d57a5844989012b9803" data-target-for="rpip870f8549ff28fdf402a2">Parameters</h4>
12128 <p class="paragraph" id="rpip8ab77531cab10c26fabe" data-parent-id="rpip4d57a5844989012b9803" data-target-for="rpip8ab77531cab10c26fabe">
12130 <table class="params" id="rpip83d88f67976d09db8b8e">
12131 <tr id="rpipab23f48f6fc5b71f364c">
12132 <td class="paramname" id="rpip13ce232a51308192f5ca">hardware_alarm_num</td>
12133 <td id="rpip02b01630daf9fee6ecce">the hardware alarm to use to back this pool </td>
12135 <tr id="rpip3d59b5429434086ecf8b">
12136 <td class="paramname" id="rpipab55fccb9c2e27923902">max_timers</td>
12137 <td id="rpip2003573a950f150582b8">the maximum number of timers </td>
12143 <div class="admonitionblock note" id="rpip2c68973533a102db0924" data-parent-id="rpip923baddc039c78120734"><table>
12144 <tr data-target="true" data-target-for="rpip2c68973533a102db0924">
12145 <td class="icon" id="rpip4d5d99d187509bee9af4" data-parent-id="rpip2c68973533a102db0924"><div class="title" data-target="true" data-target-for="rpip4d5d99d187509bee9af4">Note</div></td>
12146 <td class="content" id="rpip279d6f6c1947883c1d12" data-parent-id="rpip2c68973533a102db0924" data-target-for="rpip279d6f6c1947883c1d12">For implementation reasons this is limited to PICO_PHEAP_MAX_ENTRIES which defaults to 255 </td>
12149 <p class="see" id="rpip1fa3d619c01a00d5a160" data-parent-id="rpip923baddc039c78120734" data-target-for="rpip1fa3d619c01a00d5a160"><span class="label" id="rpip6ba4a853b153f9de456d" data-parent-id="rpip1fa3d619c01a00d5a160" data-target-for="rpip6ba4a853b153f9de456d">See also</span><span class="target" id="rpip9157ceb406a70b03dcc2" data-parent-id="rpip1fa3d619c01a00d5a160" data-target-for="rpip9157ceb406a70b03dcc2"><a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" title="The default alarm pool used when alarms are added without specifying an alarm pool,..." id="rpip733e80f582f05e332cd3" data-adjusted="true">alarm_pool_get_default()</a> </span>
12151 <span class="target" id="rpipd4e9941bab26bd9d2f7d" data-parent-id="rpip1fa3d619c01a00d5a160" data-target-for="rpipd4e9941bab26bd9d2f7d">
12152 hardware_claiming </span></p>
12158 <a id="ga6eeda3248dca1d0d26e92206faceb23e" name="ga6eeda3248dca1d0d26e92206faceb23e"></a>
12160 <div class="sect4">
12161 <h5 id="rpipcc09880036898a9faa8e">
12162 <a class="anchor" href="#rpipcc09880036898a9faa8e"></a>◆ alarm_pool_create_with_unused_hardware_alarm()</h5>
12163 <div class="memitem" id="rpip433756b17da18d58b30c">
12164 <div class="memproto" id="rpip61f2f3ddc229136f2c29">
12165 <table class="memname" id="rpipf1054908d130102a95eb">
12166 <tr id="rpipec05491a25057c9c800c">
12167 <td class="memname" id="rpipe71870b8ced6676a3cdb">
12168 <a class="el" href="structalarm__pool.html" id="rpip33d060c40294fb92819d">alarm_pool_t</a> * alarm_pool_create_with_unused_hardware_alarm </td>
12169 <td id="rpipbcc50cc9d86d86f7c53c">(</td>
12170 <td class="paramtype" id="rpipfabfc031370f2352ffc5">uint </td>
12171 <td class="paramname" id="rpip89267743ae5368090950"><em id="rpip3390cd1deeaa9365003b">max_timers</em></td>
12172 <td id="rpip9b9ec6da365495111507">)</td>
12173 <td id="rpip24d1c958f3c984c4b97f"></td>
12177 <div class="memdoc" id="rpipb94dc699c446a47c7d7b">
12179 <p id="rpip831a681a10772abfe4da">Create an alarm pool, claiming an used hardware alarm to back it. </p>
12180 <p id="rpipe3c089438bbac1cdbc7e">The alarm pool will call callbacks from an alarm IRQ Handler on the core of this function is called from.</p>
12181 <p id="rpipbfd9ef51f090a91e92d2">In many situations there is never any need for anything other than the default alarm pool, however you might want to create another if you want alarm callbacks on core 1 or require alarm pools of different priority (IRQ priority based preemption of callbacks)</p>
12182 <div class="admonitionblock note" id="rpipea5d31df52875d305fa8" data-parent-id="rpipb94dc699c446a47c7d7b"><table>
12183 <tr data-target="true" data-target-for="rpipea5d31df52875d305fa8">
12184 <td class="icon" id="rpip8bf3f343b5555bd83d1f" data-parent-id="rpipea5d31df52875d305fa8"><div class="title" data-target="true" data-target-for="rpip8bf3f343b5555bd83d1f">Note</div></td>
12185 <td class="content" id="rpipa2fbacd2bd7023397818" data-parent-id="rpipea5d31df52875d305fa8" data-target-for="rpipa2fbacd2bd7023397818">This method will hard assert if the there is no free hardware to claim.</td>
12188 <h4 id="rpip5c110bf0ca3e5ca612e4" data-parent-id="rpip45202db4fd33ec336633" data-target-for="rpip5c110bf0ca3e5ca612e4">Parameters</h4>
12189 <p class="paragraph" id="rpipbd7b2d94e8826ee3e026" data-parent-id="rpip45202db4fd33ec336633" data-target-for="rpipbd7b2d94e8826ee3e026">
12191 <table class="params" id="rpipe4100a536ae48f63294e">
12192 <tr id="rpip7c5b65ad377532f24bbf">
12193 <td class="paramname" id="rpip1a3a9aa4a61073974fd5">max_timers</td>
12194 <td id="rpipb913e208d730cb0db06e">the maximum number of timers </td>
12200 <div class="admonitionblock note" id="rpip38e95145d71252fdc291" data-parent-id="rpipb94dc699c446a47c7d7b"><table>
12201 <tr data-target="true" data-target-for="rpip38e95145d71252fdc291">
12202 <td class="icon" id="rpip2f784e659d8dbb34e5de" data-parent-id="rpip38e95145d71252fdc291"><div class="title" data-target="true" data-target-for="rpip2f784e659d8dbb34e5de">Note</div></td>
12203 <td class="content" id="rpip9162aea7f0c760fa8137" data-parent-id="rpip38e95145d71252fdc291" data-target-for="rpip9162aea7f0c760fa8137">For implementation reasons this is limited to PICO_PHEAP_MAX_ENTRIES which defaults to 255 </td>
12206 <p class="see" id="rpipbf853c61b9b96dbbccea" data-parent-id="rpipb94dc699c446a47c7d7b" data-target-for="rpipbf853c61b9b96dbbccea"><span class="label" id="rpip6827ebe51a1356559a60" data-parent-id="rpipbf853c61b9b96dbbccea" data-target-for="rpip6827ebe51a1356559a60">See also</span><span class="target" id="rpipc506e2f6ac42462c71af" data-parent-id="rpipbf853c61b9b96dbbccea" data-target-for="rpipc506e2f6ac42462c71af"><a class="el" href="#ga5092ceb879289c0a597a389f34b4815e" title="The default alarm pool used when alarms are added without specifying an alarm pool,..." id="rpip69473adee933de5307b0" data-adjusted="true">alarm_pool_get_default()</a> </span>
12208 <span class="target" id="rpip2c67bedb2468ec1c1d68" data-parent-id="rpipbf853c61b9b96dbbccea" data-target-for="rpip2c67bedb2468ec1c1d68">
12209 hardware_claiming </span></p>
12215 <a id="gae7536c4d34088a2d19b2da92b87cbb4e" name="gae7536c4d34088a2d19b2da92b87cbb4e"></a>
12217 <div class="sect4">
12218 <h5 id="rpipf118372589329fba3cb8">
12219 <a class="anchor" href="#rpipf118372589329fba3cb8"></a>◆ alarm_pool_destroy()</h5>
12220 <div class="memitem" id="rpipa429ee67bb5395a7bdde">
12221 <div class="memproto" id="rpipd307f9d40c0d0df6805b">
12222 <table class="memname" id="rpipc491a4fc14b9408535c1">
12223 <tr id="rpip120a47d67a3a376dcfbe">
12224 <td class="memname" id="rpip5b773d770db2f3c952e2">void alarm_pool_destroy </td>
12225 <td id="rpipb2429d70b8a08784201b">(</td>
12226 <td class="paramtype" id="rpip38f45fe4cfcf41cbc091">
12227 <a class="el" href="structalarm__pool.html" id="rpip0190f540ed1374ae7f69">alarm_pool_t</a> *Â </td>
12228 <td class="paramname" id="rpip048bbcbae73af9331a34"><em id="rpip907464906d37c07319b9">pool</em></td>
12229 <td id="rpip316c50bd53ebaffdaac8">)</td>
12230 <td id="rpipf379210c86cf1f2c6e79"></td>
12234 <div class="memdoc" id="rpip93f03619a8b61557a447">
12236 <p id="rpip71cc586dc346b4456d7b">Destroy the alarm pool, cancelling all alarms and freeing up the underlying hardware alarm. </p>
12237 <h4 id="rpipfd740a46e7a9a1f58542" data-parent-id="rpip8772683327d8103632a2" data-target-for="rpipfd740a46e7a9a1f58542">Parameters</h4>
12238 <p class="paragraph" id="rpip6de6eb1219499599c480" data-parent-id="rpip8772683327d8103632a2" data-target-for="rpip6de6eb1219499599c480">
12240 <table class="params" id="rpip036e260e45baf3a0f2d4">
12241 <tr id="rpip7d1ac56a1553bd567e93">
12242 <td class="paramname" id="rpipcda3e9d680322ebc6171">pool</td>
12243 <td id="rpip7eb1a6bf2111edc3324a">the pool </td>
12252 <a id="ga5092ceb879289c0a597a389f34b4815e" name="ga5092ceb879289c0a597a389f34b4815e"></a>
12254 <div class="sect4">
12255 <h5 id="rpip0805b6a263b86ad3163b">
12256 <a class="anchor" href="#rpip0805b6a263b86ad3163b"></a>◆ alarm_pool_get_default()</h5>
12257 <div class="memitem" id="rpipdb86b1a47773d74ac9dc">
12258 <div class="memproto" id="rpip5ecce878e43f04a29438">
12259 <table class="memname" id="rpipa24135123e5d38868c58">
12260 <tr id="rpipbd600997145a6522245c">
12261 <td class="memname" id="rpipf3beff12ed7c1bb52e9c">
12262 <a class="el" href="structalarm__pool.html" id="rpipa8df51293d5824357fb1">alarm_pool_t</a> * alarm_pool_get_default </td>
12263 <td id="rpipc328b1b73559e7d4699e">(</td>
12264 <td class="paramtype" id="rpip69900ba837cbe1d45d1b">void </td>
12265 <td class="paramname" id="rpipa2850be363c1b3d36ccc"></td>
12266 <td id="rpipe9dabebeff14bae33afd">)</td>
12267 <td id="rpip9c9be9cfe2bcbc62e743"></td>
12271 <div class="memdoc" id="rpip20ff5f2b5192764440dc">
12273 <p id="rpip2f52ccfcce9c2fa4175b">The default alarm pool used when alarms are added without specifying an alarm pool, and also used by the SDK to support lower power sleeps and timeouts. </p>
12274 <p class="see" id="rpip9c341c10f4367816834e" data-parent-id="rpip20ff5f2b5192764440dc" data-target-for="rpip9c341c10f4367816834e"><span class="label" id="rpipbfab04b6e31470f0b3b5" data-parent-id="rpip9c341c10f4367816834e" data-target-for="rpipbfab04b6e31470f0b3b5">See also</span><span class="target" id="rpipe1296b2e38159e8bbe19" data-parent-id="rpip9c341c10f4367816834e" data-target-for="rpipe1296b2e38159e8bbe19"><a class="el" href="#ga40b4a03bf9e967d4e7170d20c5c9fb15" title="Selects which hardware alarm is used for the default alarm pool." id="rpipefc0e46a414ef7e95786" data-adjusted="true">PICO_TIME_DEFAULT_ALARM_POOL_HARDWARE_ALARM_NUM</a> </span></p>
12280 <a id="ga2dc626c1e534842c85c3902d212f7eef" name="ga2dc626c1e534842c85c3902d212f7eef"></a>
12282 <div class="sect4">
12283 <h5 id="rpipa25df9db15f7dd693684">
12284 <a class="anchor" href="#rpipa25df9db15f7dd693684"></a>◆ alarm_pool_hardware_alarm_num()</h5>
12285 <div class="memitem" id="rpip5701427e05803825c312">
12286 <div class="memproto" id="rpip39a49b06d5dc47ce7285">
12287 <table class="memname" id="rpip3ba9cb71715c8ac891fd">
12288 <tr id="rpip0a80d77d5142c2f4d601">
12289 <td class="memname" id="rpipc49129f657481ba4ccb3">uint alarm_pool_hardware_alarm_num </td>
12290 <td id="rpipb60c53a44e1559024ee8">(</td>
12291 <td class="paramtype" id="rpipca30116cb8c86a6f20ce">
12292 <a class="el" href="structalarm__pool.html" id="rpip5df82ca99e465a4a5fd5">alarm_pool_t</a> *Â </td>
12293 <td class="paramname" id="rpip5d5f99236de64edcc079"><em id="rpip570a6b620d19de7bda42">pool</em></td>
12294 <td id="rpipc6661ea6fc784bbe9c6d">)</td>
12295 <td id="rpip6d2c0391003fa83a9857"></td>
12299 <div class="memdoc" id="rpip3c9c70080acde081e13f">
12301 <p id="rpip38ffb70fb8aa14c15d7f">Return the hardware alarm used by an alarm pool. </p>
12302 <h4 id="rpip7100977067a4b7aefadb" data-parent-id="rpip25668dbe91ea8959ef47" data-target-for="rpip7100977067a4b7aefadb">Parameters</h4>
12303 <p class="paragraph" id="rpip4f882585210b1446514f" data-parent-id="rpip25668dbe91ea8959ef47" data-target-for="rpip4f882585210b1446514f">
12305 <table class="params" id="rpip4835271722d32846c934">
12306 <tr id="rpip1540fa1323b62757e9be">
12307 <td class="paramname" id="rpip10ecc76f0cf7da44dd16">pool</td>
12308 <td id="rpip692c205951a8def28630">the pool </td>
12314 <h4 class="label" id="rpip405c01f56aef31189417" data-parent-id="rpipb5356f457b93b9053eb6" data-target-for="rpip405c01f56aef31189417">Returns</h4>
12315 <p class="returns" id="rpip8cd8c6dd64c0c3f8d75f" data-parent-id="rpipb5356f457b93b9053eb6" data-target-for="rpip8cd8c6dd64c0c3f8d75f">the hardware alarm used by the pool </p>
12319 <a id="gae99f63dc25fe5c3a0d78d9fb90308b1b" name="gae99f63dc25fe5c3a0d78d9fb90308b1b"></a>
12321 <div class="sect4">
12322 <h5 id="rpipaee7e8bb1edd3194cd3b">
12323 <a class="anchor" href="#rpipaee7e8bb1edd3194cd3b"></a>◆ cancel_alarm()</h5>
12324 <div class="memitem" id="rpip3c73966931e75b87f742">
12325 <div class="memproto" id="rpipca587da43b8b616cacc9">
12326 <table class="mlabels" id="rpip4f0cd82a8f3393be213b">
12327 <tr id="rpipe83e385fdedf1f0b6d83">
12328 <td class="mlabels-left" id="rpip6777d5c0b23da84327cc">
12329 <table class="memname" id="rpipe8f234c8e79d72c04ca7">
12330 <tr id="rpip5d7865db4048bd82c050">
12331 <td class="memname" id="rpipfad26fe4406a21f39a7b">static bool cancel_alarm </td>
12332 <td id="rpipf4afe2e35a2b80928a76">(</td>
12333 <td class="paramtype" id="rpip5d07bbd8d6f9183f9340">
12334 <a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" id="rpipa272e2886e99744bc689" data-adjusted="true">alarm_id_t</a>Â </td>
12335 <td class="paramname" id="rpip37f530c73848c82521aa"><em id="rpipae88df7a3b0715a72376">alarm_id</em></td>
12336 <td id="rpip8f4c76e20db4e7c70e86">)</td>
12337 <td id="rpip445e88ea661037a1ee72"></td>
12341 <td class="mlabels-right" id="rpipcab0f13f80afd51cc231">
12342 <span class="mlabels" id="rpip3fc87a0660d83455f789"><span class="mlabel" id="rpip5b78b0064abcc3adb4e2">inline</span><span class="mlabel" id="rpip60907bbe438f9c10e87d">static</span></span> </td>
12346 <div class="memdoc" id="rpip386fdfcaf00f33598824">
12348 <p id="rpipbe451dfc8651d0f40465">Cancel an alarm from the default alarm pool. </p>
12349 <h4 id="rpip8316d86f8b7a62ebbdce" data-parent-id="rpip73ab40da31eefe5c48e9" data-target-for="rpip8316d86f8b7a62ebbdce">Parameters</h4>
12350 <p class="paragraph" id="rpip2484da3bf0e88c8025ed" data-parent-id="rpip73ab40da31eefe5c48e9" data-target-for="rpip2484da3bf0e88c8025ed">
12352 <table class="params" id="rpipe55f0d9520b194ba63bd">
12353 <tr id="rpipbde8bf24ce5bb406e688">
12354 <td class="paramname" id="rpip02949be442ccc3c146b0">alarm_id</td>
12355 <td id="rpipc84d950108aa884cd495">the alarm </td>
12361 <h4 class="label" id="rpip7cdee8514ca6e9cce42c" data-parent-id="rpip22c76c45da13e2d18312" data-target-for="rpip7cdee8514ca6e9cce42c">Returns</h4>
12362 <p class="returns" id="rpipe49008f1d9e843041963" data-parent-id="rpip22c76c45da13e2d18312" data-target-for="rpipe49008f1d9e843041963">true if the alarm was cancelled, false if it didn't exist </p>
12363 <p class="see" id="rpip0b04def46d52172c56e6" data-parent-id="rpip386fdfcaf00f33598824" data-target-for="rpip0b04def46d52172c56e6"><span class="label" id="rpipd3db272d88061a2c7d58" data-parent-id="rpip0b04def46d52172c56e6" data-target-for="rpipd3db272d88061a2c7d58">See also</span><span class="target" id="rpipa9117aa8d2a0942c2e40" data-parent-id="rpip0b04def46d52172c56e6" data-target-for="rpipa9117aa8d2a0942c2e40"><a class="el" href="#gaa593548569c182a0d65d2e06a9c3493b" title="The identifier for an alarm." id="rpip0c61645e2484d6afae42" data-adjusted="true">alarm_id_t</a> for a note on reuse of IDs </span></p>
12372 <div class="sect2">
12373 <h3 id="repeating_timer">
12374 <a class="anchor" href="#repeating_timer"></a>repeating_timer</h3>
12375 <div class="ingroups" id="rpipfd1ba9d067f70acd617e">Part of: <a class="el" href="high_level.html" id="rpipd1020a63b65f27c7f6f3">High Level APIs</a> » <a class="el" href="high_level.html#pico_time" id="rpipfa337176b38484e5d936">pico_time</a>
12377 <p id="rpip9205a8104ffed45139e4">Repeating Timer functions for simple scheduling of repeated execution.
12378 <a href="#ga2f3317a1fdbd635c97b1" id="rpip907c48819d804c7de642" data-adjusted="true">More...</a></p>
12379 <div class="sect3">
12380 <h4 id="rpipef29dbf955628da57575">
12381 <a class="anchor" href="#rpipef29dbf955628da57575"></a>Data Structures</h4>
12382 <ul class="memberdecls" id="rpip60e99a5dcdc5ac611fb2" data-parent-id="rpipa26ec6737bdcaa637322">
12383 <li class="memitem">
12384 <p data-target="true" data-target-for="rpip60e99a5dcdc5ac611fb2"><span class="memItemLeft" data-target="true" id="rpipe7915d5874f4b12c4cb0" data-parent-id="rpip60e99a5dcdc5ac611fb2" data-target-for="rpipe7915d5874f4b12c4cb0">struct  </span><span class="memItemRight" data-target="true" id="rpip7bb1cdd008dd2b5e9ca1" data-parent-id="rpip60e99a5dcdc5ac611fb2" data-target-for="rpip7bb1cdd008dd2b5e9ca1"><a class="el" href="structrepeating__timer.html" id="rpip98b3f5462dc250e84fa3">repeating_timer</a></span></p>
12386 <li class="memdesc">
12387 <p data-target="true" data-target-for="rpip63a9c83778e502c06c82"><span class="mdescLeft" data-target="true" id="rpip36c7ec99233f0729201d" data-parent-id="rpip63a9c83778e502c06c82" data-target-for="rpip36c7ec99233f0729201d">Â </span><span class="mdescRight" data-target="true" id="rpip3f3999209ce992e4a4c8" data-parent-id="rpip63a9c83778e502c06c82" data-target-for="rpip3f3999209ce992e4a4c8">Information about a repeating timer. <a href="structrepeating__timer.html#details" id="rpipa06d207ecf32868035fc" data-adjusted="true">More...</a><br id="rpip0a6e00538a6f2a4d6008"></span></p>
12391 <div class="sect3">
12392 <h4 id="rpipb105bada171e99b3dd87">
12393 <a class="anchor" href="#rpipb105bada171e99b3dd87"></a>Typedefs</h4>
12394 <ul class="memberdecls" id="rpip72a8322f29eeed7f5117" data-parent-id="rpip6b6c97e3f1eb78fa4588">
12395 <li class="memitem">
12396 <p data-target="true" data-target-for="rpip72a8322f29eeed7f5117"><span class="memItemLeft" data-target="true" id="rpip403197d553cb7f4146bf" data-parent-id="rpip72a8322f29eeed7f5117" data-target-for="rpip403197d553cb7f4146bf">typedef bool(*Â </span><span class="memItemRight" data-target="true" id="rpip0f33b3a74dabe5229c73" data-parent-id="rpip72a8322f29eeed7f5117" data-target-for="rpip0f33b3a74dabe5229c73"><a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip0963def43f86f58b5c1b" data-adjusted="true">repeating_timer_callback_t</a>) (<a class="el" href="structrepeating__timer.html" id="rpipf7480be0f22d5b9e5b45">repeating_timer_t</a> *rt)</span></p>
12398 <li class="memdesc">
12399 <p data-target="true" data-target-for="rpipfcbf250c713029c656d4"><span class="mdescLeft" data-target="true" id="rpipc58b32a89800e7c12bf9" data-parent-id="rpipfcbf250c713029c656d4" data-target-for="rpipc58b32a89800e7c12bf9">Â </span><span class="mdescRight" data-target="true" id="rpip6cc67147440bac670464" data-parent-id="rpipfcbf250c713029c656d4" data-target-for="rpip6cc67147440bac670464">Callback for a repeating timer. <br id="rpipecf024757bd3072ebb57"></span></p>
12403 <div class="sect3">
12404 <h4 id="rpip03ea3a0fdc5c8c810e29">
12405 <a class="anchor" href="#rpip03ea3a0fdc5c8c810e29"></a>Functions</h4>
12406 <ul class="memberdecls" id="rpipc2a2322588537f315b60" data-parent-id="rpip83893960938d5e52fcd0">
12407 <li class="memitem">
12408 <p data-target="true" data-target-for="rpipc2a2322588537f315b60"><span class="memItemLeft" data-target="true" id="rpip65954f490ece8719422d" data-parent-id="rpipc2a2322588537f315b60" data-target-for="rpip65954f490ece8719422d">bool </span><span class="memItemRight" data-target="true" id="rpip50726aa566cc7c32cb80" data-parent-id="rpipc2a2322588537f315b60" data-target-for="rpip50726aa566cc7c32cb80"><a class="el" href="#ga75dad2018ae1e4c154fb17cd96db9872" id="rpipfc1178950fe93d4a7d2c" data-adjusted="true">alarm_pool_add_repeating_timer_us</a> (<a class="el" href="structalarm__pool.html" id="rpipaffd22e413ae3183adc6">alarm_pool_t</a> *pool, int64_t delay_us, <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip108bcd1e07cd1d6ea135" data-adjusted="true">repeating_timer_callback_t</a> callback, void *user_data, <a class="el" href="structrepeating__timer.html" id="rpip8b4fd0fef08a4311e924">repeating_timer_t</a> *out)</span></p>
12410 <li class="memdesc">
12411 <p data-target="true" data-target-for="rpip551c9991a4382675f8d0"><span class="mdescLeft" data-target="true" id="rpip9d6271e1de2bd17a94f5" data-parent-id="rpip551c9991a4382675f8d0" data-target-for="rpip9d6271e1de2bd17a94f5">Â </span><span class="mdescRight" data-target="true" id="rpip728981d705dd1a73d75f" data-parent-id="rpip551c9991a4382675f8d0" data-target-for="rpip728981d705dd1a73d75f">Add a repeating timer that is called repeatedly at the specified interval in microseconds. <br id="rpip3627b05c5fd8db98a9a6"></span></p>
12413 <li class="memitem">
12414 <p data-target="true" data-target-for="rpip76de506082cfd795987a"><span class="memItemLeft" data-target="true" id="rpip8be98c3eb88d306034f2" data-parent-id="rpip76de506082cfd795987a" data-target-for="rpip8be98c3eb88d306034f2">static bool </span><span class="memItemRight" data-target="true" id="rpip4fe079e109d82bd06d03" data-parent-id="rpip76de506082cfd795987a" data-target-for="rpip4fe079e109d82bd06d03"><a class="el" href="#gae5a6b07212ea5e106a81fc2f814a9e9e" id="rpip3b452e85e80e3a8d2e79" data-adjusted="true">alarm_pool_add_repeating_timer_ms</a> (<a class="el" href="structalarm__pool.html" id="rpipd4207937d2cde9fd73a7">alarm_pool_t</a> *pool, int32_t delay_ms, <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpipbf20ac2b7cc551f96643" data-adjusted="true">repeating_timer_callback_t</a> callback, void *user_data, <a class="el" href="structrepeating__timer.html" id="rpipb6a11c6dfa2c33451c6d">repeating_timer_t</a> *out)</span></p>
12416 <li class="memdesc">
12417 <p data-target="true" data-target-for="rpip041fea4ec57617dc75f6"><span class="mdescLeft" data-target="true" id="rpip907230600e083ab4f9b7" data-parent-id="rpip041fea4ec57617dc75f6" data-target-for="rpip907230600e083ab4f9b7">Â </span><span class="mdescRight" data-target="true" id="rpipf16675df5bbda5e2757d" data-parent-id="rpip041fea4ec57617dc75f6" data-target-for="rpipf16675df5bbda5e2757d">Add a repeating timer that is called repeatedly at the specified interval in milliseconds. <br id="rpip2347ca59760e2b9dc38d"></span></p>
12419 <li class="memitem">
12420 <p data-target="true" data-target-for="rpipabae9cd8ed33bd58f443"><span class="memItemLeft" data-target="true" id="rpip81dda39dc2ec02d9b500" data-parent-id="rpipabae9cd8ed33bd58f443" data-target-for="rpip81dda39dc2ec02d9b500">static bool </span><span class="memItemRight" data-target="true" id="rpip37e254fc3493f2df5824" data-parent-id="rpipabae9cd8ed33bd58f443" data-target-for="rpip37e254fc3493f2df5824"><a class="el" href="#ga8da55f26158144c2a9a813f69a524906" id="rpipbc1cfe5462605a715f5a" data-adjusted="true">add_repeating_timer_us</a> (int64_t delay_us, <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip5d4484a2b546c33dab64" data-adjusted="true">repeating_timer_callback_t</a> callback, void *user_data, <a class="el" href="structrepeating__timer.html" id="rpip079f6a055bbb0acb17ea">repeating_timer_t</a> *out)</span></p>
12422 <li class="memdesc">
12423 <p data-target="true" data-target-for="rpipd86981cc482d2541d392"><span class="mdescLeft" data-target="true" id="rpipc3a917af1e6d3bcf722b" data-parent-id="rpipd86981cc482d2541d392" data-target-for="rpipc3a917af1e6d3bcf722b">Â </span><span class="mdescRight" data-target="true" id="rpipb903c2ae844517fec457" data-parent-id="rpipd86981cc482d2541d392" data-target-for="rpipb903c2ae844517fec457">Add a repeating timer that is called repeatedly at the specified interval in microseconds. <br id="rpip480668a8ec5d5b357409"></span></p>
12425 <li class="memitem">
12426 <p data-target="true" data-target-for="rpip3356aeb47b521de908e7"><span class="memItemLeft" data-target="true" id="rpipddd46a1db1136e80c8f9" data-parent-id="rpip3356aeb47b521de908e7" data-target-for="rpipddd46a1db1136e80c8f9">static bool </span><span class="memItemRight" data-target="true" id="rpipe3dcbb423c987bdd8261" data-parent-id="rpip3356aeb47b521de908e7" data-target-for="rpipe3dcbb423c987bdd8261"><a class="el" href="#ga02133dbe7083fcf3c7392a2cfb8243ba" id="rpip78987a414a53751141fd" data-adjusted="true">add_repeating_timer_ms</a> (int32_t delay_ms, <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip90455ac41bb1a69b0d3b" data-adjusted="true">repeating_timer_callback_t</a> callback, void *user_data, <a class="el" href="structrepeating__timer.html" id="rpipa11517f170b20698aafe">repeating_timer_t</a> *out)</span></p>
12428 <li class="memdesc">
12429 <p data-target="true" data-target-for="rpip62a02b2b75605f528529"><span class="mdescLeft" data-target="true" id="rpipdb8ba1ea2d1ed3de9911" data-parent-id="rpip62a02b2b75605f528529" data-target-for="rpipdb8ba1ea2d1ed3de9911">Â </span><span class="mdescRight" data-target="true" id="rpipdefaa93ffa4a6d0d0915" data-parent-id="rpip62a02b2b75605f528529" data-target-for="rpipdefaa93ffa4a6d0d0915">Add a repeating timer that is called repeatedly at the specified interval in milliseconds. <br id="rpip288767aab95559096acf"></span></p>
12431 <li class="memitem">
12432 <p data-target="true" data-target-for="rpip7f4bc32e0486f88ae85c"><span class="memItemLeft" data-target="true" id="rpip8c3ccca0a74289b21162" data-parent-id="rpip7f4bc32e0486f88ae85c" data-target-for="rpip8c3ccca0a74289b21162">bool </span><span class="memItemRight" data-target="true" id="rpipbdc54b35494448887255" data-parent-id="rpip7f4bc32e0486f88ae85c" data-target-for="rpipbdc54b35494448887255"><a class="el" href="#ga9ad5a07a3f2300cc9d46c1c847fae6f1" id="rpipeac3d4ab117a7db0988d" data-adjusted="true">cancel_repeating_timer</a> (<a class="el" href="structrepeating__timer.html" id="rpipca254b550056a009e8c6">repeating_timer_t</a> *timer)</span></p>
12434 <li class="memdesc">
12435 <p data-target="true" data-target-for="rpip64aa5d15a5ebe487c46f"><span class="mdescLeft" data-target="true" id="rpipaad1558a1c31f7c03c3f" data-parent-id="rpip64aa5d15a5ebe487c46f" data-target-for="rpipaad1558a1c31f7c03c3f">Â </span><span class="mdescRight" data-target="true" id="rpip848874a9aac40cee50e8" data-parent-id="rpip64aa5d15a5ebe487c46f" data-target-for="rpip848874a9aac40cee50e8">Cancel a repeating timer. <br id="rpip3044aa1b4baea9e0adab"></span></p>
12438 <a name="details" id="ga2f3317a1fdbd635c97b1"></a>
12440 <div class="sect3">
12441 <h4 id="rpip80f877f9d97030f9b43a">
12442 <a class="anchor" href="#rpip80f877f9d97030f9b43a"></a>Detailed Description</h4>
12443 <p id="rpip49173866520d6e7b4da8">Repeating Timer functions for simple scheduling of repeated execution. </p>
12444 <div class="admonitionblock note" id="rpipd42269e77f0bff5dd73b" data-parent-id="rpip0ea97d7fe857cda441ac"><table>
12445 <tr data-target="true" data-target-for="rpipd42269e77f0bff5dd73b">
12446 <td class="icon" id="rpip0c651ade2a417606bb3e" data-parent-id="rpipd42269e77f0bff5dd73b"><div class="title" data-target="true" data-target-for="rpip0c651ade2a417606bb3e">Note</div></td>
12447 <td class="content" id="rpipf99afdc619453f2776ee" data-parent-id="rpipd42269e77f0bff5dd73b" data-target-for="rpipf99afdc619453f2776ee">The regular <em id="rpip99399b2187fd47c828f0">alarm_</em> functionality can be used to make repeating alarms (by return non zero from the callback), however these methods abstract that further (at the cost of a user structure to store the repeat delay in (which the alarm framework does not have space for). </td>
12451 <div class="sect3">
12452 <h4 id="rpip98db9ebb48328e5b7a96">
12453 <a class="anchor" href="#rpip98db9ebb48328e5b7a96"></a>Typedef Documentation</h4>
12454 <a id="ga028fe2b7d00c1927c24131aae7c375f3" name="ga028fe2b7d00c1927c24131aae7c375f3"></a>
12455 <div class="sect4">
12456 <h5 id="rpip9561e08d6f1a2f5ba475">
12457 <a class="anchor" href="#rpip9561e08d6f1a2f5ba475"></a>◆ repeating_timer_callback_t</h5>
12458 <div class="memitem" id="rpipc480e092d100c8b481c9">
12459 <div class="memproto" id="rpipab5b0ded963c0c8dbb05">
12460 <table class="memname" id="rpipdd449c97360fd20b4ff9">
12461 <tr id="rpipedb24077b265a9079a97">
12462 <td class="memname" id="rpipe8de819c059b9e509760">typedef bool(* repeating_timer_callback_t) (<a class="el" href="structrepeating__timer.html" id="rpip5fe76e5e38645e6f22c6">repeating_timer_t</a> *rt)</td>
12466 <div class="memdoc" id="rpip0d9d1f6e26b19a500cd1">
12468 <p id="rpip5cdf6af1c7d315b835cf">Callback for a repeating timer. </p>
12469 <h4 id="rpip57695e5d738a11711fa6" data-parent-id="rpip463bdb78de5c7b164efd" data-target-for="rpip57695e5d738a11711fa6">Parameters</h4>
12470 <p class="paragraph" id="rpip996eee537336e98153e4" data-parent-id="rpip463bdb78de5c7b164efd" data-target-for="rpip996eee537336e98153e4">
12472 <table class="params" id="rpip4e5e5e6aa7a2dc5a3a06">
12473 <tr id="rpip5706f473b37fb3327703">
12474 <td class="paramname" id="rpipd11a5e26ebd88f8aef4b">rt</td>
12475 <td id="rpip0f7dfae79bec184e0e09">repeating time structure containing information about the repeating time. user_data is of primary important to the user </td>
12481 <h4 class="label" id="rpip5007f1074771cc053645" data-parent-id="rpip9685f20b91e4127cc361" data-target-for="rpip5007f1074771cc053645">Returns</h4>
12482 <p class="returns" id="rpipf9713efdcc6d62d6216a" data-parent-id="rpip9685f20b91e4127cc361" data-target-for="rpipf9713efdcc6d62d6216a">true to continue repeating, false to stop. </p>
12488 <div class="sect3">
12489 <h4 id="rpip2499c19089506d31d5b4">
12490 <a class="anchor" href="#rpip2499c19089506d31d5b4"></a>Function Documentation</h4>
12491 <a id="ga02133dbe7083fcf3c7392a2cfb8243ba" name="ga02133dbe7083fcf3c7392a2cfb8243ba"></a>
12492 <div class="sect4">
12493 <h5 id="rpip8e15c0ded1c0628069f4">
12494 <a class="anchor" href="#rpip8e15c0ded1c0628069f4"></a>◆ add_repeating_timer_ms()</h5>
12495 <div class="memitem" id="rpip8b161769da3f0716e51e">
12496 <div class="memproto" id="rpipfd574a612f9bb044a8c8">
12497 <table class="mlabels" id="rpipa64dc6e92888e263d200">
12498 <tr id="rpipc74c5be4b459f0a41bce">
12499 <td class="mlabels-left" id="rpip6736a9e6aa715af68c83">
12500 <table class="memname" id="rpip211b9ff335c61a4a3939">
12501 <tr id="rpip8bfb01c8c45266637598">
12502 <td class="memname" id="rpip0cfbb3c45bdc522722ae">static bool add_repeating_timer_ms </td>
12503 <td id="rpip008b5c71ccb5ea25b618">(</td>
12504 <td class="paramtype" id="rpip9ac06f073f7d0cae36b9">int32_t </td>
12505 <td class="paramname" id="rpip91ac6b272f44ae8c9d4f">
12506 <em id="rpip19e725c6cc3a1769ceee">delay_ms</em>, </td>
12508 <tr id="rpip43121fe46dc0adf029f4">
12509 <td class="paramkey" id="rpip73b17504cbb3a8456e02"></td>
12510 <td id="rpipbd83388963893fa8f5e9"></td>
12511 <td class="paramtype" id="rpipb7250a49632aff8a1a97">
12512 <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip6a8f6c106ccc0690ed97" data-adjusted="true">repeating_timer_callback_t</a>Â </td>
12513 <td class="paramname" id="rpip31ea7d218954ec51af7d">
12514 <em id="rpip9e58629b32987206779a">callback</em>, </td>
12516 <tr id="rpip079d7b68749a41d0dea2">
12517 <td class="paramkey" id="rpipe339a68c3ea9e404ee17"></td>
12518 <td id="rpip5ef8b67fd8a439ced857"></td>
12519 <td class="paramtype" id="rpip108d21327e89fb9cf8a2">void *Â </td>
12520 <td class="paramname" id="rpip08ba3ae46ba530cf0094">
12521 <em id="rpip575d1074819ed32e2fb6">user_data</em>, </td>
12523 <tr id="rpip9bb6e0e6c52b5cb2d2d2">
12524 <td class="paramkey" id="rpipb4b3455f6f4aba7bb16d"></td>
12525 <td id="rpip78af4c3d5a812adbe283"></td>
12526 <td class="paramtype" id="rpipe844b56ba2efe93ca83e">
12527 <a class="el" href="structrepeating__timer.html" id="rpip7b28b1facd85579ae60e">repeating_timer_t</a> *Â </td>
12528 <td class="paramname" id="rpipe32a817cf0e496985dd2">
12529 <em id="rpip8b715125bf0c856ee041">out</em>Â </td>
12531 <tr id="rpip36dcbe9c43a09d100f57">
12532 <td id="rpipa97edeff398b5f9569ac"></td>
12533 <td id="rpipc07261578cccd646e0fb">)</td>
12534 <td id="rpip65df09962d441c9d0afd"></td>
12535 <td id="rpip17661b595ad542002db7"></td>
12539 <td class="mlabels-right" id="rpipc9f0f6b911f9be91e4bd">
12540 <span class="mlabels" id="rpipdc26364540ad96a37c11"><span class="mlabel" id="rpip77dbe28ce5c7ea5397a5">inline</span><span class="mlabel" id="rpipc6263a07dbf89ef77a05">static</span></span> </td>
12544 <div class="memdoc" id="rpip2bd2fc5c08f341bb80e7">
12546 <p id="rpipdfa7c0748c38d460338c">Add a repeating timer that is called repeatedly at the specified interval in milliseconds. </p>
12547 <p id="rpip4d8914079c32da86c714">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
12548 <div class="admonitionblock note" id="rpip773462aa29ed29650497" data-parent-id="rpip2bd2fc5c08f341bb80e7"><table>
12549 <tr data-target="true" data-target-for="rpip773462aa29ed29650497">
12550 <td class="icon" id="rpip7d75c36b0e21105f0c09" data-parent-id="rpip773462aa29ed29650497"><div class="title" data-target="true" data-target-for="rpip7d75c36b0e21105f0c09">Note</div></td>
12551 <td class="content" id="rpipb40963d2e055d67b080b" data-parent-id="rpip773462aa29ed29650497" data-target-for="rpipb40963d2e055d67b080b">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
12554 <h4 id="rpip993989077de7cf302eda" data-parent-id="rpipf41f89491dbc2c9b502e" data-target-for="rpip993989077de7cf302eda">Parameters</h4>
12555 <p class="paragraph" id="rpip308d1b0385df38ec9b15" data-parent-id="rpipf41f89491dbc2c9b502e" data-target-for="rpip308d1b0385df38ec9b15">
12557 <table class="params" id="rpip7d4c9105f2f407644036">
12558 <tr id="rpipf8e8f526bdf97085f0cb">
12559 <td class="paramname" id="rpipeaabf6b38b6881d1815b">delay_ms</td>
12560 <td id="rpip05e5e5fffabdae71bc27">the repeat delay in milliseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 microsecond </td>
12562 <tr id="rpipf7271b7aaac1e776e008">
12563 <td class="paramname" id="rpip96cb7b64adda14fdc0fb">callback</td>
12564 <td id="rpip9c623244f242335c02dd">the repeating timer callback function </td>
12566 <tr id="rpip25d4c3476f2029b2834b">
12567 <td class="paramname" id="rpip82155615ae7fec57fb2c">user_data</td>
12568 <td id="rpipc1ae69b2036e73284dea">user data to pass to store in the <a class="el" href="structrepeating__timer.html" title="Information about a repeating timer." id="rpipaffddbbc5cd770e34041">repeating_timer</a> structure for use by the callback. </td>
12570 <tr id="rpip7dac6700b2880916ddbb">
12571 <td class="paramname" id="rpip985ddfa840672e01d965">out</td>
12572 <td id="rpipd6063f076f6d3acf3104">the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space </td>
12578 <h4 class="label" id="rpipc789db5415f53453ccac" data-parent-id="rpip6fa2675266390b7c4247" data-target-for="rpipc789db5415f53453ccac">Returns</h4>
12579 <p class="returns" id="rpip86b56b415745ae667868" data-parent-id="rpip6fa2675266390b7c4247" data-target-for="rpip86b56b415745ae667868">false if there were no alarm slots available to create the timer, true otherwise. </p>
12583 <a id="ga8da55f26158144c2a9a813f69a524906" name="ga8da55f26158144c2a9a813f69a524906"></a>
12585 <div class="sect4">
12586 <h5 id="rpipdb65a0bdce0635d95877">
12587 <a class="anchor" href="#rpipdb65a0bdce0635d95877"></a>◆ add_repeating_timer_us()</h5>
12588 <div class="memitem" id="rpip83ee9cee874e07868ccf">
12589 <div class="memproto" id="rpip8b194c432dcfcd141173">
12590 <table class="mlabels" id="rpipef983bc7fb07de5cd780">
12591 <tr id="rpip06e6b0467be2aa411b4a">
12592 <td class="mlabels-left" id="rpipc373d23da8b0b1083493">
12593 <table class="memname" id="rpip18aed1a1d9a843825cf9">
12594 <tr id="rpipdacaec6a8476c63e4d19">
12595 <td class="memname" id="rpipf790e6c1660ee5465b25">static bool add_repeating_timer_us </td>
12596 <td id="rpip120f217b3ed4fcdf82d4">(</td>
12597 <td class="paramtype" id="rpip9e2a1204343d6a029730">int64_t </td>
12598 <td class="paramname" id="rpip37bba5523de58973b451">
12599 <em id="rpip5d4458eb82fdcfed66fb">delay_us</em>, </td>
12601 <tr id="rpipd595831b69207ea801fa">
12602 <td class="paramkey" id="rpip547590d6172db2974acd"></td>
12603 <td id="rpipa10c27e43f1d5c72ecaf"></td>
12604 <td class="paramtype" id="rpip70d362b41d387a82b477">
12605 <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpipedeeada08e698e78de1c" data-adjusted="true">repeating_timer_callback_t</a>Â </td>
12606 <td class="paramname" id="rpip388ba12f20718166ee2e">
12607 <em id="rpip6475c3960daa350263c0">callback</em>, </td>
12609 <tr id="rpip8c55e588eba4af25e2d0">
12610 <td class="paramkey" id="rpip08e52205f18b256fa7e9"></td>
12611 <td id="rpip0e2f3f0bbb77fffec1e9"></td>
12612 <td class="paramtype" id="rpip2c910f2d1a49e5c1d1c7">void *Â </td>
12613 <td class="paramname" id="rpip3e737e8500e8a61132fc">
12614 <em id="rpipf566430a89f320791543">user_data</em>, </td>
12616 <tr id="rpip838ab4fff2340a781edc">
12617 <td class="paramkey" id="rpipf1dec5dfaec0207d08b1"></td>
12618 <td id="rpip4b9a488ccd8f1d96e314"></td>
12619 <td class="paramtype" id="rpipb5cbf56b570e2c87dbd5">
12620 <a class="el" href="structrepeating__timer.html" id="rpip5a5f13f23c174aabb19b">repeating_timer_t</a> *Â </td>
12621 <td class="paramname" id="rpipa4ee2069f771b4d47664">
12622 <em id="rpip1969d5e8dd83f8fc4b07">out</em>Â </td>
12624 <tr id="rpip179fdc4726402e0965e8">
12625 <td id="rpip0d7816386fe3724184cc"></td>
12626 <td id="rpip054eade3b76fc321be43">)</td>
12627 <td id="rpip7efb786370b832608f47"></td>
12628 <td id="rpip951cb6d761ee18575e2d"></td>
12632 <td class="mlabels-right" id="rpipcd1dc30294b6548dd046">
12633 <span class="mlabels" id="rpipde98ce76157b12bc2e94"><span class="mlabel" id="rpip9cb05ecc43db49c2285b">inline</span><span class="mlabel" id="rpipccd2862772bc4a654fb5">static</span></span> </td>
12637 <div class="memdoc" id="rpipf3c147431275cd704707">
12639 <p id="rpip9f3c4daa3aa9c1953210">Add a repeating timer that is called repeatedly at the specified interval in microseconds. </p>
12640 <p id="rpipa5402f5d435d03908d83">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core of the default alarm pool (generally core 0). If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
12641 <div class="admonitionblock note" id="rpipc75c612d2afedc1ad6b5" data-parent-id="rpipf3c147431275cd704707"><table>
12642 <tr data-target="true" data-target-for="rpipc75c612d2afedc1ad6b5">
12643 <td class="icon" id="rpip7a7c6894111e9dec51cf" data-parent-id="rpipc75c612d2afedc1ad6b5"><div class="title" data-target="true" data-target-for="rpip7a7c6894111e9dec51cf">Note</div></td>
12644 <td class="content" id="rpipf7f7c9bfd32deb391e17" data-parent-id="rpipc75c612d2afedc1ad6b5" data-target-for="rpipf7f7c9bfd32deb391e17">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
12647 <h4 id="rpipd88d2c9e591958daf035" data-parent-id="rpip0ec26d25aad38889835e" data-target-for="rpipd88d2c9e591958daf035">Parameters</h4>
12648 <p class="paragraph" id="rpip01b81ecaa6bc9addf2fb" data-parent-id="rpip0ec26d25aad38889835e" data-target-for="rpip01b81ecaa6bc9addf2fb">
12650 <table class="params" id="rpipb4a756b48990f5bca58e">
12651 <tr id="rpip3f071b46bc1cd4e82ad6">
12652 <td class="paramname" id="rpipaad7e109fa89fb31b736">delay_us</td>
12653 <td id="rpipecebe9f4b3e8ca60c415">the repeat delay in microseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 </td>
12655 <tr id="rpip24f55122f59244346725">
12656 <td class="paramname" id="rpipa0d280332340e71941e7">callback</td>
12657 <td id="rpip1a07e377ec8a186d179d">the repeating timer callback function </td>
12659 <tr id="rpip2d5f91699fa51aff81a7">
12660 <td class="paramname" id="rpipe7dfe4ee944a6e83970c">user_data</td>
12661 <td id="rpip73df8e63afbf4956c321">user data to pass to store in the <a class="el" href="structrepeating__timer.html" title="Information about a repeating timer." id="rpipbc5383d56b41ff144797">repeating_timer</a> structure for use by the callback. </td>
12663 <tr id="rpip054cc3984434877d2d3a">
12664 <td class="paramname" id="rpipca77b44794fe5d5f6926">out</td>
12665 <td id="rpipb36ad893c61bb164c645">the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space </td>
12671 <h4 class="label" id="rpip33794940a0ef24598003" data-parent-id="rpipad6718daa6e890bf4c01" data-target-for="rpip33794940a0ef24598003">Returns</h4>
12672 <p class="returns" id="rpip1607a1edb8a931acd9ba" data-parent-id="rpipad6718daa6e890bf4c01" data-target-for="rpip1607a1edb8a931acd9ba">false if there were no alarm slots available to create the timer, true otherwise. </p>
12676 <a id="gae5a6b07212ea5e106a81fc2f814a9e9e" name="gae5a6b07212ea5e106a81fc2f814a9e9e"></a>
12678 <div class="sect4">
12679 <h5 id="rpip8f87f9e2a787c59fb5a0">
12680 <a class="anchor" href="#rpip8f87f9e2a787c59fb5a0"></a>◆ alarm_pool_add_repeating_timer_ms()</h5>
12681 <div class="memitem" id="rpip49e54234d3195f5ee212">
12682 <div class="memproto" id="rpip373f49183845ba0b03f5">
12683 <table class="mlabels" id="rpipeed7201816ac5ea90822">
12684 <tr id="rpipbb354c79c6c5192c32e0">
12685 <td class="mlabels-left" id="rpipfadf04b34cfc5f0cc9a1">
12686 <table class="memname" id="rpip995df412a8a1f7af0c58">
12687 <tr id="rpipcf4ea1daaaa78a2366d1">
12688 <td class="memname" id="rpipc3ac1e36dd14dee744ec">static bool alarm_pool_add_repeating_timer_ms </td>
12689 <td id="rpipcdf05c27513ad54feb58">(</td>
12690 <td class="paramtype" id="rpipaa8dc7c3c798a49a29ec">
12691 <a class="el" href="structalarm__pool.html" id="rpip22bbf9e955ef2c662b02">alarm_pool_t</a> *Â </td>
12692 <td class="paramname" id="rpip2f06b83de9c8731bd867">
12693 <em id="rpip7ebede11bc8152b57828">pool</em>, </td>
12695 <tr id="rpipee416dafec6a452365eb">
12696 <td class="paramkey" id="rpip78a34df1be38e3197b0f"></td>
12697 <td id="rpipa5bb3a2aa3107632ff13"></td>
12698 <td class="paramtype" id="rpip7c47e45149978735e5d1">int32_t </td>
12699 <td class="paramname" id="rpipbc74de24f7c57cf56d44">
12700 <em id="rpip050c3d05b8757d192ec2">delay_ms</em>, </td>
12702 <tr id="rpip4a32c545efa7d4923f1f">
12703 <td class="paramkey" id="rpipc126f768e83b447404df"></td>
12704 <td id="rpipf30a30029450bc5da66c"></td>
12705 <td class="paramtype" id="rpip47461cfe38be7239ad6d">
12706 <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip8758b5340fb6442e64c3" data-adjusted="true">repeating_timer_callback_t</a>Â </td>
12707 <td class="paramname" id="rpip2905da551436e1d1ca64">
12708 <em id="rpipc7c1a614ffb19856924d">callback</em>, </td>
12710 <tr id="rpipceefb6017b6b5f36afe3">
12711 <td class="paramkey" id="rpip3bc8bdcc4df380ccb683"></td>
12712 <td id="rpip072379e4ad656359ca83"></td>
12713 <td class="paramtype" id="rpip7ead1d95eb3ecd7e1d18">void *Â </td>
12714 <td class="paramname" id="rpipa5fb4bdce573cbef5f6f">
12715 <em id="rpip55d24f2d31acf3de567c">user_data</em>, </td>
12717 <tr id="rpip610e01a0af561c40a865">
12718 <td class="paramkey" id="rpip464856a5aae633e40843"></td>
12719 <td id="rpip4836fde5a857157bea86"></td>
12720 <td class="paramtype" id="rpipb5c473b70b1e036297f7">
12721 <a class="el" href="structrepeating__timer.html" id="rpipcd23692706a85820d734">repeating_timer_t</a> *Â </td>
12722 <td class="paramname" id="rpip070b5fc2c4a94212fae9">
12723 <em id="rpipe2ab54c71c252b1c5238">out</em>Â </td>
12725 <tr id="rpipa5eb07424740eacdeb72">
12726 <td id="rpipd08363a01da4ab48e503"></td>
12727 <td id="rpip1da3dfaed669b6b78bae">)</td>
12728 <td id="rpip61ad96719af66618cf4a"></td>
12729 <td id="rpipe3d5d4eebe3b2f760322"></td>
12733 <td class="mlabels-right" id="rpip8816705e05dc94fab01d">
12734 <span class="mlabels" id="rpip7af17d4413cd0116c307"><span class="mlabel" id="rpipdd5f4a0c3d4039d001e7">inline</span><span class="mlabel" id="rpipe980fee78baea0c24466">static</span></span> </td>
12738 <div class="memdoc" id="rpip9a22da2dcb7d13cbc5bf">
12740 <p id="rpip3b50f0382eb88b0e6a3b">Add a repeating timer that is called repeatedly at the specified interval in milliseconds. </p>
12741 <p id="rpip4ec197124bd94aca52a8">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
12742 <div class="admonitionblock note" id="rpip5c2c792d69b46ddac24c" data-parent-id="rpip9a22da2dcb7d13cbc5bf"><table>
12743 <tr data-target="true" data-target-for="rpip5c2c792d69b46ddac24c">
12744 <td class="icon" id="rpipc2d42288783fd1108d95" data-parent-id="rpip5c2c792d69b46ddac24c"><div class="title" data-target="true" data-target-for="rpipc2d42288783fd1108d95">Note</div></td>
12745 <td class="content" id="rpip608589a4f95b67c407e5" data-parent-id="rpip5c2c792d69b46ddac24c" data-target-for="rpip608589a4f95b67c407e5">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
12748 <h4 id="rpipb62331b24c5f79932d79" data-parent-id="rpipd9b2a3e250ff1fb9bd73" data-target-for="rpipb62331b24c5f79932d79">Parameters</h4>
12749 <p class="paragraph" id="rpip13f52bdfed6476c7da3c" data-parent-id="rpipd9b2a3e250ff1fb9bd73" data-target-for="rpip13f52bdfed6476c7da3c">
12751 <table class="params" id="rpip5527aec4547c9c3a8b3e">
12752 <tr id="rpipacb90ff516fad09e9674">
12753 <td class="paramname" id="rpip32bf13c28f30b03cee23">pool</td>
12754 <td id="rpipb10a54f75a13e63003b2">the alarm pool to use for scheduling the repeating timer (this determines which hardware alarm is used, and which core calls the callback) </td>
12756 <tr id="rpip0f76da59c528828a2670">
12757 <td class="paramname" id="rpip7bc36797e1b94ac56af3">delay_ms</td>
12758 <td id="rpip2d6bf3e99a882d8663fd">the repeat delay in milliseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 microsecond </td>
12760 <tr id="rpipc2cfdf5decb3fdcc115b">
12761 <td class="paramname" id="rpip7465a859b9d6f23aa097">callback</td>
12762 <td id="rpipd27cdce09740228e42fd">the repeating timer callback function </td>
12764 <tr id="rpipda4227ce22060db93c8b">
12765 <td class="paramname" id="rpip0b07a4bde069078b8931">user_data</td>
12766 <td id="rpipcc0dac5e123ad62d5e6b">user data to pass to store in the <a class="el" href="structrepeating__timer.html" title="Information about a repeating timer." id="rpipb2291193ee64980b1550">repeating_timer</a> structure for use by the callback. </td>
12768 <tr id="rpipa73491283db7d38184d3">
12769 <td class="paramname" id="rpip390e4b72f25a0e6c61bb">out</td>
12770 <td id="rpipa7a8d20e434ef101e862">the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space </td>
12776 <h4 class="label" id="rpip28b263c6e8ed037d58c9" data-parent-id="rpip9bf74a4288e880996ee0" data-target-for="rpip28b263c6e8ed037d58c9">Returns</h4>
12777 <p class="returns" id="rpip6003f2a87d200cd42cbb" data-parent-id="rpip9bf74a4288e880996ee0" data-target-for="rpip6003f2a87d200cd42cbb">false if there were no alarm slots available to create the timer, true otherwise. </p>
12781 <a id="ga75dad2018ae1e4c154fb17cd96db9872" name="ga75dad2018ae1e4c154fb17cd96db9872"></a>
12783 <div class="sect4">
12784 <h5 id="rpip59d93508ef455ae41cee">
12785 <a class="anchor" href="#rpip59d93508ef455ae41cee"></a>◆ alarm_pool_add_repeating_timer_us()</h5>
12786 <div class="memitem" id="rpip378610f5c2f191119a00">
12787 <div class="memproto" id="rpipb304d72e1a4fd91686ea">
12788 <table class="memname" id="rpip13c4322fa2975b3ae4b8">
12789 <tr id="rpipce6a286701fed95a7e71">
12790 <td class="memname" id="rpip3ee3e642586eae3333b6">bool alarm_pool_add_repeating_timer_us </td>
12791 <td id="rpip85ee51606d0b5d30f111">(</td>
12792 <td class="paramtype" id="rpip91341a90ae6cf4b9dec6">
12793 <a class="el" href="structalarm__pool.html" id="rpip8a51c32705db16e175e0">alarm_pool_t</a> *Â </td>
12794 <td class="paramname" id="rpipcf3627238fa984f263be">
12795 <em id="rpip6c02363e12c3f7d0e576">pool</em>, </td>
12797 <tr id="rpip3672cd982d38961fc6b9">
12798 <td class="paramkey" id="rpip48db3fa38eb16cc7c20f"></td>
12799 <td id="rpipd54772f5a1ea3819b8c4"></td>
12800 <td class="paramtype" id="rpip4b37760b71f4f04b76b9">int64_t </td>
12801 <td class="paramname" id="rpipc5f147e1439e452f118a">
12802 <em id="rpip6a2ea08387a13ed38cc8">delay_us</em>, </td>
12804 <tr id="rpip02d5c7a55e7110402b46">
12805 <td class="paramkey" id="rpipcf9cb6c181d73c140c70"></td>
12806 <td id="rpipebc7f5c82f027372cb67"></td>
12807 <td class="paramtype" id="rpip35c0937e06d958ab356f">
12808 <a class="el" href="#ga028fe2b7d00c1927c24131aae7c375f3" id="rpip5c76fe8582d71d5bce29" data-adjusted="true">repeating_timer_callback_t</a>Â </td>
12809 <td class="paramname" id="rpip368648e72c7a32dd05a3">
12810 <em id="rpip9927162ff726f9d118e2">callback</em>, </td>
12812 <tr id="rpipecea346fa316d90180f7">
12813 <td class="paramkey" id="rpipba77b22e28c3379e2df7"></td>
12814 <td id="rpip7c93eeb452b589afe646"></td>
12815 <td class="paramtype" id="rpipa7f1788f940d1e392df1">void *Â </td>
12816 <td class="paramname" id="rpip10bff30552890a59e7fd">
12817 <em id="rpip9a539c8756490a1fd738">user_data</em>, </td>
12819 <tr id="rpip2d0d5e56ea8731f6e2cc">
12820 <td class="paramkey" id="rpipfa7ba3cb9ad3294642b8"></td>
12821 <td id="rpip3eb91a60e2b016392961"></td>
12822 <td class="paramtype" id="rpipcdb1acccc080939d282d">
12823 <a class="el" href="structrepeating__timer.html" id="rpipd9dff0fd4e026d9f1fbf">repeating_timer_t</a> *Â </td>
12824 <td class="paramname" id="rpip7413fe6363d4ff8085d7">
12825 <em id="rpip8366d44b4ecffaa389c9">out</em>Â </td>
12827 <tr id="rpipa5f767b62111260633ed">
12828 <td id="rpip4927d11597bc347e2d9b"></td>
12829 <td id="rpip23804c8e5e02379938ad">)</td>
12830 <td id="rpip1b6ac89a2518288ee78b"></td>
12831 <td id="rpipcbc490a0a87e1587d032"></td>
12835 <div class="memdoc" id="rpip8070e67ef3679beeb4ce">
12837 <p id="rpip8470debba2d12b0312c1">Add a repeating timer that is called repeatedly at the specified interval in microseconds. </p>
12838 <p id="rpipf051e650f04be4b8e8f5">Generally the callback is called as soon as possible after the time specified from an IRQ handler on the core the alarm pool was created on. If the callback is in the past or happens before the alarm setup could be completed, then this method will optionally call the callback itself and then return a return code to indicate that the target time has passed.</p>
12839 <div class="admonitionblock note" id="rpipc6e06ba6337d63014cae" data-parent-id="rpip8070e67ef3679beeb4ce"><table>
12840 <tr data-target="true" data-target-for="rpipc6e06ba6337d63014cae">
12841 <td class="icon" id="rpip4c9b96228b9506c8d227" data-parent-id="rpipc6e06ba6337d63014cae"><div class="title" data-target="true" data-target-for="rpip4c9b96228b9506c8d227">Note</div></td>
12842 <td class="content" id="rpipa50003b532b491bc3eff" data-parent-id="rpipc6e06ba6337d63014cae" data-target-for="rpipa50003b532b491bc3eff">It is safe to call this method from an IRQ handler (including alarm callbacks), and from either core.</td>
12845 <h4 id="rpipb659823124e81377b924" data-parent-id="rpip73e09e0f98bf5ecebb08" data-target-for="rpipb659823124e81377b924">Parameters</h4>
12846 <p class="paragraph" id="rpipc2b4ed77bb6de8ed2762" data-parent-id="rpip73e09e0f98bf5ecebb08" data-target-for="rpipc2b4ed77bb6de8ed2762">
12848 <table class="params" id="rpip195a20c636c65e1954a6">
12849 <tr id="rpipc4ee7cf9b5877027530f">
12850 <td class="paramname" id="rpip846906e0e63bc43e9b15">pool</td>
12851 <td id="rpipebfc789765ceaae162ea">the alarm pool to use for scheduling the repeating timer (this determines which hardware alarm is used, and which core calls the callback) </td>
12853 <tr id="rpip54206ddf8993aa07327a">
12854 <td class="paramname" id="rpip3d4c99d3009c82616d89">delay_us</td>
12855 <td id="rpip49e3e3ef73c66b346427">the repeat delay in microseconds; if >0 then this is the delay between one callback ending and the next starting; if <0 then this is the negative of the time between the starts of the callbacks. The value of 0 is treated as 1 </td>
12857 <tr id="rpipb682cec06932cc5d8fc5">
12858 <td class="paramname" id="rpipe68a40257648c7793cc9">callback</td>
12859 <td id="rpip15d939f372cf42f688f0">the repeating timer callback function </td>
12861 <tr id="rpipe9461a076b6d577de84a">
12862 <td class="paramname" id="rpipd1fefb7fe6abc187e86b">user_data</td>
12863 <td id="rpip76e3148722be6198fa0b">user data to pass to store in the <a class="el" href="structrepeating__timer.html" title="Information about a repeating timer." id="rpipafe46d6c1e3c2b19f40a">repeating_timer</a> structure for use by the callback. </td>
12865 <tr id="rpip31f95bbe8398ffa5f4a6">
12866 <td class="paramname" id="rpipd99e43461045b8671eb3">out</td>
12867 <td id="rpipb596c5bc54ce268b8d2c">the pointer to the user owned structure to store the repeating timer info in. BEWARE this storage location must outlive the repeating timer, so be careful of using stack space </td>
12873 <h4 class="label" id="rpip31c668bfa90855c055af" data-parent-id="rpip3721bcbc3322ca62b396" data-target-for="rpip31c668bfa90855c055af">Returns</h4>
12874 <p class="returns" id="rpip64a76499cc6d796c32b3" data-parent-id="rpip3721bcbc3322ca62b396" data-target-for="rpip64a76499cc6d796c32b3">false if there were no alarm slots available to create the timer, true otherwise. </p>
12878 <a id="ga9ad5a07a3f2300cc9d46c1c847fae6f1" name="ga9ad5a07a3f2300cc9d46c1c847fae6f1"></a>
12880 <div class="sect4">
12881 <h5 id="rpip0f538799ae27a799f109">
12882 <a class="anchor" href="#rpip0f538799ae27a799f109"></a>◆ cancel_repeating_timer()</h5>
12883 <div class="memitem" id="rpipd7930a5d9928ce234bff">
12884 <div class="memproto" id="rpip104feb296e4e6f8c0bf8">
12885 <table class="memname" id="rpip821c9b3cadd2e7bae27c">
12886 <tr id="rpipa1157f5bf14f9fb724f7">
12887 <td class="memname" id="rpipad0e9c5d6863bcfc93c3">bool cancel_repeating_timer </td>
12888 <td id="rpipd18ca59fa60ab9a78cfe">(</td>
12889 <td class="paramtype" id="rpip2e8805c9b4e29e1e7998">
12890 <a class="el" href="structrepeating__timer.html" id="rpip78e569c498671dfe2d31">repeating_timer_t</a> *Â </td>
12891 <td class="paramname" id="rpip4210872d651796ce57b1"><em id="rpipbb4d39e8e336f442ace4">timer</em></td>
12892 <td id="rpip8660880fe1ef4ce2e63c">)</td>
12893 <td id="rpip374055b3edf0b430debb"></td>
12897 <div class="memdoc" id="rpipfe4c652e32491ffc330b">
12899 <p id="rpipc1b73238fa9aa9579d99">Cancel a repeating timer. </p>
12900 <h4 id="rpipd19de639ec452ec78cb3" data-parent-id="rpip03c2787cd0e810028cd4" data-target-for="rpipd19de639ec452ec78cb3">Parameters</h4>
12901 <p class="paragraph" id="rpip1dc141de9f18f65627bf" data-parent-id="rpip03c2787cd0e810028cd4" data-target-for="rpip1dc141de9f18f65627bf">
12903 <table class="params" id="rpip9ca9754f8a674836467a">
12904 <tr id="rpipdb5481ab1fa703398373">
12905 <td class="paramname" id="rpipa86bcc0cb7b7cf7a48e6">timer</td>
12906 <td id="rpip2c9d8ee8c0aee8990751">the repeating timer to cancel </td>
12912 <h4 class="label" id="rpipb24561209d9cb3e55b80" data-parent-id="rpipd0646d1eb5719dbee8b1" data-target-for="rpipb24561209d9cb3e55b80">Returns</h4>
12913 <p class="returns" id="rpip37d5d4932c663ca4dc6a" data-parent-id="rpipd0646d1eb5719dbee8b1" data-target-for="rpip37d5d4932c663ca4dc6a">true if the repeating timer was cancelled, false if it didn't exist </p>
12914 <p class="see" id="rpipabcf27ac325a910ff54d" data-parent-id="rpipfe4c652e32491ffc330b" data-target-for="rpipabcf27ac325a910ff54d"><span class="label" id="rpip25b11acc16d9f0e034e0" data-parent-id="rpipabcf27ac325a910ff54d" data-target-for="rpip25b11acc16d9f0e034e0">See also</span><span class="target" id="rpip5ea10bcecb41ca9cf294" data-parent-id="rpipabcf27ac325a910ff54d" data-target-for="rpip5ea10bcecb41ca9cf294"><a class="el" href="high_level.html#gaa593548569c182a0d65d2e06a9c3493b" title="The identifier for an alarm." id="rpipc177ecf70ac7c7232de1" data-adjusted="true">alarm_id_t</a> for a note on reuse of IDs </span></p>
12924 <div class="sect1">
12925 <h2 id="pico_unique_id">
12926 <a class="anchor" href="#pico_unique_id"></a>pico_unique_id</h2>
12927 <div class="sectionbody"></div>
12928 <div class="ingroups" id="rpip31b23c68e04b862cc382">Part of: <a class="el" href="high_level.html" id="rpipb80eaee12bd8e2a988b1">High Level APIs</a>
12930 <div class="sect2">
12931 <h3 id="rpip7981e60e740d763c8048">
12932 <a class="anchor" href="#rpip7981e60e740d763c8048"></a>Data Structures</h3>
12933 <ul class="memberdecls" id="rpip69f5a831655017762659" data-parent-id="rpipb189b158cde4530807ef">
12934 <li class="memitem">
12935 <p data-target="true" data-target-for="rpip69f5a831655017762659"><span class="memItemLeft" data-target="true" id="rpip3aa00007ea7bef4bcc64" data-parent-id="rpip69f5a831655017762659" data-target-for="rpip3aa00007ea7bef4bcc64">struct  </span><span class="memItemRight" data-target="true" id="rpipad0f325c052c7ac8d7d3" data-parent-id="rpip69f5a831655017762659" data-target-for="rpipad0f325c052c7ac8d7d3"><a class="el" href="structpico__unique__board__id__t.html" id="rpipc07e13f6bc9f88bb684b">pico_unique_board_id_t</a></span></p>
12937 <li class="memdesc">
12938 <p data-target="true" data-target-for="rpipcce38a37c8be3f665ac5"><span class="mdescLeft" data-target="true" id="rpip4a776ec2381c997c737a" data-parent-id="rpipcce38a37c8be3f665ac5" data-target-for="rpip4a776ec2381c997c737a">Â </span><span class="mdescRight" data-target="true" id="rpip040c267b62e3c15b3262" data-parent-id="rpipcce38a37c8be3f665ac5" data-target-for="rpip040c267b62e3c15b3262">Unique board identifier. <a href="structpico__unique__board__id__t.html#details" id="rpip3b1521ed2a58fd2b6951" data-adjusted="true">More...</a><br id="rpipc0e41618443b88475b8a"></span></p>
12942 <div class="sect2">
12943 <h3 id="rpip04f6f057a3030914c7d2">
12944 <a class="anchor" href="#rpip04f6f057a3030914c7d2"></a>Functions</h3>
12945 <ul class="memberdecls" id="rpipb7b050ab6bd2f7df9d40" data-parent-id="rpip7a07da8fccedcb20a969">
12946 <li class="memitem">
12947 <p data-target="true" data-target-for="rpipb7b050ab6bd2f7df9d40"><span class="memItemLeft" data-target="true" id="rpip876f3fd61558202f8418" data-parent-id="rpipb7b050ab6bd2f7df9d40" data-target-for="rpip876f3fd61558202f8418">void </span><span class="memItemRight" data-target="true" id="rpipa7a05b7a48a2a6797cc2" data-parent-id="rpipb7b050ab6bd2f7df9d40" data-target-for="rpipa7a05b7a48a2a6797cc2"><a class="el" href="#gaf87ef8a55d8dc2520776e427a605b6fb" id="rpip2ffe649fc92dcb3a0586" data-adjusted="true">pico_get_unique_board_id</a> (<a class="el" href="structpico__unique__board__id__t.html" id="rpipe4a16057c01cf0ab4780">pico_unique_board_id_t</a> *id_out)</span></p>
12949 <li class="memdesc">
12950 <p data-target="true" data-target-for="rpip8aa67a4c579ff75163a4"><span class="mdescLeft" data-target="true" id="rpipedc3b154f67ea00d7169" data-parent-id="rpip8aa67a4c579ff75163a4" data-target-for="rpipedc3b154f67ea00d7169">Â </span><span class="mdescRight" data-target="true" id="rpipda962a2927ba1a7c30d6" data-parent-id="rpip8aa67a4c579ff75163a4" data-target-for="rpipda962a2927ba1a7c30d6">Get unique ID. <br id="rpip5365e669eacaf0da0ee5"></span></p>
12952 <li class="memitem">
12953 <p data-target="true" data-target-for="rpip6886d46f92aa182e5f31"><span class="memItemLeft" data-target="true" id="rpipa72d8161aa85f77b6120" data-parent-id="rpip6886d46f92aa182e5f31" data-target-for="rpipa72d8161aa85f77b6120">void </span><span class="memItemRight" data-target="true" id="rpip64b7c5977b24f4a623b1" data-parent-id="rpip6886d46f92aa182e5f31" data-target-for="rpip64b7c5977b24f4a623b1"><a class="el" href="#ga14fc6ab3ef89570b7dddff13e1b49634" id="rpip7869047746b22efb6afd" data-adjusted="true">pico_get_unique_board_id_string</a> (char *id_out, uint len)</span></p>
12955 <li class="memdesc">
12956 <p data-target="true" data-target-for="rpipc6911d9f6e7774a6c670"><span class="mdescLeft" data-target="true" id="rpipe1fd579a1f24d7d0060d" data-parent-id="rpipc6911d9f6e7774a6c670" data-target-for="rpipe1fd579a1f24d7d0060d">Â </span><span class="mdescRight" data-target="true" id="rpipbe15cc7d2c8c4d560205" data-parent-id="rpipc6911d9f6e7774a6c670" data-target-for="rpipbe15cc7d2c8c4d560205">Get unique ID in string format. <br id="rpipbe689a9f4485f6cbbfb2"></span></p>
12959 <a name="details" id="details"></a>
12961 <div class="sect2">
12962 <h3 id="rpip2a7175316ee370f706a8">
12963 <a class="anchor" href="#rpip2a7175316ee370f706a8"></a>Detailed Description</h3>
12964 <p id="rpipc5290638db3ac8d5ab47">Unique device ID access API</p>
12965 <p id="rpipc67f9e50df93315b3757">RP2040 does not have an on-board unique identifier (all instances of RP2040 silicon are identical and have no persistent state). However, RP2040 boots from serial NOR flash devices which have a 64-bit unique ID as a standard feature, and there is a 1:1 association between RP2040 and flash, so this is suitable for use as a unique identifier for an RP2040-based board.</p>
12966 <p id="rpip1548dcc9a439c40ee79e">This library injects a call to the flash_get_unique_id function from the hardware_flash library, to run before main, and stores the result in a static location which can safely be accessed at any time via pico_get_unique_id().</p>
12967 <p id="rpip2c9b7aa01a9ec895d957">This avoids some pitfalls of the hardware_flash API, which requires any flash-resident interrupt routines to be disabled when called into. </p>
12969 <div class="sect2">
12970 <h3 id="rpipec641d378cce59faa918">
12971 <a class="anchor" href="#rpipec641d378cce59faa918"></a>Function Documentation</h3>
12972 <a id="gaf87ef8a55d8dc2520776e427a605b6fb" name="gaf87ef8a55d8dc2520776e427a605b6fb"></a>
12973 <div class="sect3">
12974 <h4 id="rpip0e2b4bc597e1a63754bb">
12975 <a class="anchor" href="#rpip0e2b4bc597e1a63754bb"></a>◆ pico_get_unique_board_id()</h4>
12976 <div class="memitem" id="rpip58102ea1b686b871d54f">
12977 <div class="memproto" id="rpipcec3f37f0d620866bfe9">
12978 <table class="memname" id="rpip3384631535c0d93fe967">
12979 <tr id="rpip905664e46b69236d1ba2">
12980 <td class="memname" id="rpipe71681569d2c9a8ab629">void pico_get_unique_board_id </td>
12981 <td id="rpip9548689a64d66c2fe529">(</td>
12982 <td class="paramtype" id="rpip75fc07c3bc46744793a9">
12983 <a class="el" href="structpico__unique__board__id__t.html" id="rpipa202529cabcc0188675a">pico_unique_board_id_t</a> *Â </td>
12984 <td class="paramname" id="rpip91f883876f3ba66abb7f"><em id="rpip53ba2ae3844ee4bcb02b">id_out</em></td>
12985 <td id="rpip9d97e9885bae37cdb400">)</td>
12986 <td id="rpipec8e32bf84a1b6cdc9e1"></td>
12990 <div class="memdoc" id="rpip71c5c2766c59d1d4f009">
12992 <p id="rpip0ae6de1980a41c6ee4d1">Get unique ID. </p>
12993 <p id="rpipda22b12485015502be5b">Get the unique 64-bit device identifier which was retrieved from the external NOR flash device at boot.</p>
12994 <p id="rpip44786058ef42bc7ba5bf">On PICO_NO_FLASH builds the unique identifier is set to all 0xEE.</p>
12995 <h4 id="rpipd3a9e6130d74a2eca9e1" data-parent-id="rpip45f96984bdb286c4a083" data-target-for="rpipd3a9e6130d74a2eca9e1">Parameters</h4>
12996 <p class="paragraph" id="rpip692ca6a6b19a2d499365" data-parent-id="rpip45f96984bdb286c4a083" data-target-for="rpip692ca6a6b19a2d499365">
12998 <table class="params" id="rpipa67181f9061df3efd160">
12999 <tr id="rpipe3c958f6a1e530d6a43f">
13000 <td class="paramname" id="rpipfc589021f094c10a4eb7">id_out</td>
13001 <td id="rpipba0764a7cd574c615e05">a pointer to a <a class="el" href="structpico__unique__board__id__t.html" title="Unique board identifier." id="rpipabd5fb66f51150b5caad">pico_unique_board_id_t</a> struct, to which the identifier will be written </td>
13010 <a id="ga14fc6ab3ef89570b7dddff13e1b49634" name="ga14fc6ab3ef89570b7dddff13e1b49634"></a>
13012 <div class="sect3">
13013 <h4 id="rpipe20237a2a3f6601cb4f1">
13014 <a class="anchor" href="#rpipe20237a2a3f6601cb4f1"></a>◆ pico_get_unique_board_id_string()</h4>
13015 <div class="memitem" id="rpip93b169b561e1bdc1993c">
13016 <div class="memproto" id="rpipe1b5fde2a1a922e41aba">
13017 <table class="memname" id="rpipa60dab43b75f47cfe6a6">
13018 <tr id="rpip8512c06735ffc6bac798">
13019 <td class="memname" id="rpipab036eb912cb9d78ae1b">void pico_get_unique_board_id_string </td>
13020 <td id="rpip6865dcadc1400c53e4fb">(</td>
13021 <td class="paramtype" id="rpip5a12294e90ce68429a53">char *Â </td>
13022 <td class="paramname" id="rpipb38dd800415a07e5b385">
13023 <em id="rpip09ead8cbfcf25bed7d02">id_out</em>, </td>
13025 <tr id="rpipc08fd6b73c221c0220be">
13026 <td class="paramkey" id="rpip66186d907719df4502fd"></td>
13027 <td id="rpip865ad86f5c93cc85587d"></td>
13028 <td class="paramtype" id="rpip13d6c9dcb54fde9ea482">uint </td>
13029 <td class="paramname" id="rpipfd2fb250ff34258f94d3">
13030 <em id="rpip19a9e452a0d5be23f943">len</em>Â </td>
13032 <tr id="rpip7eb79340f2dbb551e748">
13033 <td id="rpip6a321ccccae399dce1d1"></td>
13034 <td id="rpip48eeeffbdffb0beef709">)</td>
13035 <td id="rpip1a665a58aa154d6567cb"></td>
13036 <td id="rpip20a53a6218a8cfdfa153"></td>
13040 <div class="memdoc" id="rpipd5db5a570d66f76886ec">
13042 <p id="rpipcfedabda3957fe563548">Get unique ID in string format. </p>
13043 <p id="rpip5375ae152cbd63ac3429">Get the unique 64-bit device identifier which was retrieved from the external NOR flash device at boot, formatted as an ASCII hex string. Will always 0-terminate.</p>
13044 <p id="rpipdba00843af32ef3d767b">On PICO_NO_FLASH builds the unique identifier is set to all 0xEE.</p>
13045 <h4 id="rpipbf3299309f577e4dae9d" data-parent-id="rpipf915aa379d819c28aa13" data-target-for="rpipbf3299309f577e4dae9d">Parameters</h4>
13046 <p class="paragraph" id="rpip280429ae29d0efd7e9f1" data-parent-id="rpipf915aa379d819c28aa13" data-target-for="rpip280429ae29d0efd7e9f1">
13048 <table class="params" id="rpipa7277e71994ed7dedd2b">
13049 <tr id="rpipa87d2cf1781e94d7254e">
13050 <td class="paramname" id="rpipf640be73db910e8a2a35">id_out</td>
13051 <td id="rpipd1b06f9e78b9d3bdd950">a pointer to a char buffer of size len, to which the identifier will be written </td>
13053 <tr id="rpipa5e60b5f278d2ab3f334">
13054 <td class="paramname" id="rpip788e37056f1a948ba163">len</td>
13055 <td id="rpip724744e6930882573e48">the size of id_out. For full serial, len >= 2 * PICO_UNIQUE_BOARD_ID_SIZE_BYTES + 1 </td>
13067 <div class="sect1">
13068 <h2 id="pico_util">
13069 <a class="anchor" href="#pico_util"></a>pico_util</h2>
13070 <div class="sectionbody"></div>
13071 <div class="ingroups" id="rpipdd8d182e2640a5049d24">Part of: <a class="el" href="high_level.html" id="rpip840fd7d8245d302168af">High Level APIs</a>
13073 <p id="rpipbf9e38ffff57b41b1108">Useful data structures and utility functions.
13074 <a href="#ga00f792fa0d539583082c" id="rpip099e29de06db2dd6aca1" data-adjusted="true">More...</a></p>
13075 <div class="sect2">
13076 <h3 id="rpip158b48d2746d665569ba">
13077 <a class="anchor" href="#rpip158b48d2746d665569ba"></a>Modules</h3>
13078 <ul class="memberdecls" id="rpip45bb7596e17657cec328" data-parent-id="rpip434ae76caf34eddcca37">
13079 <li class="memitem">
13080 <p data-target="true" data-target-for="rpip45bb7596e17657cec328"><span class="memItemLeft" data-target="true" id="rpip2c5584bc0b01fb20878e" data-parent-id="rpip45bb7596e17657cec328" data-target-for="rpip2c5584bc0b01fb20878e">Â </span><span class="memItemRight" data-target="true" id="rpip4cc1732b6eeab5acb200" data-parent-id="rpip45bb7596e17657cec328" data-target-for="rpip4cc1732b6eeab5acb200"><a class="el" href="high_level.html#util_datetime" id="rpipd845aaf94f342986199e">datetime</a></span></p>
13082 <li class="memdesc">
13083 <p data-target="true" data-target-for="rpipd32cfbc79b7fc385ac6b"><span class="mdescLeft" data-target="true" id="rpip4aa63b89c3aa5e1d337d" data-parent-id="rpipd32cfbc79b7fc385ac6b" data-target-for="rpip4aa63b89c3aa5e1d337d">Â </span><span class="mdescRight" data-target="true" id="rpipdd0c52b752a8bd0e60c1" data-parent-id="rpipd32cfbc79b7fc385ac6b" data-target-for="rpipdd0c52b752a8bd0e60c1">Date/Time formatting. <br id="rpip236efa6d9235b8b33d11"></span></p>
13085 <li class="memitem">
13086 <p data-target="true" data-target-for="rpipf19c9e8ccd64e2228b81"><span class="memItemLeft" data-target="true" id="rpip83a713cfedeae95a1255" data-parent-id="rpipf19c9e8ccd64e2228b81" data-target-for="rpip83a713cfedeae95a1255">Â </span><span class="memItemRight" data-target="true" id="rpipde096ed6c41e2957fc06" data-parent-id="rpipf19c9e8ccd64e2228b81" data-target-for="rpipde096ed6c41e2957fc06"><a class="el" href="high_level.html#util_pheap" id="rpipac0f60706452a2615447">pheap</a></span></p>
13088 <li class="memitem">
13089 <p data-target="true" data-target-for="rpipd3bd0e9e9d14ac980861"><span class="memItemLeft" data-target="true" id="rpipef993a45e274de934ec9" data-parent-id="rpipd3bd0e9e9d14ac980861" data-target-for="rpipef993a45e274de934ec9">Â </span><span class="memItemRight" data-target="true" id="rpipf70861aabdbeb9465355" data-parent-id="rpipd3bd0e9e9d14ac980861" data-target-for="rpipf70861aabdbeb9465355"><a class="el" href="high_level.html#queue" id="rpip24f87da56e3c25ada0ea">queue</a></span></p>
13092 <a name="details" id="ga00f792fa0d539583082c"></a>
13094 <div class="sect2">
13095 <h3 id="rpip8dab79e9dfcc333468bf">
13096 <a class="anchor" href="#rpip8dab79e9dfcc333468bf"></a>Detailed Description</h3>
13097 <p id="rpip6cc5f6309c6db033fe56">Useful data structures and utility functions. </p>
13099 <div class="sect2">
13100 <h3 id="util_datetime">
13101 <a class="anchor" href="#util_datetime"></a>datetime</h3>
13102 <div class="ingroups" id="rpip7ffc7a598f822ed69b70">Part of: <a class="el" href="high_level.html" id="rpip619aac593dc362e60ba0">High Level APIs</a> » <a class="el" href="high_level.html#pico_util" id="rpip1ebd001313a3ed2de953">pico_util</a>
13104 <p id="rpipe68a645b1bba59cd3d01">Date/Time formatting.
13105 <a href="#gaf55600316167eb09e83a" id="rpipda0b240d3ff1a4f8fb07" data-adjusted="true">More...</a></p>
13106 <div class="sect3">
13107 <h4 id="rpipd188af5d7c7934d3e9cb">
13108 <a class="anchor" href="#rpipd188af5d7c7934d3e9cb"></a>Data Structures</h4>
13109 <ul class="memberdecls" id="rpipf677207e136863142a2c" data-parent-id="rpip6b42e0e3884ba73de221">
13110 <li class="memitem">
13111 <p data-target="true" data-target-for="rpipf677207e136863142a2c"><span class="memItemLeft" data-target="true" id="rpip2740388632fb22fce9cd" data-parent-id="rpipf677207e136863142a2c" data-target-for="rpip2740388632fb22fce9cd">struct  </span><span class="memItemRight" data-target="true" id="rpipa2b6a89a7a41c840265c" data-parent-id="rpipf677207e136863142a2c" data-target-for="rpipa2b6a89a7a41c840265c"><a class="el" href="structdatetime__t.html" id="rpip97c01a3d7868747a780c">datetime_t</a></span></p>
13113 <li class="memdesc">
13114 <p data-target="true" data-target-for="rpip12b0fcda29e149fb0c3b"><span class="mdescLeft" data-target="true" id="rpip272ff6983a428276e860" data-parent-id="rpip12b0fcda29e149fb0c3b" data-target-for="rpip272ff6983a428276e860">Â </span><span class="mdescRight" data-target="true" id="rpipc36815f4d2a4dae5316c" data-parent-id="rpip12b0fcda29e149fb0c3b" data-target-for="rpipc36815f4d2a4dae5316c">Structure containing date and time information. <a href="structdatetime__t.html#details" id="rpip220b947be4dc403485e3" data-adjusted="true">More...</a><br id="rpip8f1d4627ad17971b7ebf"></span></p>
13118 <div class="sect3">
13119 <h4 id="rpip14f743449a06bd291246">
13120 <a class="anchor" href="#rpip14f743449a06bd291246"></a>Functions</h4>
13121 <ul class="memberdecls" id="rpipfb2eb710d1307ce05f22" data-parent-id="rpip0bcf1efc6109b823eb04">
13122 <li class="memitem">
13123 <p data-target="true" data-target-for="rpipfb2eb710d1307ce05f22"><span class="memItemLeft" data-target="true" id="rpip88c32adcb77578528339" data-parent-id="rpipfb2eb710d1307ce05f22" data-target-for="rpip88c32adcb77578528339">void </span><span class="memItemRight" data-target="true" id="rpipd7e081efbdb892343383" data-parent-id="rpipfb2eb710d1307ce05f22" data-target-for="rpipd7e081efbdb892343383"><a class="el" href="#gacc29111f908e091fa44b1b674f32f49e" id="rpip8a9b47263e6f4a832286" data-adjusted="true">datetime_to_str</a> (char *buf, uint buf_size, const <a class="el" href="structdatetime__t.html" id="rpip77a9de5cf2f913c1265a">datetime_t</a> *t)</span></p>
13125 <li class="memdesc">
13126 <p data-target="true" data-target-for="rpipf18d773dd26f63bc0dcc"><span class="mdescLeft" data-target="true" id="rpip6cbd9a87922b8c30107f" data-parent-id="rpipf18d773dd26f63bc0dcc" data-target-for="rpip6cbd9a87922b8c30107f">Â </span><span class="mdescRight" data-target="true" id="rpipfda37c7a15cb458a7040" data-parent-id="rpipf18d773dd26f63bc0dcc" data-target-for="rpipfda37c7a15cb458a7040">Convert a <a class="el" href="structdatetime__t.html" title="Structure containing date and time information." id="rpip9db907b3f6cbee5544b9">datetime_t</a> structure to a string. <br id="rpip4272fb7cf53fd40792de"></span></p>
13129 <a name="details" id="gaf55600316167eb09e83a"></a>
13131 <div class="sect3">
13132 <h4 id="rpip4f996616acd28e1c030c">
13133 <a class="anchor" href="#rpip4f996616acd28e1c030c"></a>Detailed Description</h4>
13134 <p id="rpipddbc06f320f91252e9ab">Date/Time formatting. </p>
13136 <div class="sect3">
13137 <h4 id="rpipa2502af9ec09e815e52c">
13138 <a class="anchor" href="#rpipa2502af9ec09e815e52c"></a>Function Documentation</h4>
13139 <a id="gacc29111f908e091fa44b1b674f32f49e" name="gacc29111f908e091fa44b1b674f32f49e"></a>
13140 <div class="sect4">
13141 <h5 id="rpipf208ccba221010e63338">
13142 <a class="anchor" href="#rpipf208ccba221010e63338"></a>◆ datetime_to_str()</h5>
13143 <div class="memitem" id="rpip5925c7c7ebcc18a56eb9">
13144 <div class="memproto" id="rpip8eed4ab61404ca0fb584">
13145 <table class="memname" id="rpip88009194f5d8f5e44ecd">
13146 <tr id="rpip436b63c01bae53cb24b3">
13147 <td class="memname" id="rpip216f0338fc73269e8905">void datetime_to_str </td>
13148 <td id="rpipad3f82090cbba8177a73">(</td>
13149 <td class="paramtype" id="rpipdeb53b4455c840482529">char *Â </td>
13150 <td class="paramname" id="rpip6098cbea6fbf6e61c86f">
13151 <em id="rpip1d9b7d73b1a65964f219">buf</em>, </td>
13153 <tr id="rpip5270092e154703486fb5">
13154 <td class="paramkey" id="rpipa423d63fdcd297072ac2"></td>
13155 <td id="rpip284d312d1bb04e1fa208"></td>
13156 <td class="paramtype" id="rpipfbe5959b78375f6fdf96">uint </td>
13157 <td class="paramname" id="rpipf7c6982b0bcf9449671f">
13158 <em id="rpiped47fe513ff2abfa7ee6">buf_size</em>, </td>
13160 <tr id="rpipbbb2c97868b3eede688e">
13161 <td class="paramkey" id="rpip6ee1483b982a790e48d5"></td>
13162 <td id="rpip1d3250f12a4312b0e8b3"></td>
13163 <td class="paramtype" id="rpip5fc1a309dafa119eda88">const <a class="el" href="structdatetime__t.html" id="rpip2face2edf00c291460d9">datetime_t</a> *Â </td>
13164 <td class="paramname" id="rpip9bcdb9bba254dde60108">
13165 <em id="rpip49c7ca89b7fc25f984f4">t</em>Â </td>
13167 <tr id="rpipd06f27b051403beac693">
13168 <td id="rpip5f09a24cdf2b30c9f533"></td>
13169 <td id="rpip04c64b48143233f994f8">)</td>
13170 <td id="rpip99ad2f2b64ffb99e449c"></td>
13171 <td id="rpip73c6c6e82f5f23cff05e"></td>
13175 <div class="memdoc" id="rpipad6c164c518e8feab3c1">
13177 <p id="rpipd7203a279107fd72e935">Convert a <a class="el" href="structdatetime__t.html" title="Structure containing date and time information." id="rpip30a1b0355be978da7d32">datetime_t</a> structure to a string. </p>
13178 <h4 id="rpipd1fa273b244ee619254d" data-parent-id="rpipbaeedc516d9f258619d0" data-target-for="rpipd1fa273b244ee619254d">Parameters</h4>
13179 <p class="paragraph" id="rpipb1fe2a7fd42d9a08d293" data-parent-id="rpipbaeedc516d9f258619d0" data-target-for="rpipb1fe2a7fd42d9a08d293">
13181 <table class="params" id="rpip93f8180a175b5d0bd77b">
13182 <tr id="rpip2c4b41bdef188a06c07e">
13183 <td class="paramname" id="rpip963018b33c95c5105891">buf</td>
13184 <td id="rpip978c80bed4c5f5972bdc">character buffer to accept generated string </td>
13186 <tr id="rpip888cd13c80f412074e72">
13187 <td class="paramname" id="rpipd74779f475a21c6d8135">buf_size</td>
13188 <td id="rpipd582e25fba3fd5fe722e">The size of the passed in buffer </td>
13190 <tr id="rpipecc58b1a82a9ab5e22da">
13191 <td class="paramname" id="rpip901bc03057eb473606de">t</td>
13192 <td id="rpip36bc1cf969068bbd0bc1">The datetime to be converted. </td>
13204 <div class="sect2">
13205 <h3 id="util_pheap">
13206 <a class="anchor" href="#util_pheap"></a>pheap</h3>
13207 <div class="ingroups" id="rpip6e5460d58c9e5d330871">Part of: <a class="el" href="high_level.html" id="rpipb04026f36dae7d8658ba">High Level APIs</a> » <a class="el" href="high_level.html#pico_util" id="rpipc7913151e80c06bee83c">pico_util</a>
13209 <p id="rpip3515002a75d5cc545444">Pairing Heap Implementation</p>
13210 <p id="rpip2bf077a4a0342a865b71">pheap defines a simple pairing heap. The implementation simply tracks array indexes, it is up to the user to provide storage for heap entries and a comparison function.</p>
13211 <p id="rpipcc4e97ae8fe6f462bf4a">NOTE: This class is not safe for concurrent usage. It should be externally protected. Furthermore if used concurrently, the caller needs to protect around their use of the returned id. For example, ph_remove_and_free_head returns the id of an element that is no longer in the heap. The user can still use this to look at the data in their companion array, however obviously further operations on the heap may cause them to overwrite that data as the id may be reused on subsequent operations </p>
13213 <div class="sect2">
13215 <a class="anchor" href="#queue"></a>queue</h3>
13216 <div class="ingroups" id="rpipdedae469f277b6e0f664">Part of: <a class="el" href="high_level.html" id="rpip79a9dcdb9b26c675d1d1">High Level APIs</a> » <a class="el" href="high_level.html#pico_util" id="rpip16abbf75a41c416d66da">pico_util</a>
13218 <div class="sect3">
13219 <h4 id="rpipff80a1497ee91d276ec7">
13220 <a class="anchor" href="#rpipff80a1497ee91d276ec7"></a>Functions</h4>
13221 <ul class="memberdecls" id="rpipc4b69c873f3bc1da9f4e" data-parent-id="rpipc108cac71e260eda9783">
13222 <li class="memitem">
13223 <p data-target="true" data-target-for="rpipc4b69c873f3bc1da9f4e"><span class="memItemLeft" data-target="true" id="rpip5d7ea1b4232f82ecb729" data-parent-id="rpipc4b69c873f3bc1da9f4e" data-target-for="rpip5d7ea1b4232f82ecb729">void </span><span class="memItemRight" data-target="true" id="rpipae9c3301e19b3bdeca60" data-parent-id="rpipc4b69c873f3bc1da9f4e" data-target-for="rpipae9c3301e19b3bdeca60"><a class="el" href="#ga6b379b09df9ac326e3c07a2727b7ca96" id="rpip7340c94b7888f4066533" data-adjusted="true">queue_init_with_spinlock</a> (<a class="el" href="structqueue__t.html" id="rpip5982a00f8a8d37c9efce">queue_t</a> *q, uint element_size, uint element_count, uint spinlock_num)</span></p>
13225 <li class="memdesc">
13226 <p data-target="true" data-target-for="rpip3f95f2bdf0f26466a039"><span class="mdescLeft" data-target="true" id="rpip67b973d65c4e8647118b" data-parent-id="rpip3f95f2bdf0f26466a039" data-target-for="rpip67b973d65c4e8647118b">Â </span><span class="mdescRight" data-target="true" id="rpipfb638bb375dfd5e8750a" data-parent-id="rpip3f95f2bdf0f26466a039" data-target-for="rpipfb638bb375dfd5e8750a">Initialise a queue with a specific spinlock for concurrency protection. <br id="rpip95d88016bcd767c6f363"></span></p>
13228 <li class="memitem">
13229 <p data-target="true" data-target-for="rpip6716351dec6e19bb267e"><span class="memItemLeft" data-target="true" id="rpip26fbe86e3c02fa6854d3" data-parent-id="rpip6716351dec6e19bb267e" data-target-for="rpip26fbe86e3c02fa6854d3">static void </span><span class="memItemRight" data-target="true" id="rpip8bcd65441719e97b43df" data-parent-id="rpip6716351dec6e19bb267e" data-target-for="rpip8bcd65441719e97b43df"><a class="el" href="#ga0aa8e36b5c51158d836e16c5be2b9925" id="rpipa51ea4901887c66a8771" data-adjusted="true">queue_init</a> (<a class="el" href="structqueue__t.html" id="rpip79bed726b68c5da23f11">queue_t</a> *q, uint element_size, uint element_count)</span></p>
13231 <li class="memdesc">
13232 <p data-target="true" data-target-for="rpip34d32da9f66be3e8f211"><span class="mdescLeft" data-target="true" id="rpipb2be2404d6cbc6143ae7" data-parent-id="rpip34d32da9f66be3e8f211" data-target-for="rpipb2be2404d6cbc6143ae7">Â </span><span class="mdescRight" data-target="true" id="rpip3138825cd7d941865c76" data-parent-id="rpip34d32da9f66be3e8f211" data-target-for="rpip3138825cd7d941865c76">Initialise a queue, allocating a (possibly shared) spinlock. <br id="rpip7a658a78361d21fefe5e"></span></p>
13234 <li class="memitem">
13235 <p data-target="true" data-target-for="rpip48a8ae29fc85b1b2e02b"><span class="memItemLeft" data-target="true" id="rpip87de95d414c73666d085" data-parent-id="rpip48a8ae29fc85b1b2e02b" data-target-for="rpip87de95d414c73666d085">void </span><span class="memItemRight" data-target="true" id="rpipeea0014f37d4f0f32031" data-parent-id="rpip48a8ae29fc85b1b2e02b" data-target-for="rpipeea0014f37d4f0f32031"><a class="el" href="#gaa13034dd0decdb0faf1b863383560be2" id="rpipcda407d70d4a687d8582" data-adjusted="true">queue_free</a> (<a class="el" href="structqueue__t.html" id="rpipd58131a3f5d8c3c8c897">queue_t</a> *q)</span></p>
13237 <li class="memdesc">
13238 <p data-target="true" data-target-for="rpipbfca043004615cc01613"><span class="mdescLeft" data-target="true" id="rpip5ba6c64d53977c8c6f9e" data-parent-id="rpipbfca043004615cc01613" data-target-for="rpip5ba6c64d53977c8c6f9e">Â </span><span class="mdescRight" data-target="true" id="rpipe3ead147f9c5cca41f8e" data-parent-id="rpipbfca043004615cc01613" data-target-for="rpipe3ead147f9c5cca41f8e">Destroy the specified queue. <br id="rpip7c51c3092147a4164d9b"></span></p>
13240 <li class="memitem">
13241 <p data-target="true" data-target-for="rpip66623dd6d0b3ead8395d"><span class="memItemLeft" data-target="true" id="rpip2b12c7352b3378f56887" data-parent-id="rpip66623dd6d0b3ead8395d" data-target-for="rpip2b12c7352b3378f56887">static uint </span><span class="memItemRight" data-target="true" id="rpipd481039425a18da5c3ad" data-parent-id="rpip66623dd6d0b3ead8395d" data-target-for="rpipd481039425a18da5c3ad"><a class="el" href="#ga2ebf4d2dec7ad019b03c2994defdf046" id="rpipde8920129c1278f8c3c8" data-adjusted="true">queue_get_level_unsafe</a> (<a class="el" href="structqueue__t.html" id="rpipa974854c7de375ef408a">queue_t</a> *q)</span></p>
13243 <li class="memdesc">
13244 <p data-target="true" data-target-for="rpipf6bc0531301371010ff5"><span class="mdescLeft" data-target="true" id="rpip1f37c97b1f7125915623" data-parent-id="rpipf6bc0531301371010ff5" data-target-for="rpip1f37c97b1f7125915623">Â </span><span class="mdescRight" data-target="true" id="rpip5bc383fd94dafbf776f3" data-parent-id="rpipf6bc0531301371010ff5" data-target-for="rpip5bc383fd94dafbf776f3">Unsafe check of level of the specified queue. <br id="rpip6852dca24183b50f0693"></span></p>
13246 <li class="memitem">
13247 <p data-target="true" data-target-for="rpipd55f0fbb5bb07b370ed2"><span class="memItemLeft" data-target="true" id="rpipfc1d33726f056f28df95" data-parent-id="rpipd55f0fbb5bb07b370ed2" data-target-for="rpipfc1d33726f056f28df95">static uint </span><span class="memItemRight" data-target="true" id="rpip854abec6bbd90927a413" data-parent-id="rpipd55f0fbb5bb07b370ed2" data-target-for="rpip854abec6bbd90927a413"><a class="el" href="#ga5cc5a58d2cac83f33aac5e8bb4e35147" id="rpipab777a907a4280288345" data-adjusted="true">queue_get_level</a> (<a class="el" href="structqueue__t.html" id="rpipb12bf1e74e33703924f5">queue_t</a> *q)</span></p>
13249 <li class="memdesc">
13250 <p data-target="true" data-target-for="rpip1b3bf9e3a100d90ce962"><span class="mdescLeft" data-target="true" id="rpip6d5e44fcf0f05777205d" data-parent-id="rpip1b3bf9e3a100d90ce962" data-target-for="rpip6d5e44fcf0f05777205d">Â </span><span class="mdescRight" data-target="true" id="rpip42f9a461f9b7df30f0df" data-parent-id="rpip1b3bf9e3a100d90ce962" data-target-for="rpip42f9a461f9b7df30f0df">Check of level of the specified queue. <br id="rpip7ff3b5934045072b65b6"></span></p>
13252 <li class="memitem">
13253 <p data-target="true" data-target-for="rpip87909d83a1a775c53e28"><span class="memItemLeft" data-target="true" id="rpip51f16ee1b7d69b2b89a5" data-parent-id="rpip87909d83a1a775c53e28" data-target-for="rpip51f16ee1b7d69b2b89a5">static bool </span><span class="memItemRight" data-target="true" id="rpip969c0c0636346f6dd967" data-parent-id="rpip87909d83a1a775c53e28" data-target-for="rpip969c0c0636346f6dd967"><a class="el" href="#ga8456f240608d3e58e5323bedadaeebe2" id="rpipa39c9e16e5a0fd455701" data-adjusted="true">queue_is_empty</a> (<a class="el" href="structqueue__t.html" id="rpipd5dddeb310b5b4c2875b">queue_t</a> *q)</span></p>
13255 <li class="memdesc">
13256 <p data-target="true" data-target-for="rpip1bf04e306a136af96e59"><span class="mdescLeft" data-target="true" id="rpip407a8fbaa3123129f0d3" data-parent-id="rpip1bf04e306a136af96e59" data-target-for="rpip407a8fbaa3123129f0d3">Â </span><span class="mdescRight" data-target="true" id="rpip87af73a3ce7d077a0a4d" data-parent-id="rpip1bf04e306a136af96e59" data-target-for="rpip87af73a3ce7d077a0a4d">Check if queue is empty. <br id="rpip8ccf6aa012396ff1b313"></span></p>
13258 <li class="memitem">
13259 <p data-target="true" data-target-for="rpipef4805bded1284ed4258"><span class="memItemLeft" data-target="true" id="rpip73354ad501b4c4ef8ae8" data-parent-id="rpipef4805bded1284ed4258" data-target-for="rpip73354ad501b4c4ef8ae8">static bool </span><span class="memItemRight" data-target="true" id="rpipa695082fa07302283e5a" data-parent-id="rpipef4805bded1284ed4258" data-target-for="rpipa695082fa07302283e5a"><a class="el" href="#gaed8287f549f6065fc89c5b56b9f9212e" id="rpip7cf0df9af440fd073e38" data-adjusted="true">queue_is_full</a> (<a class="el" href="structqueue__t.html" id="rpip114ba82e50abb2903df4">queue_t</a> *q)</span></p>
13261 <li class="memdesc">
13262 <p data-target="true" data-target-for="rpip4da13254fe583c5e1775"><span class="mdescLeft" data-target="true" id="rpip1b89cb798321b30b0d7f" data-parent-id="rpip4da13254fe583c5e1775" data-target-for="rpip1b89cb798321b30b0d7f">Â </span><span class="mdescRight" data-target="true" id="rpip782811a81d732772ea11" data-parent-id="rpip4da13254fe583c5e1775" data-target-for="rpip782811a81d732772ea11">Check if queue is full. <br id="rpipd4efae900136f607d93f"></span></p>
13264 <li class="memitem">
13265 <p data-target="true" data-target-for="rpip355237593a81d680b9cd"><span class="memItemLeft" data-target="true" id="rpipd1aaddfb5f5cb848fa80" data-parent-id="rpip355237593a81d680b9cd" data-target-for="rpipd1aaddfb5f5cb848fa80">bool </span><span class="memItemRight" data-target="true" id="rpip55d58841ab1143d3c0ab" data-parent-id="rpip355237593a81d680b9cd" data-target-for="rpip55d58841ab1143d3c0ab"><a class="el" href="#ga42ddfda77fa6e9c6292deda62d993ae3" id="rpipea4367d4d7f4b60c6f2c" data-adjusted="true">queue_try_add</a> (<a class="el" href="structqueue__t.html" id="rpip3f0362bc059a028890fa">queue_t</a> *q, const void *data)</span></p>
13267 <li class="memdesc">
13268 <p data-target="true" data-target-for="rpipb931707f426ed2303284"><span class="mdescLeft" data-target="true" id="rpip9ceda6432eb2acbf6c19" data-parent-id="rpipb931707f426ed2303284" data-target-for="rpip9ceda6432eb2acbf6c19">Â </span><span class="mdescRight" data-target="true" id="rpipfc9b535d706e8840c052" data-parent-id="rpipb931707f426ed2303284" data-target-for="rpipfc9b535d706e8840c052">Non-blocking add value queue if not full. <br id="rpip83b0de63cb9c57ed33ed"></span></p>
13270 <li class="memitem">
13271 <p data-target="true" data-target-for="rpip54d95ee6422f8ae2ce8d"><span class="memItemLeft" data-target="true" id="rpip6ae0a44313d2473ac53f" data-parent-id="rpip54d95ee6422f8ae2ce8d" data-target-for="rpip6ae0a44313d2473ac53f">bool </span><span class="memItemRight" data-target="true" id="rpip92e5d3c2da54c2187035" data-parent-id="rpip54d95ee6422f8ae2ce8d" data-target-for="rpip92e5d3c2da54c2187035"><a class="el" href="#ga31806423ac9c0b39ee7bb6473aa8d253" id="rpip7515a8faa57967be1e2f" data-adjusted="true">queue_try_remove</a> (<a class="el" href="structqueue__t.html" id="rpip3a81d656d93dc392bd97">queue_t</a> *q, void *data)</span></p>
13273 <li class="memdesc">
13274 <p data-target="true" data-target-for="rpipf5d3d0376374a52d7c18"><span class="mdescLeft" data-target="true" id="rpip100a05151b7520b95ba6" data-parent-id="rpipf5d3d0376374a52d7c18" data-target-for="rpip100a05151b7520b95ba6">Â </span><span class="mdescRight" data-target="true" id="rpip78c78ca102c6aad26470" data-parent-id="rpipf5d3d0376374a52d7c18" data-target-for="rpip78c78ca102c6aad26470">Non-blocking removal of entry from the queue if non empty. <br id="rpipa38a65357875e22b3486"></span></p>
13276 <li class="memitem">
13277 <p data-target="true" data-target-for="rpipfe22458bbeba9831ad4c"><span class="memItemLeft" data-target="true" id="rpip6343e93476d6ede637f1" data-parent-id="rpipfe22458bbeba9831ad4c" data-target-for="rpip6343e93476d6ede637f1">bool </span><span class="memItemRight" data-target="true" id="rpip5107c94a02d19041a11d" data-parent-id="rpipfe22458bbeba9831ad4c" data-target-for="rpip5107c94a02d19041a11d"><a class="el" href="#gab2d65c218a1826243d64f6305417dcc0" id="rpipfd3b24e23111db62ac41" data-adjusted="true">queue_try_peek</a> (<a class="el" href="structqueue__t.html" id="rpipa9a46fb66648efdb9c67">queue_t</a> *q, void *data)</span></p>
13279 <li class="memdesc">
13280 <p data-target="true" data-target-for="rpip5cb65269c4aa02f184c1"><span class="mdescLeft" data-target="true" id="rpip497c960da374b1f1108d" data-parent-id="rpip5cb65269c4aa02f184c1" data-target-for="rpip497c960da374b1f1108d">Â </span><span class="mdescRight" data-target="true" id="rpipf6f91480683ab93087c1" data-parent-id="rpip5cb65269c4aa02f184c1" data-target-for="rpipf6f91480683ab93087c1">Non-blocking peek at the next item to be removed from the queue. <br id="rpip9fecd2073315bd53058a"></span></p>
13282 <li class="memitem">
13283 <p data-target="true" data-target-for="rpip2bb4ddff2743a39d1099"><span class="memItemLeft" data-target="true" id="rpipded0584a02ae4e277694" data-parent-id="rpip2bb4ddff2743a39d1099" data-target-for="rpipded0584a02ae4e277694">void </span><span class="memItemRight" data-target="true" id="rpip1f37fb82580b96150c03" data-parent-id="rpip2bb4ddff2743a39d1099" data-target-for="rpip1f37fb82580b96150c03"><a class="el" href="#gad01f5e5ddf3403416097f31acc2dbeca" id="rpip03fbcae817a31a574005" data-adjusted="true">queue_add_blocking</a> (<a class="el" href="structqueue__t.html" id="rpip2ec4f0811e08873bfc3d">queue_t</a> *q, const void *data)</span></p>
13285 <li class="memdesc">
13286 <p data-target="true" data-target-for="rpip6ae4cc363fa1d6adadf0"><span class="mdescLeft" data-target="true" id="rpip294636b48b0312fe1d06" data-parent-id="rpip6ae4cc363fa1d6adadf0" data-target-for="rpip294636b48b0312fe1d06">Â </span><span class="mdescRight" data-target="true" id="rpip31e8a241c22b9670f2cf" data-parent-id="rpip6ae4cc363fa1d6adadf0" data-target-for="rpip31e8a241c22b9670f2cf">Blocking add of value to queue. <br id="rpip0b6242dd549d3d16ad0f"></span></p>
13288 <li class="memitem">
13289 <p data-target="true" data-target-for="rpip85a40c1e16a536b5ce6a"><span class="memItemLeft" data-target="true" id="rpipa493b9c32ae0141fbb1e" data-parent-id="rpip85a40c1e16a536b5ce6a" data-target-for="rpipa493b9c32ae0141fbb1e">void </span><span class="memItemRight" data-target="true" id="rpipa82eeb45c8b0ad029510" data-parent-id="rpip85a40c1e16a536b5ce6a" data-target-for="rpipa82eeb45c8b0ad029510"><a class="el" href="#ga97fb187c127e26935b37785692d1776b" id="rpip778f254d6adf962a8525" data-adjusted="true">queue_remove_blocking</a> (<a class="el" href="structqueue__t.html" id="rpip02864b08b525bbbf6f79">queue_t</a> *q, void *data)</span></p>
13291 <li class="memdesc">
13292 <p data-target="true" data-target-for="rpipdd85dbae11170a2fdf41"><span class="mdescLeft" data-target="true" id="rpip5b7f1c0676b123c4e534" data-parent-id="rpipdd85dbae11170a2fdf41" data-target-for="rpip5b7f1c0676b123c4e534">Â </span><span class="mdescRight" data-target="true" id="rpipb6bdb0a736eb5d049ccc" data-parent-id="rpipdd85dbae11170a2fdf41" data-target-for="rpipb6bdb0a736eb5d049ccc">Blocking remove entry from queue. <br id="rpipc90d7959bad82b25fde7"></span></p>
13294 <li class="memitem">
13295 <p data-target="true" data-target-for="rpip1b34d18c8f2ee8308dd6"><span class="memItemLeft" data-target="true" id="rpip02eafcd6dd10a95d8041" data-parent-id="rpip1b34d18c8f2ee8308dd6" data-target-for="rpip02eafcd6dd10a95d8041">void </span><span class="memItemRight" data-target="true" id="rpip1ba2e79ab2019cce6223" data-parent-id="rpip1b34d18c8f2ee8308dd6" data-target-for="rpip1ba2e79ab2019cce6223"><a class="el" href="#ga104ec5baa82c9635163a511df7abf124" id="rpip6514b69913f429cec656" data-adjusted="true">queue_peek_blocking</a> (<a class="el" href="structqueue__t.html" id="rpipa1933f16b4b89cbf9306">queue_t</a> *q, void *data)</span></p>
13297 <li class="memdesc">
13298 <p data-target="true" data-target-for="rpipd2e52a1f44f5ebc1e658"><span class="mdescLeft" data-target="true" id="rpipad257b9c100f290df61a" data-parent-id="rpipd2e52a1f44f5ebc1e658" data-target-for="rpipad257b9c100f290df61a">Â </span><span class="mdescRight" data-target="true" id="rpip6e258197fead5d155da7" data-parent-id="rpipd2e52a1f44f5ebc1e658" data-target-for="rpip6e258197fead5d155da7">Blocking peek at next value to be removed from queue. <br id="rpip2651be515c9cdd827269"></span></p>
13301 <a name="details" id="details"></a>
13303 <div class="sect3">
13304 <h4 id="rpipcd4cb1a999552dd5be80">
13305 <a class="anchor" href="#rpipcd4cb1a999552dd5be80"></a>Detailed Description</h4>
13306 <p id="rpip29aeefbe346efdd038f2">Multi-core and IRQ safe queue implementation.</p>
13307 <p id="rpipb8340b5a98e95a96f944">Note that this queue stores values of a specified size, and pushed values are copied into the queue </p>
13309 <div class="sect3">
13310 <h4 id="rpipf04374e3500861b8efd8">
13311 <a class="anchor" href="#rpipf04374e3500861b8efd8"></a>Function Documentation</h4>
13312 <a id="gad01f5e5ddf3403416097f31acc2dbeca" name="gad01f5e5ddf3403416097f31acc2dbeca"></a>
13313 <div class="sect4">
13314 <h5 id="rpip794a12ac82c64a6a7ae8">
13315 <a class="anchor" href="#rpip794a12ac82c64a6a7ae8"></a>◆ queue_add_blocking()</h5>
13316 <div class="memitem" id="rpipca13de1b4b93f58957e8">
13317 <div class="memproto" id="rpipdbb728c8441e75a91d62">
13318 <table class="memname" id="rpipdd85324b9e3bdf9c347b">
13319 <tr id="rpipcb8f54aa48b5027ca1c5">
13320 <td class="memname" id="rpip751715dadfe2589036b5">void queue_add_blocking </td>
13321 <td id="rpip40f71aeb4fb13b5240aa">(</td>
13322 <td class="paramtype" id="rpip97f17f3b5abce2c9e6a4">
13323 <a class="el" href="structqueue__t.html" id="rpip41821429ab97fdab9915">queue_t</a> *Â </td>
13324 <td class="paramname" id="rpip67261adbb5b907830107">
13325 <em id="rpip9b8450a5b4579f680889">q</em>, </td>
13327 <tr id="rpip2d596f56ce61bd100cd0">
13328 <td class="paramkey" id="rpip2291b1bafd163d3fb220"></td>
13329 <td id="rpipb304a7a2f8f037c90c36"></td>
13330 <td class="paramtype" id="rpip8aedbeef6235e7e7cbb3">const void *Â </td>
13331 <td class="paramname" id="rpip4d79d597152838959ef9">
13332 <em id="rpip67f50a98199a7fff2c97">data</em>Â </td>
13334 <tr id="rpip7312a69672b477ca6a54">
13335 <td id="rpip27b31f765d070f6d1a37"></td>
13336 <td id="rpip50a4f2109de390e52bbd">)</td>
13337 <td id="rpip28c101a2e2f7025cb1ce"></td>
13338 <td id="rpip1afdef55ca23e85eb1c9"></td>
13342 <div class="memdoc" id="rpip6ffb1e433432c2029f01">
13344 <p id="rpip20e048399030aea10a21">Blocking add of value to queue. </p>
13345 <h4 id="rpipf089c67b15db7928c355" data-parent-id="rpipe5db05fbcda8f314c9a6" data-target-for="rpipf089c67b15db7928c355">Parameters</h4>
13346 <p class="paragraph" id="rpipdfecdd6444effe440657" data-parent-id="rpipe5db05fbcda8f314c9a6" data-target-for="rpipdfecdd6444effe440657">
13348 <table class="params" id="rpip9832322359da38f140f1">
13349 <tr id="rpipe17446d3e65ea316d471">
13350 <td class="paramname" id="rpipf7bfd0568d6c2a0c8867">q</td>
13351 <td id="rpipdf86fed0efe3128182b4">Pointer to a <a class="el" href="structqueue__t.html" id="rpipb600e285ff8ce6a0e542">queue_t</a> structure, used as a handle </td>
13353 <tr id="rpipe5d0ce036c0d2ab4c808">
13354 <td class="paramname" id="rpip90a7b28a4cec8767ed03">data</td>
13355 <td id="rpip2b6ca3a83f5f0f48dc83">Pointer to value to be copied into the queue</td>
13361 <p id="rpip6ee9f7c14fd806c9e9ed">If the queue is full this function will block, until a removal happens on the queue </p>
13365 <a id="gaa13034dd0decdb0faf1b863383560be2" name="gaa13034dd0decdb0faf1b863383560be2"></a>
13367 <div class="sect4">
13368 <h5 id="rpip9a49e1b34f29832d2c43">
13369 <a class="anchor" href="#rpip9a49e1b34f29832d2c43"></a>◆ queue_free()</h5>
13370 <div class="memitem" id="rpipd1a21cd6487e6940f4da">
13371 <div class="memproto" id="rpip0ee264c2f873e092c729">
13372 <table class="memname" id="rpipa4953c39ada5dc916eff">
13373 <tr id="rpip70fb4dadf5ab61e642ba">
13374 <td class="memname" id="rpip28b854064cb272ada0e7">void queue_free </td>
13375 <td id="rpip7b4090e3f6142f06f8e2">(</td>
13376 <td class="paramtype" id="rpipd4ec2815e2ba2881999a">
13377 <a class="el" href="structqueue__t.html" id="rpip2cdda5a48874975a14fd">queue_t</a> *Â </td>
13378 <td class="paramname" id="rpip25330c22fa9a16624dfa"><em id="rpipb1061bb67a18403e22d0">q</em></td>
13379 <td id="rpip7c4bd50f9d40d94b9ec7">)</td>
13380 <td id="rpip369daff5d40413222211"></td>
13384 <div class="memdoc" id="rpip951416698a03eeb73d9b">
13386 <p id="rpip2b16b160b2bd36f12019">Destroy the specified queue. </p>
13387 <h4 id="rpipd9f67d7aef2ed04000ff" data-parent-id="rpipc1121ff5c6522348a474" data-target-for="rpipd9f67d7aef2ed04000ff">Parameters</h4>
13388 <p class="paragraph" id="rpip2b6e1c2adf667cf189ef" data-parent-id="rpipc1121ff5c6522348a474" data-target-for="rpip2b6e1c2adf667cf189ef">
13390 <table class="params" id="rpip844ce35de5015d290caa">
13391 <tr id="rpipf8bc8407b6a455676cc3">
13392 <td class="paramname" id="rpip79769146375d7dc4c8e9">q</td>
13393 <td id="rpipfc8011c12bb472f0ea63">Pointer to a <a class="el" href="structqueue__t.html" id="rpipf564d2ab97459f0b4c29">queue_t</a> structure, used as a handle</td>
13399 <p id="rpip6e097694a61da865d5ec">Does not deallocate the <a class="el" href="structqueue__t.html" id="rpipa18a146c70aac6d93dcb">queue_t</a> structure itself. </p>
13403 <a id="ga5cc5a58d2cac83f33aac5e8bb4e35147" name="ga5cc5a58d2cac83f33aac5e8bb4e35147"></a>
13405 <div class="sect4">
13406 <h5 id="rpipdfca826a47f047c4dfb7">
13407 <a class="anchor" href="#rpipdfca826a47f047c4dfb7"></a>◆ queue_get_level()</h5>
13408 <div class="memitem" id="rpip74f57d8f31c6545031cc">
13409 <div class="memproto" id="rpip70147438875421dec731">
13410 <table class="mlabels" id="rpip1730b4a7f362398bbbb5">
13411 <tr id="rpipd43acd2ccbf2ed8927f2">
13412 <td class="mlabels-left" id="rpipb94856e1b6e76f516781">
13413 <table class="memname" id="rpipb61925c116decc0fb491">
13414 <tr id="rpip128cebce4a2f3b17bf94">
13415 <td class="memname" id="rpip0ffd28d40396fe462e4c">static uint queue_get_level </td>
13416 <td id="rpip7d195b10eee5a0ac7190">(</td>
13417 <td class="paramtype" id="rpipcadcd747c95f9c2a8313">
13418 <a class="el" href="structqueue__t.html" id="rpip939ccbe1edbb6c62f447">queue_t</a> *Â </td>
13419 <td class="paramname" id="rpipa3cb1b23dfc866aeda4a"><em id="rpip788d402a7bfb361c5431">q</em></td>
13420 <td id="rpip0fb8bf5304e829b26aa7">)</td>
13421 <td id="rpip75c1f1fc79e2141cb146"></td>
13425 <td class="mlabels-right" id="rpipec861bb50d497faf6d57">
13426 <span class="mlabels" id="rpipd919e703c61499d1f494"><span class="mlabel" id="rpip10780ca2e385e13833e0">inline</span><span class="mlabel" id="rpip1579a8fd863ecf6cad0b">static</span></span> </td>
13430 <div class="memdoc" id="rpip59f2ef615d046963d4e8">
13432 <p id="rpip0450d4776c8524a2ad65">Check of level of the specified queue. </p>
13433 <h4 id="rpipa7ffcb5b536fd522866f" data-parent-id="rpip061b0dbfd4069783389b" data-target-for="rpipa7ffcb5b536fd522866f">Parameters</h4>
13434 <p class="paragraph" id="rpip9d3bb48c4d0858371640" data-parent-id="rpip061b0dbfd4069783389b" data-target-for="rpip9d3bb48c4d0858371640">
13436 <table class="params" id="rpipf41aa3376795fe559f38">
13437 <tr id="rpip7952020a80f92564ec1b">
13438 <td class="paramname" id="rpipcd099dafa84b8bb3fcf7">q</td>
13439 <td id="rpip4d8e507447f73d9d1f68">Pointer to a <a class="el" href="structqueue__t.html" id="rpipb900bbcfe47ab22ce39f">queue_t</a> structure, used as a handle </td>
13445 <h4 class="label" id="rpip6a45ca51b392ea8c49f1" data-parent-id="rpip6e378cc92a98be12eebb" data-target-for="rpip6a45ca51b392ea8c49f1">Returns</h4>
13446 <p class="returns" id="rpip5ac5b7193876f7e94e17" data-parent-id="rpip6e378cc92a98be12eebb" data-target-for="rpip5ac5b7193876f7e94e17">Number of entries in the queue </p>
13450 <a id="ga2ebf4d2dec7ad019b03c2994defdf046" name="ga2ebf4d2dec7ad019b03c2994defdf046"></a>
13452 <div class="sect4">
13453 <h5 id="rpipa4ef41f00c4d44e1b64b">
13454 <a class="anchor" href="#rpipa4ef41f00c4d44e1b64b"></a>◆ queue_get_level_unsafe()</h5>
13455 <div class="memitem" id="rpip232747a7bd18ab1044d8">
13456 <div class="memproto" id="rpip3bfeedb9b6830ff79415">
13457 <table class="mlabels" id="rpip626e68830a8a94da0630">
13458 <tr id="rpipce061633d2c03ab2e59e">
13459 <td class="mlabels-left" id="rpip46c477b09b61f83bf41b">
13460 <table class="memname" id="rpipc2b2b69a9e416e25b335">
13461 <tr id="rpipd8ddb098bfab1d5df207">
13462 <td class="memname" id="rpipd54edf1316f4c919218b">static uint queue_get_level_unsafe </td>
13463 <td id="rpip9147ff1f1d63c6b1e98c">(</td>
13464 <td class="paramtype" id="rpip104188cd9a4c8c3dd6e7">
13465 <a class="el" href="structqueue__t.html" id="rpipb810bbb1da9b8e5ad992">queue_t</a> *Â </td>
13466 <td class="paramname" id="rpip0a135569c15b1d186eca"><em id="rpip9289140b2d4fdd8dcfd5">q</em></td>
13467 <td id="rpip4b854eb3f2075e1a9296">)</td>
13468 <td id="rpip77fb9822fae3cc300079"></td>
13472 <td class="mlabels-right" id="rpip1047da6ba87fa60bd020">
13473 <span class="mlabels" id="rpip343a06eb4d2b7227210d"><span class="mlabel" id="rpipcdf26da8fa09c1c39511">inline</span><span class="mlabel" id="rpip47454c0819713a3adab7">static</span></span> </td>
13477 <div class="memdoc" id="rpip49be366d9e51f0ec958d">
13479 <p id="rpip1a90b1bca724f202e696">Unsafe check of level of the specified queue. </p>
13480 <h4 id="rpip46bcb01b6aa173746fff" data-parent-id="rpip27b821f8146274417e67" data-target-for="rpip46bcb01b6aa173746fff">Parameters</h4>
13481 <p class="paragraph" id="rpip7ab23fc5ab5d442e8cd4" data-parent-id="rpip27b821f8146274417e67" data-target-for="rpip7ab23fc5ab5d442e8cd4">
13483 <table class="params" id="rpipced9e6a1b76f8f0d31c6">
13484 <tr id="rpip63ef2bb8f41f7d51eb7b">
13485 <td class="paramname" id="rpip69d87ef1cf906c1456e8">q</td>
13486 <td id="rpipae1ce6846ce12958176a">Pointer to a <a class="el" href="structqueue__t.html" id="rpipdc4f65a4c7eeedb5063f">queue_t</a> structure, used as a handle </td>
13492 <h4 class="label" id="rpip06771b03d4f1f56106aa" data-parent-id="rpipf11452c5e4573a609b04" data-target-for="rpip06771b03d4f1f56106aa">Returns</h4>
13493 <p class="returns" id="rpip2c84a6f1709a539a3ce5" data-parent-id="rpipf11452c5e4573a609b04" data-target-for="rpip2c84a6f1709a539a3ce5">Number of entries in the queue</p>
13494 <p id="rpip6744e30e783ffdd2cdc8">This does not use the spinlock, so may return incorrect results if the spin lock is not externally locked </p>
13498 <a id="ga0aa8e36b5c51158d836e16c5be2b9925" name="ga0aa8e36b5c51158d836e16c5be2b9925"></a>
13500 <div class="sect4">
13501 <h5 id="rpip7e48a8477ef1f1400a51">
13502 <a class="anchor" href="#rpip7e48a8477ef1f1400a51"></a>◆ queue_init()</h5>
13503 <div class="memitem" id="rpipeba16d5d649fbc0af33d">
13504 <div class="memproto" id="rpip4b81e1a2959ce1fb6034">
13505 <table class="mlabels" id="rpip59f1b3232249a3d33b8a">
13506 <tr id="rpipd193b269a40828b3f645">
13507 <td class="mlabels-left" id="rpip135a3d6847e99bcb1016">
13508 <table class="memname" id="rpipf36648fbaf90cf37dc6b">
13509 <tr id="rpipfe6201f1d5b829c290e4">
13510 <td class="memname" id="rpip20017aa0913a00f9be17">static void queue_init </td>
13511 <td id="rpip40f5a25cb6d8257eb40b">(</td>
13512 <td class="paramtype" id="rpip3efc972552ebe8deae5d">
13513 <a class="el" href="structqueue__t.html" id="rpip1d13af70d50b2ac0e87a">queue_t</a> *Â </td>
13514 <td class="paramname" id="rpipbeb6965ffbfc4697fc34">
13515 <em id="rpipeb3eb128e37daca44ae5">q</em>, </td>
13517 <tr id="rpipec3be9f52cbe70827ece">
13518 <td class="paramkey" id="rpip0d236beafd7387ad816e"></td>
13519 <td id="rpip0d24f29d0b183d039d29"></td>
13520 <td class="paramtype" id="rpip6e16ba4a0f2eb49c3117">uint </td>
13521 <td class="paramname" id="rpipecb59032cfe2c19eb336">
13522 <em id="rpipa7e37c7c76fe36877c91">element_size</em>, </td>
13524 <tr id="rpipbc88e4b7ed107d5089b8">
13525 <td class="paramkey" id="rpip32cf2bafed49cbde08f8"></td>
13526 <td id="rpip64b6b55e2e0f0d3b1bd9"></td>
13527 <td class="paramtype" id="rpip30466c450a0f6d8f55e5">uint </td>
13528 <td class="paramname" id="rpip9701ee0b95a3968d2005">
13529 <em id="rpip36588df5785c8dbda653">element_count</em>Â </td>
13531 <tr id="rpipca5e556769db69f2b784">
13532 <td id="rpip89848d7b67d8ad7169ac"></td>
13533 <td id="rpip62c4b267322e5327e73a">)</td>
13534 <td id="rpip855e9da8891391c2166c"></td>
13535 <td id="rpip4f3b239bd85e799ad0cb"></td>
13539 <td class="mlabels-right" id="rpip36481321489dcf97801f">
13540 <span class="mlabels" id="rpipd7380066dcd8654843e8"><span class="mlabel" id="rpipf8973b891df6829e53c4">inline</span><span class="mlabel" id="rpipefd7764d56ba20dc6e8f">static</span></span> </td>
13544 <div class="memdoc" id="rpip20461f93c19fcd837e51">
13546 <p id="rpip33360cd6215c7c3a0cbf">Initialise a queue, allocating a (possibly shared) spinlock. </p>
13547 <h4 id="rpip68b54ba6ea19a225e74b" data-parent-id="rpipdb45ecde1dd056a87bac" data-target-for="rpip68b54ba6ea19a225e74b">Parameters</h4>
13548 <p class="paragraph" id="rpip7683bbb2d6ae6ff95e37" data-parent-id="rpipdb45ecde1dd056a87bac" data-target-for="rpip7683bbb2d6ae6ff95e37">
13550 <table class="params" id="rpip23afdc8385bd09d995c9">
13551 <tr id="rpip08ef2369188f505f41bd">
13552 <td class="paramname" id="rpipf63e1ed04caf5bc67a8a">q</td>
13553 <td id="rpip6866329dad790ff109ef">Pointer to a <a class="el" href="structqueue__t.html" id="rpipba5d3c2f0248c161cb95">queue_t</a> structure, used as a handle </td>
13555 <tr id="rpipb102447faa1196e84111">
13556 <td class="paramname" id="rpip28942f85d454a00b3c98">element_size</td>
13557 <td id="rpipa108156f248e4ff086d9">Size of each value in the queue </td>
13559 <tr id="rpip7da1f08fdeaa48865ecd">
13560 <td class="paramname" id="rpip2b1e98991a8a2d298541">element_count</td>
13561 <td id="rpipe9a42e04d9172d6c3e27">Maximum number of entries in the queue </td>
13570 <a id="ga6b379b09df9ac326e3c07a2727b7ca96" name="ga6b379b09df9ac326e3c07a2727b7ca96"></a>
13572 <div class="sect4">
13573 <h5 id="rpipcb5ec908c8751a7b2869">
13574 <a class="anchor" href="#rpipcb5ec908c8751a7b2869"></a>◆ queue_init_with_spinlock()</h5>
13575 <div class="memitem" id="rpip013ec3ec2f14e9db029c">
13576 <div class="memproto" id="rpipbb5a228f67552afdd075">
13577 <table class="memname" id="rpip58c2964d8a0a8ac7855c">
13578 <tr id="rpipc0e5f5fb5aa5ab9ba7b9">
13579 <td class="memname" id="rpip83ddd025e6c835833fd6">void queue_init_with_spinlock </td>
13580 <td id="rpip76044baa61bb744842bb">(</td>
13581 <td class="paramtype" id="rpip5bc7561c47897ed235c8">
13582 <a class="el" href="structqueue__t.html" id="rpip8b5017dab7a17392b47f">queue_t</a> *Â </td>
13583 <td class="paramname" id="rpip75fcf03a7fcab1da9d19">
13584 <em id="rpip84f6c520996d41174fe5">q</em>, </td>
13586 <tr id="rpip4a4657f9246db137060c">
13587 <td class="paramkey" id="rpipf927f49b237122bafcf3"></td>
13588 <td id="rpipd81bc6a77f287d2a3844"></td>
13589 <td class="paramtype" id="rpip95f57a82b018eb49ec98">uint </td>
13590 <td class="paramname" id="rpip8d1c22ee9348261fb0a4">
13591 <em id="rpipb26253041f0fcf83ee66">element_size</em>, </td>
13593 <tr id="rpipc74326f34092776c86b1">
13594 <td class="paramkey" id="rpip073347405eb7da026926"></td>
13595 <td id="rpip69db9ae0d803df3ff40b"></td>
13596 <td class="paramtype" id="rpip03d826ad83b88248921d">uint </td>
13597 <td class="paramname" id="rpip64b768f5fe196938053e">
13598 <em id="rpip599ce290e0f87e69ac0b">element_count</em>, </td>
13600 <tr id="rpip5d9eb34083efe34ec81a">
13601 <td class="paramkey" id="rpip45230d7e40f3473e0429"></td>
13602 <td id="rpipce9d1cfe72efe4c8f872"></td>
13603 <td class="paramtype" id="rpip8c16628201618b99c1f6">uint </td>
13604 <td class="paramname" id="rpipa39e2d620d58ca751c60">
13605 <em id="rpipd2d258a60eed9fe4f9a5">spinlock_num</em>Â </td>
13607 <tr id="rpip1cbd8ca9a4d8dccc46c8">
13608 <td id="rpipc2ddb60593d04b4dc517"></td>
13609 <td id="rpip70450b14d794dd241e98">)</td>
13610 <td id="rpip073a676758edd0204249"></td>
13611 <td id="rpip766684cc12c2b39089a0"></td>
13615 <div class="memdoc" id="rpip6f1b1111dfd1a6e71f7d">
13617 <p id="rpipd767e24515e1e7c6ee0e">Initialise a queue with a specific spinlock for concurrency protection. </p>
13618 <h4 id="rpipbcbe837e870a782360ed" data-parent-id="rpipa60522ed747f0cd3ffde" data-target-for="rpipbcbe837e870a782360ed">Parameters</h4>
13619 <p class="paragraph" id="rpip513d7b33cc0bbe7abc73" data-parent-id="rpipa60522ed747f0cd3ffde" data-target-for="rpip513d7b33cc0bbe7abc73">
13621 <table class="params" id="rpip531e43f8a5cd034c6d68">
13622 <tr id="rpip70f248ad19e5e2c5a557">
13623 <td class="paramname" id="rpip6e8724d663b817561213">q</td>
13624 <td id="rpipf66c7fb3c51121ee0803">Pointer to a <a class="el" href="structqueue__t.html" id="rpipf40f9a723cc32e65044f">queue_t</a> structure, used as a handle </td>
13626 <tr id="rpip8eace83bb3d190fd99c2">
13627 <td class="paramname" id="rpipfe11e755faa0cf3b68aa">element_size</td>
13628 <td id="rpipeb3daaae5418e2919b4b">Size of each value in the queue </td>
13630 <tr id="rpip5f453d0e7b2d92638624">
13631 <td class="paramname" id="rpip4a2471fe6c60c8af1f1d">element_count</td>
13632 <td id="rpip3978b5deff290dde7b64">Maximum number of entries in the queue </td>
13634 <tr id="rpip4441c7fc22cdb064a81e">
13635 <td class="paramname" id="rpipa08bca3032f4a753f7c3">spinlock_num</td>
13636 <td id="rpip363e50c3f287879c32f8">The spin ID used to protect the queue </td>
13645 <a id="ga8456f240608d3e58e5323bedadaeebe2" name="ga8456f240608d3e58e5323bedadaeebe2"></a>
13647 <div class="sect4">
13648 <h5 id="rpipc0fea9112d800bc6615f">
13649 <a class="anchor" href="#rpipc0fea9112d800bc6615f"></a>◆ queue_is_empty()</h5>
13650 <div class="memitem" id="rpipd640426240a8ff47d27c">
13651 <div class="memproto" id="rpipf41ce8e62653bb198012">
13652 <table class="mlabels" id="rpipc2e98de3d027123d6199">
13653 <tr id="rpip8e32d6041f8c93fcac46">
13654 <td class="mlabels-left" id="rpip5006fc178f6ac60319da">
13655 <table class="memname" id="rpip5e12407384477a0d9b20">
13656 <tr id="rpip3836de0ccb4d71a7aa4f">
13657 <td class="memname" id="rpip0eaac1b270ce73ca7200">static bool queue_is_empty </td>
13658 <td id="rpip022c8fd30fbaf506594e">(</td>
13659 <td class="paramtype" id="rpip468f389bfc5e3b0d0f11">
13660 <a class="el" href="structqueue__t.html" id="rpipe46ec9588d84300ef38b">queue_t</a> *Â </td>
13661 <td class="paramname" id="rpip5db8fc95c9171605b74b"><em id="rpip9cf0feee66df4cc970ca">q</em></td>
13662 <td id="rpipc155a6c006e492cded11">)</td>
13663 <td id="rpipe469f193b2bed0ab956d"></td>
13667 <td class="mlabels-right" id="rpipedcafc04fc719b8fb54c">
13668 <span class="mlabels" id="rpip77a5523328dfa889b8b2"><span class="mlabel" id="rpip3601e1b2a72dd69b82cb">inline</span><span class="mlabel" id="rpip462681595f661b1cd6b2">static</span></span> </td>
13672 <div class="memdoc" id="rpip1dcf9f631a83a14d23df">
13674 <p id="rpip57bbe55a7a7716218e63">Check if queue is empty. </p>
13675 <h4 id="rpip58cd8a957d64d970ea06" data-parent-id="rpip4092767a012936621baa" data-target-for="rpip58cd8a957d64d970ea06">Parameters</h4>
13676 <p class="paragraph" id="rpipbc9f341ec0e2bba1b108" data-parent-id="rpip4092767a012936621baa" data-target-for="rpipbc9f341ec0e2bba1b108">
13678 <table class="params" id="rpip3d6ce636833adbbcc41b">
13679 <tr id="rpip6ebe8fac742fc269314d">
13680 <td class="paramname" id="rpip4fdd38aece78b83cdf2a">q</td>
13681 <td id="rpipe86b555d4354e19458e5">Pointer to a <a class="el" href="structqueue__t.html" id="rpip1cb5034a6e2df731ad69">queue_t</a> structure, used as a handle </td>
13687 <h4 class="label" id="rpipa2a2e53a7ff582cbdb28" data-parent-id="rpipc2c32c28f4120c905946" data-target-for="rpipa2a2e53a7ff582cbdb28">Returns</h4>
13688 <p class="returns" id="rpipf6d17b138c425a180483" data-parent-id="rpipc2c32c28f4120c905946" data-target-for="rpipf6d17b138c425a180483">true if queue is empty, false otherwise</p>
13689 <p id="rpipe61412d88d6f059625ea">This function is interrupt and multicore safe. </p>
13693 <a id="gaed8287f549f6065fc89c5b56b9f9212e" name="gaed8287f549f6065fc89c5b56b9f9212e"></a>
13695 <div class="sect4">
13696 <h5 id="rpip3e625007a792da32c2b4">
13697 <a class="anchor" href="#rpip3e625007a792da32c2b4"></a>◆ queue_is_full()</h5>
13698 <div class="memitem" id="rpip124f04aee95c34138f5a">
13699 <div class="memproto" id="rpipa77946f2229baa7e45c4">
13700 <table class="mlabels" id="rpip39f3117471d11999a250">
13701 <tr id="rpip34b8e8dd21889f2aef83">
13702 <td class="mlabels-left" id="rpip3d0e73c0fea678e0cd56">
13703 <table class="memname" id="rpip7577d1947a62c48bcaef">
13704 <tr id="rpip8d3bd49f00b1565b55a0">
13705 <td class="memname" id="rpipf3fa653bfc1ae525fd0a">static bool queue_is_full </td>
13706 <td id="rpip55fee6f085c03a7d5de0">(</td>
13707 <td class="paramtype" id="rpip6fb74346818262b6564c">
13708 <a class="el" href="structqueue__t.html" id="rpipd9832a7e7fbaff40ab55">queue_t</a> *Â </td>
13709 <td class="paramname" id="rpipfec28ee2e27f631b8921"><em id="rpipe48419e7a329bcce80ed">q</em></td>
13710 <td id="rpipba0d95c28f4384fb4b6a">)</td>
13711 <td id="rpip2500bd033a4ff5c8cd43"></td>
13715 <td class="mlabels-right" id="rpipf19a009920f2e986fbae">
13716 <span class="mlabels" id="rpip94e6c04c7ec53b1a5a3d"><span class="mlabel" id="rpip3b0c4ab08ea2a626fe6f">inline</span><span class="mlabel" id="rpip8dece4cea17019e8858f">static</span></span> </td>
13720 <div class="memdoc" id="rpip706a36f0c52fa3c6da3b">
13722 <p id="rpipd70ebaacb536f8a0a9de">Check if queue is full. </p>
13723 <h4 id="rpip2444dcdefcb8e7f2daad" data-parent-id="rpip94bdd5ad80ce4d6203c7" data-target-for="rpip2444dcdefcb8e7f2daad">Parameters</h4>
13724 <p class="paragraph" id="rpip5b6e80e384e76abcd49e" data-parent-id="rpip94bdd5ad80ce4d6203c7" data-target-for="rpip5b6e80e384e76abcd49e">
13726 <table class="params" id="rpipb7e8dbedd8f3cb462e53">
13727 <tr id="rpipc5e4b7d7fb58abb03338">
13728 <td class="paramname" id="rpip9f7856a8ff488078f5c1">q</td>
13729 <td id="rpip53320b91b01f12d54ed2">Pointer to a <a class="el" href="structqueue__t.html" id="rpipa6c7a64d9b85e4c13183">queue_t</a> structure, used as a handle </td>
13735 <h4 class="label" id="rpipa17ea72710e2a2f283f7" data-parent-id="rpip8653b85b935c8b6b546c" data-target-for="rpipa17ea72710e2a2f283f7">Returns</h4>
13736 <p class="returns" id="rpip83e1d0fa025c3b8bd383" data-parent-id="rpip8653b85b935c8b6b546c" data-target-for="rpip83e1d0fa025c3b8bd383">true if queue is full, false otherwise</p>
13737 <p id="rpip15f6b2945abe27ad3011">This function is interrupt and multicore safe. </p>
13741 <a id="ga104ec5baa82c9635163a511df7abf124" name="ga104ec5baa82c9635163a511df7abf124"></a>
13743 <div class="sect4">
13744 <h5 id="rpip68c90b9e574048e17920">
13745 <a class="anchor" href="#rpip68c90b9e574048e17920"></a>◆ queue_peek_blocking()</h5>
13746 <div class="memitem" id="rpip230df489a4b5dde2d9da">
13747 <div class="memproto" id="rpip1c630ea1aeb24d4732e1">
13748 <table class="memname" id="rpip28d0d03c2fb39cc46481">
13749 <tr id="rpipc3fb579bab6deb77040f">
13750 <td class="memname" id="rpip6c3560d5db56865f9082">void queue_peek_blocking </td>
13751 <td id="rpipa37568c58f551afffbce">(</td>
13752 <td class="paramtype" id="rpip7d5a2a924164d28650ed">
13753 <a class="el" href="structqueue__t.html" id="rpip6f76abff1395bba788be">queue_t</a> *Â </td>
13754 <td class="paramname" id="rpip41ac52e321ea6a096632">
13755 <em id="rpipe9fe5d40214ff55a225e">q</em>, </td>
13757 <tr id="rpip83a43c5d3ba82437873e">
13758 <td class="paramkey" id="rpip81fdeb62d34731d5348d"></td>
13759 <td id="rpip8307d2813c1fd4f40bfd"></td>
13760 <td class="paramtype" id="rpip644265f17ec3065ba3ca">void *Â </td>
13761 <td class="paramname" id="rpipc751287787cfc1bca430">
13762 <em id="rpipf797ef4e6794fb48ee31">data</em>Â </td>
13764 <tr id="rpip22e38cd337ffb436c8ab">
13765 <td id="rpip37132ed45b93f0e55f42"></td>
13766 <td id="rpip43b506bde8722c39974f">)</td>
13767 <td id="rpip02a5d4e18fb515ce99e3"></td>
13768 <td id="rpip4a556f8e3b19e23336e3"></td>
13772 <div class="memdoc" id="rpipfa767341eb3efdc80bdc">
13774 <p id="rpipdf2d8df236f38d0fb524">Blocking peek at next value to be removed from queue. </p>
13775 <h4 id="rpip429d95a345ed139ef7ad" data-parent-id="rpip13079eaf7b3bdbabb706" data-target-for="rpip429d95a345ed139ef7ad">Parameters</h4>
13776 <p class="paragraph" id="rpipeafe1c59fee0edf5884b" data-parent-id="rpip13079eaf7b3bdbabb706" data-target-for="rpipeafe1c59fee0edf5884b">
13778 <table class="params" id="rpip42d109ee1df6afd7beaf">
13779 <tr id="rpipa555788e624463e090c4">
13780 <td class="paramname" id="rpipde963d668ca032543097">q</td>
13781 <td id="rpip1aa6305d6a49b66c43d7">Pointer to a <a class="el" href="structqueue__t.html" id="rpipfbf6ca1f47d6a3ede8f4">queue_t</a> structure, used as a handle </td>
13783 <tr id="rpip174b5b9890ab7632dcb0">
13784 <td class="paramname" id="rpipe7145377b9cf8ce586b2">data</td>
13785 <td id="rpip8e3a0a3059ba5044cb33">Pointer to the location to receive the peeked value</td>
13791 <p id="rpip328a7d5b2469abeefd47">If the queue is empty function will block until a value is added </p>
13795 <a id="ga97fb187c127e26935b37785692d1776b" name="ga97fb187c127e26935b37785692d1776b"></a>
13797 <div class="sect4">
13798 <h5 id="rpip53726a8e464b82f39aa7">
13799 <a class="anchor" href="#rpip53726a8e464b82f39aa7"></a>◆ queue_remove_blocking()</h5>
13800 <div class="memitem" id="rpip5fb99dec8e07234f0b4a">
13801 <div class="memproto" id="rpipa295c49adad6405bae8c">
13802 <table class="memname" id="rpip4405e3c37feae171db8e">
13803 <tr id="rpip4639b569bf19d2afc2b5">
13804 <td class="memname" id="rpip3bc44a1a11ef358c66da">void queue_remove_blocking </td>
13805 <td id="rpip7c84cf08c6e52b9a34ab">(</td>
13806 <td class="paramtype" id="rpipdf2dfd0ac7bd459e6413">
13807 <a class="el" href="structqueue__t.html" id="rpipce83612745c18d71c0e5">queue_t</a> *Â </td>
13808 <td class="paramname" id="rpipf1e9ca19d886f3680385">
13809 <em id="rpipc6793162a9ff3ec12f0a">q</em>, </td>
13811 <tr id="rpip61e767d2bbe715e8a99b">
13812 <td class="paramkey" id="rpip064626e8863edd1f1e40"></td>
13813 <td id="rpip0825d2eb38ed3a8152e0"></td>
13814 <td class="paramtype" id="rpip87cec33b141e392a0e0c">void *Â </td>
13815 <td class="paramname" id="rpip05681e307da271a5d623">
13816 <em id="rpipb132fa85f0593d400d09">data</em>Â </td>
13818 <tr id="rpip667d3cf0474a2d78c63a">
13819 <td id="rpip9e46bb2ee2e11d0eebef"></td>
13820 <td id="rpip614cfe2809c2e0caf49f">)</td>
13821 <td id="rpipdd410de9be0c6ada7aa6"></td>
13822 <td id="rpip1dd5bbf140578d891510"></td>
13826 <div class="memdoc" id="rpipd3873c5ffc32237168a0">
13828 <p id="rpipcd2ef658b3bb40b119bf">Blocking remove entry from queue. </p>
13829 <h4 id="rpipa5258e849c8e1b1a36d7" data-parent-id="rpip8d86b9288e07d6348ffd" data-target-for="rpipa5258e849c8e1b1a36d7">Parameters</h4>
13830 <p class="paragraph" id="rpip4de6d886c46ed838f2e6" data-parent-id="rpip8d86b9288e07d6348ffd" data-target-for="rpip4de6d886c46ed838f2e6">
13832 <table class="params" id="rpip22d1f935af73a1d21580">
13833 <tr id="rpipfee2aabba4a7ac923676">
13834 <td class="paramname" id="rpip6495a6f48a004e9f02a4">q</td>
13835 <td id="rpip4720f215754da4f424cc">Pointer to a <a class="el" href="structqueue__t.html" id="rpipbf81c517b68548703b4b">queue_t</a> structure, used as a handle </td>
13837 <tr id="rpipf71cdd550dad0d526c47">
13838 <td class="paramname" id="rpipdf8677c6c06eafcdfe1c">data</td>
13839 <td id="rpip20505c613043d7eda63e">Pointer to the location to receive the removed value</td>
13845 <p id="rpip262a73513f4315be219a">If the queue is empty this function will block until a value is added. </p>
13849 <a id="ga42ddfda77fa6e9c6292deda62d993ae3" name="ga42ddfda77fa6e9c6292deda62d993ae3"></a>
13851 <div class="sect4">
13852 <h5 id="rpipc9b616fc7f0959bceef5">
13853 <a class="anchor" href="#rpipc9b616fc7f0959bceef5"></a>◆ queue_try_add()</h5>
13854 <div class="memitem" id="rpip14aae57f3cce6d10cfe7">
13855 <div class="memproto" id="rpip4f3c1febbace03f4296d">
13856 <table class="memname" id="rpip663c35a60052502cf332">
13857 <tr id="rpip9f918f3a3c699cb42a1a">
13858 <td class="memname" id="rpipbb0165ff40b96ae00572">bool queue_try_add </td>
13859 <td id="rpipb4780d47a205deed422f">(</td>
13860 <td class="paramtype" id="rpipdffcd65d2a179a770770">
13861 <a class="el" href="structqueue__t.html" id="rpipea8fd84c23c49f0d79c0">queue_t</a> *Â </td>
13862 <td class="paramname" id="rpip45b1c9d8499193b01e6e">
13863 <em id="rpipbb5b33ae1e6aaae9a893">q</em>, </td>
13865 <tr id="rpip521b45ae9bdf19e0348d">
13866 <td class="paramkey" id="rpip8e4b471559f7363ad57f"></td>
13867 <td id="rpipd6af30d38714e443fcb1"></td>
13868 <td class="paramtype" id="rpip7030ebf4d19f96210e70">const void *Â </td>
13869 <td class="paramname" id="rpip7550db60f6dc9f1427aa">
13870 <em id="rpip110386f55b25b3b9c7e3">data</em>Â </td>
13872 <tr id="rpip9c70959b57e001e58e6a">
13873 <td id="rpip01b9bfb21959b01da5e6"></td>
13874 <td id="rpip3271a988bfbf36680129">)</td>
13875 <td id="rpipd46c6791f1f6c5a9590a"></td>
13876 <td id="rpipc6a9ebd9fc0e611b1506"></td>
13880 <div class="memdoc" id="rpipd7ef729435c76c56f117">
13882 <p id="rpip74677196ea810c6e786c">Non-blocking add value queue if not full. </p>
13883 <h4 id="rpipebd8011caed63b4690e2" data-parent-id="rpip8d561e58cabb9ae66117" data-target-for="rpipebd8011caed63b4690e2">Parameters</h4>
13884 <p class="paragraph" id="rpip8e0c256580e57d8e3db0" data-parent-id="rpip8d561e58cabb9ae66117" data-target-for="rpip8e0c256580e57d8e3db0">
13886 <table class="params" id="rpip7cc1703a66cfbe9f8ad9">
13887 <tr id="rpipfe0b135c5069e34d5d87">
13888 <td class="paramname" id="rpip0c2eaa0dfb1672b114dc">q</td>
13889 <td id="rpipc6d3b3b55a87354b7ee6">Pointer to a <a class="el" href="structqueue__t.html" id="rpip49789efbbbb3d4a44678">queue_t</a> structure, used as a handle </td>
13891 <tr id="rpipfc5d4ba1af72d052a141">
13892 <td class="paramname" id="rpipfb231e3c2cedffa22d59">data</td>
13893 <td id="rpip4f2f1c42822056cbbf43">Pointer to value to be copied into the queue </td>
13899 <h4 class="label" id="rpip4439c406939e14e7355c" data-parent-id="rpip922639805f93c34e0d62" data-target-for="rpip4439c406939e14e7355c">Returns</h4>
13900 <p class="returns" id="rpip69f81c7f74129e0bbfa0" data-parent-id="rpip922639805f93c34e0d62" data-target-for="rpip69f81c7f74129e0bbfa0">true if the value was added</p>
13901 <p id="rpip3ffe26f48e27011a6729">If the queue is full this function will return immediately with false, otherwise the data is copied into a new value added to the queue, and this function will return true. </p>
13905 <a id="gab2d65c218a1826243d64f6305417dcc0" name="gab2d65c218a1826243d64f6305417dcc0"></a>
13907 <div class="sect4">
13908 <h5 id="rpip2708c73838c804ef7bcf">
13909 <a class="anchor" href="#rpip2708c73838c804ef7bcf"></a>◆ queue_try_peek()</h5>
13910 <div class="memitem" id="rpipdc083c88ebd0ad8c704c">
13911 <div class="memproto" id="rpip2ff040b4462d0b50c975">
13912 <table class="memname" id="rpip59018a767b28690ec28f">
13913 <tr id="rpip825d1dd4b2558f99eabc">
13914 <td class="memname" id="rpipea194e1420e17a8425aa">bool queue_try_peek </td>
13915 <td id="rpipde18ad20722c4a8da61b">(</td>
13916 <td class="paramtype" id="rpip464f1b8617f3bfc0fe71">
13917 <a class="el" href="structqueue__t.html" id="rpip625fbf4aa860787d3ca8">queue_t</a> *Â </td>
13918 <td class="paramname" id="rpipd515388314321ef998de">
13919 <em id="rpip41f9fdac37b417764e17">q</em>, </td>
13921 <tr id="rpip7e1beb5dc5c294001d65">
13922 <td class="paramkey" id="rpip4ddc35c000b36d92f0fc"></td>
13923 <td id="rpipa307bf7c98dd5e84d299"></td>
13924 <td class="paramtype" id="rpipb41d11efa827b2056191">void *Â </td>
13925 <td class="paramname" id="rpip112b53f5723e180f014e">
13926 <em id="rpip905225b181284d4dad0b">data</em>Â </td>
13928 <tr id="rpip3a964906b99e80fa57df">
13929 <td id="rpipbae8cc06143114134fba"></td>
13930 <td id="rpip889ccef47ead9d4d1fa8">)</td>
13931 <td id="rpip86ae0e7e54c943846bdd"></td>
13932 <td id="rpip45c460647422db517c85"></td>
13936 <div class="memdoc" id="rpip0517bd15be52aa0e9675">
13938 <p id="rpipc6d0ef4e2fc9ef769d02">Non-blocking peek at the next item to be removed from the queue. </p>
13939 <h4 id="rpip96fc44b3d1aeec727f56" data-parent-id="rpip12a94e183989d3c56fc9" data-target-for="rpip96fc44b3d1aeec727f56">Parameters</h4>
13940 <p class="paragraph" id="rpipa591fa4380201e83c9a3" data-parent-id="rpip12a94e183989d3c56fc9" data-target-for="rpipa591fa4380201e83c9a3">
13942 <table class="params" id="rpip0eb6a156d9f8c678eaf8">
13943 <tr id="rpip1ff051287fa61d801631">
13944 <td class="paramname" id="rpip7caf943bb5b082f43ccc">q</td>
13945 <td id="rpipbbbe3e03aa8ef7aa7bcf">Pointer to a <a class="el" href="structqueue__t.html" id="rpip949bff7ae2a4c390a6a1">queue_t</a> structure, used as a handle </td>
13947 <tr id="rpipe8bdc85443eb26454327">
13948 <td class="paramname" id="rpip2fe9fa6cfec45fac51bd">data</td>
13949 <td id="rpipacde2c6e59fdfb86ba39">Pointer to the location to receive the peeked value </td>
13955 <h4 class="label" id="rpipbd4d3873a7db6fbfb265" data-parent-id="rpip0c0958412cbc9a45ea60" data-target-for="rpipbd4d3873a7db6fbfb265">Returns</h4>
13956 <p class="returns" id="rpipa9d5ba7876a4d542779c" data-parent-id="rpip0c0958412cbc9a45ea60" data-target-for="rpipa9d5ba7876a4d542779c">true if there was a value to peek</p>
13957 <p id="rpipa1582aba7ff116b9cb9a">If the queue is not empty this function will return immediately with true with the peeked entry copied into the location specified by the data parameter, otherwise the function will return false. </p>
13961 <a id="ga31806423ac9c0b39ee7bb6473aa8d253" name="ga31806423ac9c0b39ee7bb6473aa8d253"></a>
13963 <div class="sect4">
13964 <h5 id="rpip006744c3eef524fc1109">
13965 <a class="anchor" href="#rpip006744c3eef524fc1109"></a>◆ queue_try_remove()</h5>
13966 <div class="memitem" id="rpip2a6190d9723da3441844">
13967 <div class="memproto" id="rpip079ba8ede42d549ca9ef">
13968 <table class="memname" id="rpipaa43bb5ef261d4b7a0f6">
13969 <tr id="rpip73bf8258fd016c820c93">
13970 <td class="memname" id="rpip968a44d1d7b4c2e310dc">bool queue_try_remove </td>
13971 <td id="rpip4e20e87065294da397a9">(</td>
13972 <td class="paramtype" id="rpipb48ca33a0f1f36739811">
13973 <a class="el" href="structqueue__t.html" id="rpipebca21454b36c36a202f">queue_t</a> *Â </td>
13974 <td class="paramname" id="rpip3cbf2f86728de2f83208">
13975 <em id="rpip5b985b534891b3f143a9">q</em>, </td>
13977 <tr id="rpipab9b2d54319ae2043989">
13978 <td class="paramkey" id="rpipe004083502269f5903d6"></td>
13979 <td id="rpipec8120bb15f2bd7edc41"></td>
13980 <td class="paramtype" id="rpipaffe153b784b1e8033f6">void *Â </td>
13981 <td class="paramname" id="rpipd44d766d3e3f918afe89">
13982 <em id="rpip77b2089e3f54d024d2c0">data</em>Â </td>
13984 <tr id="rpipf4fe6da068e7fed27c15">
13985 <td id="rpip699fb691d764e4c65045"></td>
13986 <td id="rpip2aeacf8706afb2a3a684">)</td>
13987 <td id="rpip3890993569106c178c50"></td>
13988 <td id="rpipa09a956fa06160754934"></td>
13992 <div class="memdoc" id="rpip5426aad20a5bf6e712cf">
13994 <p id="rpip5e23ae4280b0c40ba972">Non-blocking removal of entry from the queue if non empty. </p>
13995 <h4 id="rpipff25a87789496918ccaf" data-parent-id="rpip19c243b5a340cb76b3dd" data-target-for="rpipff25a87789496918ccaf">Parameters</h4>
13996 <p class="paragraph" id="rpipeb61ac67663610d23ec5" data-parent-id="rpip19c243b5a340cb76b3dd" data-target-for="rpipeb61ac67663610d23ec5">
13998 <table class="params" id="rpipac025a582e4c42015a5b">
13999 <tr id="rpip92c79474d1f0eaa75b3e">
14000 <td class="paramname" id="rpipd1aea13d46d1401259d0">q</td>
14001 <td id="rpip460a29be78b155491bfb">Pointer to a <a class="el" href="structqueue__t.html" id="rpip4ca85b5d85e801e0e368">queue_t</a> structure, used as a handle </td>
14003 <tr id="rpip85178a58c446a4ae9341">
14004 <td class="paramname" id="rpip3e9a949fd36491cf2d8c">data</td>
14005 <td id="rpip19dced4756e61985c97d">Pointer to the location to receive the removed value </td>
14011 <h4 class="label" id="rpip2e495268d127da0fcfbb" data-parent-id="rpip56b6e4b42bb7e413fdd0" data-target-for="rpip2e495268d127da0fcfbb">Returns</h4>
14012 <p class="returns" id="rpip30a2a22f0eb4ed799dcb" data-parent-id="rpip56b6e4b42bb7e413fdd0" data-target-for="rpip30a2a22f0eb4ed799dcb">true if a value was removed</p>
14013 <p id="rpip561eb865e434cfdf3d26">If the queue is not empty function will copy the removed value into the location provided and return immediately with true, otherwise the function will return immediately with false. </p>
14026 <div class="legal">
14027 <div class="legal-inner">
14028 <p id="copyright">Raspberry Pi documentation is copyright © 2012-2023 Raspberry Pi Ltd and is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a> (CC BY-SA) licence.</p>
14029 <p id="copyright">Some content originates from the <a href="http://elinux.org/">eLinux wiki</a>, and is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported</a> licence.</p>
14030 <p id="copyright">The terms HDMI, HDMI High-Definition Multimedia Interface, HDMI trade dress and the HDMI Logos are trademarks or registered trademarks of HDMI Licensing Administrator, Inc</p>
14035 #__rptl-footer .__rptl-footer-link, #__rptl-footer .__rptl-footer-link--with-icon, #__rptl-footer .__rptl-footer-item, #__rptl-footer .__rptl-footer-list, #__rptl-footer .__rptl-footer-heading, #__rptl-footer .__rptl-footer-column, #__rptl-footer .__rptl-footer-row, #__rptl-footer .__rptl-footer-container, #__rptl-footer {
14036 box-sizing: border-box;
14042 vertical-align: baseline;
14047 font-family: "Roboto", sans-serif;
14051 text-rendering: optimizeLegibility;
14052 -webkit-text-size-adjust: 100%;
14053 -moz-text-size-adjust: 100%;
14054 text-size-adjust: 100%;
14055 -webkit-font-smoothing: antialiased;
14056 -moz-osx-font-smoothing: grayscale;
14057 background: #f5f6f9;
14060 #__rptl-footer .__rptl-footer-container {
14063 padding-left: 16px;
14064 padding-right: 16px;
14068 @media (min-width: 800px) {
14069 #__rptl-footer .__rptl-footer-container {
14073 @media (min-width: 1200px) {
14074 #__rptl-footer .__rptl-footer-container {
14078 #__rptl-footer .__rptl-footer-row {
14082 #__rptl-footer .__rptl-footer-column {
14085 padding-right: 8px;
14087 @media (min-width: 640px) {
14088 #__rptl-footer .__rptl-footer-column {
14092 @media (min-width: 1024px) {
14093 #__rptl-footer .__rptl-footer-column {
14097 #__rptl-footer .__rptl-footer-heading {
14100 margin-bottom: 8px;
14102 #__rptl-footer .__rptl-footer-list {
14104 margin-bottom: 32px;
14106 #__rptl-footer .__rptl-footer-item {
14107 margin-bottom: 8px;
14109 #__rptl-footer .__rptl-footer-icon {
14110 margin-right: 0.5em;
14113 #__rptl-footer .__rptl-footer-link, #__rptl-footer .__rptl-footer-link--with-icon {
14116 text-decoration: none;
14118 #__rptl-footer .__rptl-footer-link--with-icon {
14119 display: inline-flex;
14120 align-items: center;
14122 #__rptl-footer .__rptl-footer-link:hover, #__rptl-footer .__rptl-footer-link--with-icon:hover {
14123 text-decoration: underline;
14126 <footer id="__rptl-footer">
14127 <div class="__rptl-footer-container">
14128 <div class="__rptl-footer-row">
14129 <div class="__rptl-footer-column">
14130 <div class="__rptl-footer-heading">Follow us</div>
14131 <ul class="__rptl-footer-list">
14132 <li class="__rptl-footer-item">
14133 <a href="/weekly/" class="__rptl-footer-link--with-icon">
14134 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M1 6v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3a2 2 0 0 0-2 2Zm19.707 10.293a1 1 0 1 1-1.414 1.414L15 13.414l-.515.515a3.518 3.518 0 0 1-4.97 0L9 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L7.586 12 3.293 7.707a1 1 0 0 1 1.414-1.414l5 5 1.222 1.222a1.516 1.516 0 0 0 2.142 0l1.222-1.222 5-5a1 1 0 0 1 1.414 1.414L16.414 12Z"/></svg>
14135 Sign up to newsletter
14138 <li class="__rptl-footer-item">
14139 <a href="https://www.threads.net/@raspberrypi" class="__rptl-footer-link--with-icon">
14140 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192"><path d="M141.537 88.988a66.667 66.667 0 0 0-2.518-1.143c-1.482-27.307-16.403-42.94-41.457-43.1h-.34c-14.986 0-27.449 6.396-35.12 18.036l13.779 9.452c5.73-8.695 14.724-10.548 21.348-10.548h.229c8.249.053 14.474 2.452 18.503 7.129 2.932 3.405 4.893 8.111 5.864 14.05-7.314-1.243-15.224-1.626-23.68-1.14-23.82 1.371-39.134 15.264-38.105 34.568.522 9.792 5.4 18.216 13.735 23.719 7.047 4.652 16.124 6.927 25.557 6.412 12.458-.683 22.231-5.436 29.049-14.127 5.178-6.6 8.453-15.153 9.899-25.93 5.937 3.583 10.337 8.298 12.767 13.966 4.132 9.635 4.373 25.468-8.546 38.376-11.319 11.308-24.925 16.2-45.488 16.351-22.809-.169-40.06-7.484-51.275-21.742C35.236 139.966 29.808 120.682 29.605 96c.203-24.682 5.63-43.966 16.133-57.317C56.954 24.425 74.204 17.11 97.013 16.94c22.975.17 40.526 7.52 52.171 21.847 5.71 7.026 10.015 15.86 12.853 26.162l16.147-4.308c-3.44-12.68-8.853-23.606-16.219-32.668C147.036 9.607 125.202.195 97.07 0h-.113C68.882.194 47.292 9.642 32.788 28.08 19.882 44.485 13.224 67.315 13.001 95.932L13 96v.067c.224 28.617 6.882 51.447 19.788 67.854C47.292 182.358 68.882 191.806 96.957 192h.113c24.96-.173 42.554-6.708 57.048-21.189 18.963-18.945 18.392-42.692 12.142-57.27-4.484-10.454-13.033-18.945-24.723-24.553ZM98.44 129.507c-10.44.588-21.286-4.098-21.82-14.135-.397-7.442 5.296-15.746 22.461-16.735 1.966-.114 3.895-.169 5.79-.169 6.235 0 12.068.606 17.371 1.765-1.978 24.702-13.58 28.713-23.802 29.274Z" /></svg>
14144 <li class="__rptl-footer-item">
14145 <a href="https://raspberrypi.social/@Raspberry_Pi" rel="me" class="__rptl-footer-link--with-icon">
14146 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M11.19 12.195c2.016-.24 3.77-1.475 3.99-2.603.348-1.778.32-4.339.32-4.339 0-3.47-2.286-4.488-2.286-4.488C12.062.238 10.083.017 8.027 0h-.05C5.92.017 3.942.238 2.79.765c0 0-2.285 1.017-2.285 4.488l-.002.662c-.004.64-.007 1.35.011 2.091.083 3.394.626 6.74 3.78 7.57 1.454.383 2.703.463 3.709.408 1.823-.1 2.847-.647 2.847-.647l-.06-1.317s-1.303.41-2.767.36c-1.45-.05-2.98-.156-3.215-1.928a3.614 3.614 0 0 1-.033-.496s1.424.346 3.228.428c1.103.05 2.137-.064 3.188-.189zm1.613-2.47H11.13v-4.08c0-.859-.364-1.295-1.091-1.295-.804 0-1.207.517-1.207 1.541v2.233H7.168V5.89c0-1.024-.403-1.541-1.207-1.541-.727 0-1.091.436-1.091 1.296v4.079H3.197V5.522c0-.859.22-1.541.66-2.046.456-.505 1.052-.764 1.793-.764.856 0 1.504.328 1.933.983L8 4.39l.417-.695c.429-.655 1.077-.983 1.934-.983.74 0 1.336.259 1.791.764.442.505.661 1.187.661 2.046v4.203z"/></svg>
14150 <li class="__rptl-footer-item">
14151 <a href="https://youtube.com/raspberrypi" class="__rptl-footer-link--with-icon">
14152 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.751 15.27V8.73L15.498 12l-5.747 3.27Zm12.783-8.597a2.763 2.763 0 0 0-1.944-1.956C18.876 4.254 12 4.254 12 4.254s-6.876 0-8.59.463a2.763 2.763 0 0 0-1.944 1.956A28.982 28.982 0 0 0 1.006 12a28.982 28.982 0 0 0 .46 5.327 2.763 2.763 0 0 0 1.943 1.956c1.715.463 8.591.463 8.591.463s6.876 0 8.59-.463a2.763 2.763 0 0 0 1.944-1.956 28.98 28.98 0 0 0 .46-5.327 28.98 28.98 0 0 0-.46-5.327Z"/></svg>
14156 <li class="__rptl-footer-item">
14157 <a href="https://www.instagram.com/raspberrypi/" class="__rptl-footer-link--with-icon">
14158 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.25 3.667c2.67 0 2.986.01 4.04.058a5.534 5.534 0 0 1 1.858.344 3.312 3.312 0 0 1 1.898 1.898 5.534 5.534 0 0 1 .344 1.857c.048 1.054.058 1.37.058 4.04s-.01 2.987-.058 4.042a5.534 5.534 0 0 1-.344 1.857 3.312 3.312 0 0 1-1.898 1.897 5.533 5.533 0 0 1-1.857.345c-1.054.048-1.37.058-4.041.058s-2.987-.01-4.04-.058a5.533 5.533 0 0 1-1.858-.345 3.312 3.312 0 0 1-1.898-1.897 5.534 5.534 0 0 1-.344-1.857c-.048-1.055-.058-1.371-.058-4.041s.01-2.987.058-4.041a5.534 5.534 0 0 1 .344-1.857A3.312 3.312 0 0 1 6.352 4.07a5.533 5.533 0 0 1 1.857-.344c1.055-.048 1.37-.058 4.041-.058m0-1.802c-2.716 0-3.056.011-4.123.06A7.34 7.34 0 0 0 5.7 2.39a5.113 5.113 0 0 0-2.925 2.924 7.34 7.34 0 0 0-.465 2.428c-.049 1.066-.06 1.407-.06 4.123s.011 3.056.06 4.123a7.34 7.34 0 0 0 .465 2.427A5.113 5.113 0 0 0 5.7 21.34a7.34 7.34 0 0 0 2.427.465c1.067.048 1.407.06 4.123.06s3.056-.012 4.123-.06a7.34 7.34 0 0 0 2.427-.465 5.113 5.113 0 0 0 2.925-2.925 7.34 7.34 0 0 0 .465-2.427c.048-1.067.06-1.407.06-4.123s-.012-3.057-.06-4.123a7.34 7.34 0 0 0-.465-2.428A5.113 5.113 0 0 0 18.8 2.39a7.34 7.34 0 0 0-2.427-.465c-1.067-.049-1.407-.06-4.123-.06Z"/><path class="cls-1" d="M12.25 6.73a5.135 5.135 0 1 0 5.135 5.135A5.135 5.135 0 0 0 12.25 6.73Zm0 8.468a3.333 3.333 0 1 1 3.333-3.333 3.333 3.333 0 0 1-3.333 3.333Z"/><circle cx="17.588" cy="6.527" r="1.2"/></svg>
14162 <li class="__rptl-footer-item">
14163 <a href="https://www.linkedin.com/company/raspberrypi/" class="__rptl-footer-link--with-icon">
14164 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.435 2.1H3.561a1.445 1.445 0 0 0-1.462 1.426v16.946a1.446 1.446 0 0 0 1.462 1.429h16.874a1.449 1.449 0 0 0 1.466-1.429V3.526A1.448 1.448 0 0 0 20.435 2.1ZM7.972 18.972H5.035v-9.45h2.937ZM6.504 8.23a1.703 1.703 0 1 1 1.702-1.703A1.703 1.703 0 0 1 6.504 8.23Zm12.468 10.742h-2.934v-4.596c0-1.096-.02-2.505-1.527-2.505-1.528 0-1.762 1.193-1.762 2.426v4.675H9.814v-9.45h2.817v1.291h.04a3.086 3.086 0 0 1 2.778-1.526c2.974 0 3.523 1.957 3.523 4.501Z"/></svg>
14168 <li class="__rptl-footer-item">
14169 <a href="https://www.facebook.com/raspberrypi" class="__rptl-footer-link--with-icon">
14170 <svg class="__rptl-footer-icon" aria-hidden="true" focusable="false" width="1.25em" height="1.25em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22 12.06a10 10 0 1 0-11.563 9.88V14.95H7.899v-2.89h2.54V9.858a3.529 3.529 0 0 1 3.777-3.891 15.378 15.378 0 0 1 2.238.195v2.461h-1.26a1.445 1.445 0 0 0-1.63 1.562v1.876h2.773l-.443 2.89h-2.33v6.988A10.002 10.002 0 0 0 22 12.061Z"/></svg>
14176 <div class="__rptl-footer-column">
14177 <div class="__rptl-footer-heading">About Raspberry Pi</div>
14178 <ul class="__rptl-footer-list">
14179 <li class="__rptl-footer-item"><a href="/news/" class="__rptl-footer-link">News</a></li>
14180 <li class="__rptl-footer-item"><a href="/contact/" class="__rptl-footer-link">Contact us</a></li>
14181 <li class="__rptl-footer-item"><a href="/trademark-rules/" class="__rptl-footer-link">Trademark</a></li>
14182 <li class="__rptl-footer-item"><a href="/about/" class="__rptl-footer-link">About us</a></li>
14183 <li class="__rptl-footer-item"><a href="/resellers/" class="__rptl-footer-link">Our Approved Resellers</a></li>
14184 <li class="__rptl-footer-item"><a href="/jobs/" class="__rptl-footer-link">Jobs</a></li>
14185 <li class="__rptl-footer-item"><a href="/accessibility/" class="__rptl-footer-link">Accessibility</a></li>
14186 <li class="__rptl-footer-item"><a href="/terms-and-conditions/" class="__rptl-footer-link">Site use terms and conditions</a></li>
14187 <li class="__rptl-footer-item"><a href="/acceptable-use/" class="__rptl-footer-link">Acceptable use</a></li>
14188 <li class="__rptl-footer-item"><a href="/cookies/" class="__rptl-footer-link">Cookies</a></li>
14189 <li class="__rptl-footer-item"><a href="/licensing/" class="__rptl-footer-link">Licensing</a></li>
14190 <li class="__rptl-footer-item"><a href="/terms-conditions-sale/" class="__rptl-footer-link">Terms and conditions of sale</a></li>
14191 <li class="__rptl-footer-item"><a href="/privacy/" class="__rptl-footer-link">Privacy</a></li>
14192 <li class="__rptl-footer-item"><a href="/contact/security/" class="__rptl-footer-link">Security</a></li>
14193 <li class="__rptl-footer-item"><a href="/verify/" class="__rptl-footer-link">Verify our bank details</a></li>
14196 <div class="__rptl-footer-column">
14197 <div class="__rptl-footer-heading">For home</div>
14198 <ul class="__rptl-footer-list">
14199 <li class="__rptl-footer-item"><a href="/for-home/" class="__rptl-footer-link">Raspberry Pi for home</a></li>
14200 <li class="__rptl-footer-item"><a href="/tutorials/" class="__rptl-footer-link">Tutorials</a></li>
14202 <div class="__rptl-footer-heading">For industry</div>
14203 <ul class="__rptl-footer-list">
14204 <li class="__rptl-footer-item"><a href="/for-industry/" class="__rptl-footer-link">Raspberry Pi for industry</a></li>
14205 <li class="__rptl-footer-item"><a href="/for-industry/thin-clients/" class="__rptl-footer-link">Thin clients</a></li>
14206 <li class="__rptl-footer-item"><a href="/for-industry/space/" class="__rptl-footer-link">Raspberry Pi in space</a></li>
14207 <li class="__rptl-footer-item"><a href="/for-industry/powered-by/" class="__rptl-footer-link">Powered by Raspberry Pi</a></li>
14208 <li class="__rptl-footer-item"><a href="/for-industry/design-partners/" class="__rptl-footer-link">Design partners</a></li>
14209 <li class="__rptl-footer-item"><a href="/success-stories/" class="__rptl-footer-link">Success stories</a></li>
14211 <div class="__rptl-footer-heading">Hardware</div>
14212 <ul class="__rptl-footer-list">
14213 <li class="__rptl-footer-item"><a href="/products/#raspberry-pi-computers-and-microcontrollers" class="__rptl-footer-link">Computers and microcontrollers</a></li>
14214 <li class="__rptl-footer-item"><a href="/products/#cameras-and-displays" class="__rptl-footer-link">Cameras and displays</a></li>
14215 <li class="__rptl-footer-item"><a href="/products/#add-on-boards" class="__rptl-footer-link">Add-on boards</a></li>
14216 <li class="__rptl-footer-item"><a href="/products/#power-supplies-and-cables" class="__rptl-footer-link">Power supplies and cables</a></li>
14217 <li class="__rptl-footer-item"><a href="/products/#cases" class="__rptl-footer-link">Cases</a></li>
14218 <li class="__rptl-footer-item"><a href="/products/#peripherals" class="__rptl-footer-link">Peripherals</a></li>
14220 <div class="__rptl-footer-heading">Software</div>
14221 <ul class="__rptl-footer-list">
14222 <li class="__rptl-footer-item"><a href="/software/operating-systems/#raspberry-pi-os-32-bit" class="__rptl-footer-link">Raspberry Pi OS</a></li>
14223 <li class="__rptl-footer-item"><a href="/software/" class="__rptl-footer-link">Raspberry Pi Imager</a></li>
14224 <li class="__rptl-footer-item"><a href="/software/raspberry-pi-desktop/" class="__rptl-footer-link">Raspberry Pi Desktop</a></li>
14227 <div class="__rptl-footer-column">
14228 <div class="__rptl-footer-heading">Documentation</div>
14229 <ul class="__rptl-footer-list">
14230 <li class="__rptl-footer-item"><a href="/documentation/" class="__rptl-footer-link">All categories</a></li>
14231 <li class="__rptl-footer-item"><a href="https://pip.raspberrypi.com" class="__rptl-footer-link">Product information portal</a></li>
14232 <li class="__rptl-footer-item"><a href="https://datasheets.raspberrypi.com" class="__rptl-footer-link">Datasheets</a></li>
14234 <div class="__rptl-footer-heading">Community</div>
14235 <ul class="__rptl-footer-list">
14236 <li class="__rptl-footer-item"><a href="https://forums.raspberrypi.com/" class="__rptl-footer-link">Forums</a></li>
14237 <li class="__rptl-footer-item"><a href="https://events.raspberrypi.com/" class="__rptl-footer-link">Events</a></li>
14239 <div class="__rptl-footer-heading">Raspberry Pi Store</div>
14240 <ul class="__rptl-footer-list">
14241 <li class="__rptl-footer-item"><a href="/raspberry-pi-store/" class="__rptl-footer-link">Store information</a></li>
14243 <div class="__rptl-footer-heading">Raspberry Pi Press</div>
14244 <ul class="__rptl-footer-list">
14245 <li class="__rptl-footer-item"><a href="/books-magazines/" class="__rptl-footer-link">About Raspberry Pi Press</a></li>
14246 <li class="__rptl-footer-item"><a href="https://magpi.raspberrypi.com" class="__rptl-footer-link">The MagPi</a></li>
14247 <li class="__rptl-footer-item"><a href="https://hackspace.raspberrypi.com" class="__rptl-footer-link">HackSpace</a></li>
14254 <!-- Script for the TOC toggle -->
14255 <script src="/documentation/scripts/nav.js?ver=1703167119" type="text/javascript"></script>
14257 <!-- TOCify scripts -->
14258 <script nonce="{{nonce}}" src="{{jquery}}"></script>
14259 <script nonce="{{nonce}}" src="{{jquery-ui}}"></script>
14260 <script nonce="{{nonce}}" src="{{jquery-tocify}}"></script>
14262 <!-- Copy To Clipboard scripts -->
14263 <script src="/documentation/scripts/clipboard.min.js"></script>
14264 <script src="/documentation/scripts/copy-to-clipboard.js?ver=1703167119"></script>
14266 <!-- Some custom handling for whitepapers -->
14267 <script src="/documentation/scripts/whitepaper.js?ver=1703167119"></script>
14269 <script nonce="{{nonce}}">
14270 function hasher(text, element) {
14271 return text.toLowerCase().replace(/ /g, "-").replace(/\./g, "-").replace(/[^-\w]/g, "").replace(/-+/g, "-");
14274 function waitForElementToDisplay(selector, checkFrequencyInMs, timeoutInMs) {
14276 // wait for all the content to load first...
14277 var startTimeInMs = Date.now();
14278 (function loopSearch() {
14279 // && document.querySelector(selector).getBoundingClientRect().top > 0
14280 if (document.querySelector(selector) != null && document.querySelector(selector).getBoundingClientRect().top > 0) {
14281 scrollToElement(selector);
14285 setTimeout(function () {
14286 if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs)
14289 }, checkFrequencyInMs);
14293 console.log("there was an error in scrollToElement:");
14298 function scrollToElement(selector) {
14300 // if found, scroll to that id hash
14301 console.log("Scrolling to ", selector);
14302 var target = document.querySelector(selector);
14304 var bbox = target.getBoundingClientRect();
14305 var myid = target.getAttribute("id");
14309 behavior: "smooth",
14312 console.log("Target not found :(");
14315 console.log("there was an error in scrollToElement:");
14321 $("#toc").tocify({ showAndHide: false, hashGenerator: hasher, extendPage: false, ignoreSelector: ".discrete" });
14322 // special handling to scroll to tocify elements on the page
14323 if (window.location.hasOwnProperty("hash") && window.location.hash.indexOf("#") > -1) {
14324 var myhash = window.location.hash;
14325 myhash = myhash.replace("#", "");
14326 var selector = "div[data-unique="+myhash+"] + *";
14327 waitForElementToDisplay(selector, 1000, 9000);
14332 <script nonce="{{nonce}}">
14333 var contents = document.getElementById("contents");
14334 contents.addEventListener('mouseenter', e => {
14335 contents.style.overflowY = 'auto';
14338 contents.addEventListener('mouseleave', e => {
14339 contents.style.overflowY = 'hidden';
14343 <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
14344 <script nonce="{{nonce}}" type="text/javascript">
14346 var lvl0 = document.querySelector('#tab-menu li.selected'),
14347 lvl1 = document.querySelector('#content h1'),
14348 searchParameters = { optionalFilters: [] };
14351 searchParameters.optionalFilters.push("hierarchy.lvl0:" + lvl0.innerText);
14354 searchParameters.optionalFilters.push("hierarchy.lvl1:" + lvl1.innerText + "<score=2>");
14358 appId: 'IHWGNTJ1NP',
14359 apiKey: '94f8e1d1619229399fe8b33bcf750dfd',
14360 indexName: 'raspberrypi',
14361 container: '#docsearch',
14362 searchParameters: searchParameters