index.html 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. <!DOCTYPE html>
  2. <html lang="en" class="h-full">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <meta name="color-scheme" content="light dark">
  7. <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="4.1.0.825921057143">
  8. <!-- See retype.com -->
  9. <meta name="generator" content="Retype 4.1.0">
  10. <!-- Primary Meta Tags -->
  11. <title>periphery | Portable Python 3.x Interpreter in Modern C</title>
  12. <meta name="title" content="periphery | Portable Python 3.x Interpreter in Modern C">
  13. <meta name="description" content="This module is optional. Set option PK_BUILD_MODULE_PERIPHERY to ON in your CMakeLists.txt to enable it.">
  14. <!-- Canonical -->
  15. <link rel="canonical" href="https://pocketpy.dev/modules/periphery/">
  16. <!-- Open Graph -->
  17. <meta property="og:type" content="website">
  18. <meta property="og:url" content="https://pocketpy.dev/modules/periphery/">
  19. <meta property="og:title" content="periphery | Portable Python 3.x Interpreter in Modern C">
  20. <meta property="og:description" content="This module is optional. Set option PK_BUILD_MODULE_PERIPHERY to ON in your CMakeLists.txt to enable it.">
  21. <meta property="og:site_name" content="pocketpy">
  22. <meta property="og:locale" content="en_US">
  23. <script data-cfasync="false">(function(){var cl=document.documentElement.classList,ls=localStorage.getItem("retype_scheme"),hd=cl.contains("dark"),hl=cl.contains("light"),wm=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(ls==="dark"||(!ls&&wm&&!hd&&!hl)){cl.remove("light");cl.add("dark")}else if(ls==="light"||(!ls&&!wm&&!hd&&!hl)){cl.remove("dark");cl.add("light")}})();</script>
  24. <link id="retype-favicon" rel="icon" href="../../static/logo.png" />
  25. <link href="../../resources/css/retype.css?v=4.1.0.825921057143" rel="stylesheet">
  26. <script data-cfasync="false" src="../../resources/js/config.js?v=4.1.0.825921057143" data-turbo-eval="false" defer></script>
  27. <script data-cfasync="false" src="../../resources/js/retype.js?v=4.1.0" data-turbo-eval="false" defer></script>
  28. <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=4.1.0.825921057143" data-turbo-eval="false" defer></script>
  29. <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=4.1.0.825921057143" defer></script>
  30. </head>
  31. <body>
  32. <div id="retype-app" class="relative text-base antialiased text-base-text bg-base-bg font-body">
  33. <div class="absolute bottom-0 left-0" style="top: 5rem; right: 50%"></div>
  34. <header id="retype-header" class="sticky top-0 z-30 flex w-full h-16 bg-header-bg border-b border-header-border md:h-20">
  35. <div class="container relative flex items-center justify-between pr-6 grow md:justify-start">
  36. <!-- Mobile menu button skeleton -->
  37. <button v-cloak class="skeleton retype-mobile-menu-button flex items-center justify-center shrink-0 overflow-hidden dark:text-white focus:outline-hidden rounded-full w-10 h-10 ml-3.5 md:hidden"><svg xmlns="http://www.w3.org/2000/svg" class="mb-px shrink-0" width="24" height="24" viewBox="0 0 24 24" role="presentation" style="margin-bottom: 0px;"><g fill="currentColor"><path d="M2 4h20v2H2zM2 11h20v2H2zM2 18h20v2H2z"></path></g></svg></button>
  38. <div v-cloak id="retype-sidebar-left-toggle-button"></div>
  39. <!-- Logo -->
  40. <div class="flex items-center justify-between h-full py-2 md:w-75">
  41. <div class="flex items-center px-2 md:px-6">
  42. <a id="retype-branding-logo" href="../../" class="flex items-center leading-snug text-2xl">
  43. <span class="w-10 mr-2 grow-0 shrink-0 overflow-hidden">
  44. <img class="max-h-10 dark:hidden md:inline-block" src="../../static/logo.png">
  45. <img class="max-h-10 hidden dark:inline-block" src="../../static/logo.png">
  46. </span>
  47. <span class="dark:text-white font-bold line-clamp-1 md:line-clamp-2">pocketpy</span>
  48. </a><span id="retype-branding-label" class="inline-flex mt-1 px-2 py-1 ml-4 text-xs font-medium leading-none items-center rounded-md bg-branding-label-bg text-branding-label-text ring-1 ring-branding-label-border ring-inset md:inline-block">v2.1.8</span>
  49. </div>
  50. <span class="hidden h-8 border-r md:inline-block border-base-border"></span>
  51. </div>
  52. <div class="flex justify-between md:grow">
  53. <!-- Top Nav -->
  54. <nav id="retype-header-nav" class="hidden md:flex">
  55. <ul class="flex flex-col mb-4 md:pl-16 md:mb-0 md:flex-row md:items-center">
  56. <li class="mr-6">
  57. <a class="py-2 md:mb-0 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="">
  58. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  59. <g fill="currentColor">
  60. <path d="M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"/>
  61. </g>
  62. </svg>
  63. <span>Home</span>
  64. </a>
  65. </li>
  66. <li class="mr-6">
  67. <a class="py-2 md:mb-0 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://pocketpy.dev/static/web/" target="_blank">
  68. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  69. <g fill="currentColor">
  70. <path d="M9.5 15.584V8.416a.5.5 0 0 1 .77-.42l5.576 3.583a.5.5 0 0 1 0 .842l-5.576 3.584a.5.5 0 0 1-.77-.42Z"/><path d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9.5A9.5 9.5 0 0 0 2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5Z"/>
  71. </g>
  72. </svg>
  73. <span>Live Demo</span>
  74. </a>
  75. </li>
  76. <li class="mr-6">
  77. <a class="py-2 md:mb-0 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://pocketpy.github.io/examples/" target="_blank">
  78. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  79. <g fill="currentColor">
  80. <path d="M15.22 4.97a.75.75 0 0 1 1.06 0l6.5 6.5a.75.75 0 0 1 0 1.06l-6.5 6.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L21.19 12l-5.97-5.97a.75.75 0 0 1 0-1.06Zm-6.44 0a.75.75 0 0 1 0 1.06L2.81 12l5.97 5.97a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-6.5-6.5a.75.75 0 0 1 0-1.06l6.5-6.5a.75.75 0 0 1 1.06 0Z"/>
  81. </g>
  82. </svg>
  83. <span>Live Examples</span>
  84. </a>
  85. </li>
  86. <li class="mr-6">
  87. <a class="py-2 md:mb-0 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://github.com/blueloveth/pocketpy" target="_blank">
  88. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  89. <g fill="currentColor">
  90. <path d="M10.303 16.652c-2.837-.344-4.835-2.385-4.835-5.028 0-1.074.387-2.235 1.031-3.008-.279-.709-.236-2.214.086-2.837.86-.107 2.02.344 2.708.967.816-.258 1.676-.386 2.728-.386 1.053 0 1.913.128 2.686.365.666-.602 1.848-1.053 2.708-.946.3.581.344 2.085.064 2.815.688.817 1.053 1.913 1.053 3.03 0 2.643-1.998 4.641-4.877 5.006.73.473 1.224 1.504 1.224 2.686v2.235c0 .644.537 1.01 1.182.752 3.889-1.483 6.94-5.372 6.94-10.185 0-6.081-4.942-11.044-11.022-11.044-6.081 0-10.98 4.963-10.98 11.044a10.84 10.84 0 0 0 7.112 10.206c.58.215 1.139-.172 1.139-.752v-1.719a2.768 2.768 0 0 1-1.032.215c-1.418 0-2.256-.773-2.857-2.213-.237-.58-.495-.924-.989-.988-.258-.022-.344-.129-.344-.258 0-.258.43-.451.86-.451.623 0 1.16.386 1.719 1.181.43.623.881.903 1.418.903.537 0 .881-.194 1.375-.688.365-.365.645-.687.903-.902Z"/>
  91. </g>
  92. </svg>
  93. <span>Github</span>
  94. </a>
  95. </li>
  96. <li class="mr-6">
  97. <a class="py-2 md:mb-0 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://discord.gg/WWaq72GzXv" target="_blank">
  98. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  99. <g fill="currentColor">
  100. <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"/><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"/>
  101. </g>
  102. </svg>
  103. <span>Discord</span>
  104. </a>
  105. </li>
  106. </ul>
  107. </nav>
  108. <div v-cloak class="flex justify-end grow">
  109. <div id="retype-mobile-search-button"></div>
  110. <doc-search-desktop></doc-search-desktop>
  111. <doc-theme-switch class="lg:ml-2"></doc-theme-switch>
  112. <doc-history></doc-history>
  113. </div>
  114. </div>
  115. </div>
  116. </header>
  117. <div id="retype-container" class="container relative flex bg-white">
  118. <!-- Sidebar Skeleton -->
  119. <div v-cloak class="fixed flex flex-col shrink-0 duration-300 ease-in-out bg-sidebar-left-bg border-sidebar-left-border sidebar top-20 w-75 border-r h-screen md:sticky transition-transform skeleton">
  120. <div class="flex items-center h-16 px-6">
  121. <input id="retype-filter-input-mock" class="w-full h-10 pl-8 px-3 py-2 transition-colors duration-200 ease-linear bg-filter-bg border border-filter-border rounded-lg shadow-none md:text-sm hover:border-filter-border-hover focus:outline-hidden focus:border-filter-border-focus placeholder-filter-placeholder" type="text">
  122. </div>
  123. <div class="pl-6 mt-1 mb-4">
  124. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  125. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  126. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  127. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  128. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  129. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  130. </div>
  131. <div class="shrink-0 mt-auto bg-transparent dark:border-base-border">
  132. <a class="flex items-center justify-center flex-nowrap h-16 text-gray-350 dark:text-dark-400 hover:text-gray-600 dark:hover:text-dark-300 transition-colors duration-150 ease-in docs-powered-by" target="_blank" href="https://retype.com/" rel="noopener">
  133. <span class="text-xs whitespace-nowrap">Powered by</span>
  134. <svg xmlns="http://www.w3.org/2000/svg" class="ml-2" fill="currentColor" width="96" height="20" overflow="visible"><path d="M0 0v20h13.59V0H0zm11.15 17.54H2.44V2.46h8.71v15.08zM15.8 20h2.44V4.67L15.8 2.22zM20.45 6.89V20h2.44V9.34z"/><g><path d="M40.16 8.44c0 1.49-.59 2.45-1.75 2.88l2.34 3.32h-2.53l-2.04-2.96h-1.43v2.96h-2.06V5.36h3.5c1.43 0 2.46.24 3.07.73s.9 1.27.9 2.35zm-2.48 1.1c.26-.23.38-.59.38-1.09 0-.5-.13-.84-.4-1.03s-.73-.28-1.39-.28h-1.54v2.75h1.5c.72 0 1.2-.12 1.45-.35zM51.56 5.36V7.2h-4.59v1.91h4.13v1.76h-4.13v1.92h4.74v1.83h-6.79V5.36h6.64zM60.09 7.15v7.48h-2.06V7.15h-2.61V5.36h7.28v1.79h-2.61zM70.81 14.64h-2.06v-3.66l-3.19-5.61h2.23l1.99 3.45 1.99-3.45H74l-3.19 5.61v3.66zM83.99 6.19c.65.55.97 1.4.97 2.55s-.33 1.98-1 2.51-1.68.8-3.04.8h-1.23v2.59h-2.06V5.36h3.26c1.42 0 2.45.28 3.1.83zm-1.51 3.65c.25-.28.37-.69.37-1.22s-.16-.92-.48-1.14c-.32-.23-.82-.34-1.5-.34H79.7v3.12h1.38c.68 0 1.15-.14 1.4-.42zM95.85 5.36V7.2h-4.59v1.91h4.13v1.76h-4.13v1.92H96v1.83h-6.79V5.36h6.64z"/></g></svg>
  135. </a>
  136. </div>
  137. </div>
  138. <!-- Sidebar component -->
  139. <doc-sidebar v-cloak>
  140. <template #sidebar-footer>
  141. <div class="shrink-0 mt-auto border-t md:bg-transparent md:border-none dark:border-base-border">
  142. <div class="py-3 px-6 md:hidden border-b dark:border-base-border">
  143. <nav>
  144. <ul class="flex flex-wrap justify-center items-center">
  145. <li class="mr-6">
  146. <a class="block py-1 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="">
  147. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  148. <g fill="currentColor">
  149. <path d="M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"/>
  150. </g>
  151. </svg>
  152. <span>Home</span>
  153. </a>
  154. </li>
  155. <li class="mr-6">
  156. <a class="block py-1 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://pocketpy.dev/static/web/" target="_blank">
  157. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  158. <g fill="currentColor">
  159. <path d="M9.5 15.584V8.416a.5.5 0 0 1 .77-.42l5.576 3.583a.5.5 0 0 1 0 .842l-5.576 3.584a.5.5 0 0 1-.77-.42Z"/><path d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9.5A9.5 9.5 0 0 0 2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5Z"/>
  160. </g>
  161. </svg>
  162. <span>Live Demo</span>
  163. </a>
  164. </li>
  165. <li class="mr-6">
  166. <a class="block py-1 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://pocketpy.github.io/examples/" target="_blank">
  167. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  168. <g fill="currentColor">
  169. <path d="M15.22 4.97a.75.75 0 0 1 1.06 0l6.5 6.5a.75.75 0 0 1 0 1.06l-6.5 6.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L21.19 12l-5.97-5.97a.75.75 0 0 1 0-1.06Zm-6.44 0a.75.75 0 0 1 0 1.06L2.81 12l5.97 5.97a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-6.5-6.5a.75.75 0 0 1 0-1.06l6.5-6.5a.75.75 0 0 1 1.06 0Z"/>
  170. </g>
  171. </svg>
  172. <span>Live Examples</span>
  173. </a>
  174. </li>
  175. <li class="mr-6">
  176. <a class="block py-1 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://github.com/blueloveth/pocketpy" target="_blank">
  177. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  178. <g fill="currentColor">
  179. <path d="M10.303 16.652c-2.837-.344-4.835-2.385-4.835-5.028 0-1.074.387-2.235 1.031-3.008-.279-.709-.236-2.214.086-2.837.86-.107 2.02.344 2.708.967.816-.258 1.676-.386 2.728-.386 1.053 0 1.913.128 2.686.365.666-.602 1.848-1.053 2.708-.946.3.581.344 2.085.064 2.815.688.817 1.053 1.913 1.053 3.03 0 2.643-1.998 4.641-4.877 5.006.73.473 1.224 1.504 1.224 2.686v2.235c0 .644.537 1.01 1.182.752 3.889-1.483 6.94-5.372 6.94-10.185 0-6.081-4.942-11.044-11.022-11.044-6.081 0-10.98 4.963-10.98 11.044a10.84 10.84 0 0 0 7.112 10.206c.58.215 1.139-.172 1.139-.752v-1.719a2.768 2.768 0 0 1-1.032.215c-1.418 0-2.256-.773-2.857-2.213-.237-.58-.495-.924-.989-.988-.258-.022-.344-.129-.344-.258 0-.258.43-.451.86-.451.623 0 1.16.386 1.719 1.181.43.623.881.903 1.418.903.537 0 .881-.194 1.375-.688.365-.365.645-.687.903-.902Z"/>
  180. </g>
  181. </svg>
  182. <span>Github</span>
  183. </a>
  184. </li>
  185. <li class="mr-6">
  186. <a class="block py-1 inline-flex items-center text-sm whitespace-nowrap transition-colors duration-200 ease-linear md:text-header-text font-header-text hover:text-header-text-hover" href="https://discord.gg/WWaq72GzXv" target="_blank">
  187. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1" width="18" height="18" viewBox="0 0 24 24" role="presentation">
  188. <g fill="currentColor">
  189. <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"/><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"/>
  190. </g>
  191. </svg>
  192. <span>Discord</span>
  193. </a>
  194. </li>
  195. </ul>
  196. </nav>
  197. </div>
  198. <a class="flex items-center justify-center flex-nowrap h-16 text-gray-350 dark:text-dark-400 hover:text-gray-600 dark:hover:text-dark-300 transition-colors duration-150 ease-in docs-powered-by" target="_blank" href="https://retype.com/" rel="noopener">
  199. <span class="text-xs whitespace-nowrap">Powered by</span>
  200. <svg xmlns="http://www.w3.org/2000/svg" class="ml-2" fill="currentColor" width="96" height="20" overflow="visible"><path d="M0 0v20h13.59V0H0zm11.15 17.54H2.44V2.46h8.71v15.08zM15.8 20h2.44V4.67L15.8 2.22zM20.45 6.89V20h2.44V9.34z"/><g><path d="M40.16 8.44c0 1.49-.59 2.45-1.75 2.88l2.34 3.32h-2.53l-2.04-2.96h-1.43v2.96h-2.06V5.36h3.5c1.43 0 2.46.24 3.07.73s.9 1.27.9 2.35zm-2.48 1.1c.26-.23.38-.59.38-1.09 0-.5-.13-.84-.4-1.03s-.73-.28-1.39-.28h-1.54v2.75h1.5c.72 0 1.2-.12 1.45-.35zM51.56 5.36V7.2h-4.59v1.91h4.13v1.76h-4.13v1.92h4.74v1.83h-6.79V5.36h6.64zM60.09 7.15v7.48h-2.06V7.15h-2.61V5.36h7.28v1.79h-2.61zM70.81 14.64h-2.06v-3.66l-3.19-5.61h2.23l1.99 3.45 1.99-3.45H74l-3.19 5.61v3.66zM83.99 6.19c.65.55.97 1.4.97 2.55s-.33 1.98-1 2.51-1.68.8-3.04.8h-1.23v2.59h-2.06V5.36h3.26c1.42 0 2.45.28 3.1.83zm-1.51 3.65c.25-.28.37-.69.37-1.22s-.16-.92-.48-1.14c-.32-.23-.82-.34-1.5-.34H79.7v3.12h1.38c.68 0 1.15-.14 1.4-.42zM95.85 5.36V7.2h-4.59v1.91h4.13v1.76h-4.13v1.92H96v1.83h-6.79V5.36h6.64z"/></g></svg>
  201. </a>
  202. </div>
  203. </template>
  204. </doc-sidebar>
  205. <div class="grow min-w-0 bg-body-bg">
  206. <!-- Render "toolbar" template here on api pages --><!-- Render page content -->
  207. <div class="flex">
  208. <div id="retype-main" class="min-w-0 p-4 grow md:px-16">
  209. <main class="relative pb-12 lg:pt-2">
  210. <div class="retype-markdown" id="retype-content">
  211. <!-- Rendered if sidebar right is enabled -->
  212. <div id="retype-sidebar-right-toggle"></div>
  213. <!-- Page content -->
  214. <doc-anchor-target id="periphery" class="break-words">
  215. <h1>
  216. <doc-anchor-trigger class="header-anchor-trigger" to="#periphery">#</doc-anchor-trigger>
  217. <span>periphery</span>
  218. </h1>
  219. </doc-anchor-target>
  220. <div class="flex mb-6">
  221. <div class="shrink-0 w-1.5 rounded-tl-lg rounded-bl-lg bg-callout-primary"></div>
  222. <div class="flex w-full py-4 border border-l-0 rounded-tr-lg rounded-br-lg doc-callout bg-callout-base-bg border-callout-base-border" role="alert">
  223. <div class="flex items-center ml-4 h-7">
  224. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px text-callout-primary" width="22" height="22" viewBox="0 0 24 24" role="presentation">
  225. <g fill="currentColor"><g>
  226. <path d="M12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9z"></path>
  227. <path d="M12 11c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1zM12.01 7c-.56 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"></path>
  228. <path fill="none" d="M0 0h24v24H0z"></path>
  229. </g></g>
  230. </svg>
  231. </div>
  232. <div class="pr-5 ml-3 w-full">
  233. <p>This module is optional. Set option <code translate="no" v-pre>PK_BUILD_MODULE_PERIPHERY</code> to <code translate="no" v-pre>ON</code> in your <code translate="no" v-pre>CMakeLists.txt</code> to enable it.</p>
  234. </div>
  235. </div>
  236. </div>
  237. <doc-anchor-target id="source-code">
  238. <h4>
  239. <doc-anchor-trigger class="header-anchor-trigger" to="#source-code">#</doc-anchor-trigger>
  240. <span>Source code</span>
  241. </h4>
  242. </doc-anchor-target>
  243. <div id="source-code-code-1" class="codeblock-wrapper"><doc-codeblock>
  244. <pre translate="no" class="language-python"><code v-pre class="language-python">from typing import overload
  245. from stdc import intptr
  246. class gpio_config:
  247. direction: int # (gpio_direction_t)
  248. edge: int # (gpio_edge_t)
  249. event_clock: int # (gpio_event_clock_t)
  250. debounce_us: int # (uint32_t)
  251. bias: int # (gpio_bias_t)
  252. drive: int # (gpio_drive_t)
  253. inverted: bool # (bool)
  254. label: str # (const char*)
  255. @overload
  256. def __init__(self): ...
  257. @overload
  258. def __init__(self, direction: int, edge: int, event_clock: int, debounce_us: int, bias: int, drive: int, inverted: bool, label: str): ...
  259. class spi_msg:
  260. txbuf: intptr # (const uint8_t*)
  261. rxbuf: intptr # (uint8_t*)
  262. len: int # (size_t)
  263. deselect: bool # (bool)
  264. deselect_delay_us: int # (uint16_t)
  265. word_delay_us: int # (uint8_t)
  266. @overload
  267. def __init__(self): ...
  268. @overload
  269. def __init__(self, txbuf: intptr, rxbuf: intptr, len: int, deselect: bool, deselect_delay_us: int, word_delay_us: int): ...
  270. class periphery_version:
  271. major: int # (unsigned)
  272. minor: int # (unsigned)
  273. patch: int # (unsigned)
  274. commit_id: str # (const char*)
  275. @overload
  276. def __init__(self): ...
  277. @overload
  278. def __init__(self, major: int, minor: int, patch: int, commit_id: str): ...
  279. def gpio_new() -&gt; intptr:
  280. &quot;&quot;&quot;Wraps `gpio_t* gpio_new()`&quot;&quot;&quot;
  281. def gpio_open(gpio: intptr, path: str, line: int, direction: int, /) -&gt; int:
  282. &quot;&quot;&quot;Wraps `int gpio_open(gpio_t* gpio, const char* path, unsigned line, gpio_direction_t direction)`&quot;&quot;&quot;
  283. def gpio_open_name(gpio: intptr, path: str, name: str, direction: int, /) -&gt; int:
  284. &quot;&quot;&quot;Wraps `int gpio_open_name(gpio_t* gpio, const char* path, const char* name, gpio_direction_t direction)`&quot;&quot;&quot;
  285. def gpio_open_advanced(gpio: intptr, path: str, line: int, config: intptr, /) -&gt; int:
  286. &quot;&quot;&quot;Wraps `int gpio_open_advanced(gpio_t* gpio, const char* path, unsigned line, const gpio_config_t* config)`&quot;&quot;&quot;
  287. def gpio_open_name_advanced(gpio: intptr, path: str, name: str, config: intptr, /) -&gt; int:
  288. &quot;&quot;&quot;Wraps `int gpio_open_name_advanced(gpio_t* gpio, const char* path, const char* name, const gpio_config_t* config)`&quot;&quot;&quot;
  289. def gpio_open_sysfs(gpio: intptr, line: int, direction: int, /) -&gt; int:
  290. &quot;&quot;&quot;Wraps `int gpio_open_sysfs(gpio_t* gpio, unsigned line, gpio_direction_t direction)`&quot;&quot;&quot;
  291. def gpio_read(gpio: intptr, value: intptr, /) -&gt; int:
  292. &quot;&quot;&quot;Wraps `int gpio_read(gpio_t* gpio, bool* value)`&quot;&quot;&quot;
  293. def gpio_write(gpio: intptr, value: bool, /) -&gt; int:
  294. &quot;&quot;&quot;Wraps `int gpio_write(gpio_t* gpio, bool value)`&quot;&quot;&quot;
  295. def gpio_poll(gpio: intptr, timeout_ms: int, /) -&gt; int:
  296. &quot;&quot;&quot;Wraps `int gpio_poll(gpio_t* gpio, int timeout_ms)`&quot;&quot;&quot;
  297. def gpio_close(gpio: intptr, /) -&gt; int:
  298. &quot;&quot;&quot;Wraps `int gpio_close(gpio_t* gpio)`&quot;&quot;&quot;
  299. def gpio_free(gpio: intptr, /) -&gt; None:
  300. &quot;&quot;&quot;Wraps `void gpio_free(gpio_t* gpio)`&quot;&quot;&quot;
  301. def gpio_read_event(gpio: intptr, edge: intptr, timestamp: intptr, /) -&gt; int:
  302. &quot;&quot;&quot;Wraps `int gpio_read_event(gpio_t* gpio, gpio_edge_t* edge, uint64_t* timestamp)`&quot;&quot;&quot;
  303. def gpio_poll_multiple(gpios: intptr, count: int, timeout_ms: int, gpios_ready: intptr, /) -&gt; int:
  304. &quot;&quot;&quot;Wraps `int gpio_poll_multiple(gpio_t** gpios, size_t count, int timeout_ms, bool* gpios_ready)`&quot;&quot;&quot;
  305. def gpio_get_direction(gpio: intptr, direction: intptr, /) -&gt; int:
  306. &quot;&quot;&quot;Wraps `int gpio_get_direction(gpio_t* gpio, gpio_direction_t* direction)`&quot;&quot;&quot;
  307. def gpio_get_edge(gpio: intptr, edge: intptr, /) -&gt; int:
  308. &quot;&quot;&quot;Wraps `int gpio_get_edge(gpio_t* gpio, gpio_edge_t* edge)`&quot;&quot;&quot;
  309. def gpio_get_event_clock(gpio: intptr, event_clock: intptr, /) -&gt; int:
  310. &quot;&quot;&quot;Wraps `int gpio_get_event_clock(gpio_t* gpio, gpio_event_clock_t* event_clock)`&quot;&quot;&quot;
  311. def gpio_get_debounce_us(gpio: intptr, debounce_us: intptr, /) -&gt; int:
  312. &quot;&quot;&quot;Wraps `int gpio_get_debounce_us(gpio_t* gpio, uint32_t* debounce_us)`&quot;&quot;&quot;
  313. def gpio_get_bias(gpio: intptr, bias: intptr, /) -&gt; int:
  314. &quot;&quot;&quot;Wraps `int gpio_get_bias(gpio_t* gpio, gpio_bias_t* bias)`&quot;&quot;&quot;
  315. def gpio_get_drive(gpio: intptr, drive: intptr, /) -&gt; int:
  316. &quot;&quot;&quot;Wraps `int gpio_get_drive(gpio_t* gpio, gpio_drive_t* drive)`&quot;&quot;&quot;
  317. def gpio_get_inverted(gpio: intptr, inverted: intptr, /) -&gt; int:
  318. &quot;&quot;&quot;Wraps `int gpio_get_inverted(gpio_t* gpio, bool* inverted)`&quot;&quot;&quot;
  319. def gpio_set_direction(gpio: intptr, direction: int, /) -&gt; int:
  320. &quot;&quot;&quot;Wraps `int gpio_set_direction(gpio_t* gpio, gpio_direction_t direction)`&quot;&quot;&quot;
  321. def gpio_set_edge(gpio: intptr, edge: int, /) -&gt; int:
  322. &quot;&quot;&quot;Wraps `int gpio_set_edge(gpio_t* gpio, gpio_edge_t edge)`&quot;&quot;&quot;
  323. def gpio_set_event_clock(gpio: intptr, event_clock: int, /) -&gt; int:
  324. &quot;&quot;&quot;Wraps `int gpio_set_event_clock(gpio_t* gpio, gpio_event_clock_t event_clock)`&quot;&quot;&quot;
  325. def gpio_set_debounce_us(gpio: intptr, debounce_us: int, /) -&gt; int:
  326. &quot;&quot;&quot;Wraps `int gpio_set_debounce_us(gpio_t* gpio, uint32_t debounce_us)`&quot;&quot;&quot;
  327. def gpio_set_bias(gpio: intptr, bias: int, /) -&gt; int:
  328. &quot;&quot;&quot;Wraps `int gpio_set_bias(gpio_t* gpio, gpio_bias_t bias)`&quot;&quot;&quot;
  329. def gpio_set_drive(gpio: intptr, drive: int, /) -&gt; int:
  330. &quot;&quot;&quot;Wraps `int gpio_set_drive(gpio_t* gpio, gpio_drive_t drive)`&quot;&quot;&quot;
  331. def gpio_set_inverted(gpio: intptr, inverted: bool, /) -&gt; int:
  332. &quot;&quot;&quot;Wraps `int gpio_set_inverted(gpio_t* gpio, bool inverted)`&quot;&quot;&quot;
  333. def gpio_line(gpio: intptr, /) -&gt; int:
  334. &quot;&quot;&quot;Wraps `unsigned gpio_line(gpio_t* gpio)`&quot;&quot;&quot;
  335. def gpio_fd(gpio: intptr, /) -&gt; int:
  336. &quot;&quot;&quot;Wraps `int gpio_fd(gpio_t* gpio)`&quot;&quot;&quot;
  337. def gpio_name(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  338. &quot;&quot;&quot;Wraps `int gpio_name(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  339. def gpio_label(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  340. &quot;&quot;&quot;Wraps `int gpio_label(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  341. def gpio_chip_fd(gpio: intptr, /) -&gt; int:
  342. &quot;&quot;&quot;Wraps `int gpio_chip_fd(gpio_t* gpio)`&quot;&quot;&quot;
  343. def gpio_chip_name(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  344. &quot;&quot;&quot;Wraps `int gpio_chip_name(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  345. def gpio_chip_label(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  346. &quot;&quot;&quot;Wraps `int gpio_chip_label(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  347. def gpio_tostring(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  348. &quot;&quot;&quot;Wraps `int gpio_tostring(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  349. def gpio_errno(gpio: intptr, /) -&gt; int:
  350. &quot;&quot;&quot;Wraps `int gpio_errno(gpio_t* gpio)`&quot;&quot;&quot;
  351. def gpio_errmsg(gpio: intptr, /) -&gt; str:
  352. &quot;&quot;&quot;Wraps `const char* gpio_errmsg(gpio_t* gpio)`&quot;&quot;&quot;
  353. def led_new() -&gt; intptr:
  354. &quot;&quot;&quot;Wraps `led_t* led_new()`&quot;&quot;&quot;
  355. def led_open(led: intptr, name: str, /) -&gt; int:
  356. &quot;&quot;&quot;Wraps `int led_open(led_t* led, const char* name)`&quot;&quot;&quot;
  357. def led_read(led: intptr, value: intptr, /) -&gt; int:
  358. &quot;&quot;&quot;Wraps `int led_read(led_t* led, bool* value)`&quot;&quot;&quot;
  359. def led_write(led: intptr, value: bool, /) -&gt; int:
  360. &quot;&quot;&quot;Wraps `int led_write(led_t* led, bool value)`&quot;&quot;&quot;
  361. def led_close(led: intptr, /) -&gt; int:
  362. &quot;&quot;&quot;Wraps `int led_close(led_t* led)`&quot;&quot;&quot;
  363. def led_free(led: intptr, /) -&gt; None:
  364. &quot;&quot;&quot;Wraps `void led_free(led_t* led)`&quot;&quot;&quot;
  365. def led_get_brightness(led: intptr, brightness: intptr, /) -&gt; int:
  366. &quot;&quot;&quot;Wraps `int led_get_brightness(led_t* led, unsigned* brightness)`&quot;&quot;&quot;
  367. def led_get_max_brightness(led: intptr, max_brightness: intptr, /) -&gt; int:
  368. &quot;&quot;&quot;Wraps `int led_get_max_brightness(led_t* led, unsigned* max_brightness)`&quot;&quot;&quot;
  369. def led_get_trigger(led: intptr, str: intptr, len: int, /) -&gt; int:
  370. &quot;&quot;&quot;Wraps `int led_get_trigger(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  371. def led_get_triggers_entry(led: intptr, index: int, str: intptr, len: int, /) -&gt; int:
  372. &quot;&quot;&quot;Wraps `int led_get_triggers_entry(led_t* led, unsigned index, char* str, size_t len)`&quot;&quot;&quot;
  373. def led_get_triggers_count(led: intptr, count: intptr, /) -&gt; int:
  374. &quot;&quot;&quot;Wraps `int led_get_triggers_count(led_t* led, unsigned* count)`&quot;&quot;&quot;
  375. def led_set_brightness(led: intptr, brightness: int, /) -&gt; int:
  376. &quot;&quot;&quot;Wraps `int led_set_brightness(led_t* led, unsigned brightness)`&quot;&quot;&quot;
  377. def led_set_trigger(led: intptr, trigger: str, /) -&gt; int:
  378. &quot;&quot;&quot;Wraps `int led_set_trigger(led_t* led, const char* trigger)`&quot;&quot;&quot;
  379. def led_name(led: intptr, str: intptr, len: int, /) -&gt; int:
  380. &quot;&quot;&quot;Wraps `int led_name(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  381. def led_tostring(led: intptr, str: intptr, len: int, /) -&gt; int:
  382. &quot;&quot;&quot;Wraps `int led_tostring(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  383. def led_errno(led: intptr, /) -&gt; int:
  384. &quot;&quot;&quot;Wraps `int led_errno(led_t* led)`&quot;&quot;&quot;
  385. def led_errmsg(led: intptr, /) -&gt; str:
  386. &quot;&quot;&quot;Wraps `const char* led_errmsg(led_t* led)`&quot;&quot;&quot;
  387. def mmio_new() -&gt; intptr:
  388. &quot;&quot;&quot;Wraps `mmio_t* mmio_new()`&quot;&quot;&quot;
  389. def mmio_open(mmio: intptr, base: int, size: int, /) -&gt; int:
  390. &quot;&quot;&quot;Wraps `int mmio_open(mmio_t* mmio, uintptr_t base, size_t size)`&quot;&quot;&quot;
  391. def mmio_open_advanced(mmio: intptr, base: int, size: int, path: str, /) -&gt; int:
  392. &quot;&quot;&quot;Wraps `int mmio_open_advanced(mmio_t* mmio, uintptr_t base, size_t size, const char* path)`&quot;&quot;&quot;
  393. def mmio_ptr(mmio: intptr, /) -&gt; intptr:
  394. &quot;&quot;&quot;Wraps `void* mmio_ptr(mmio_t* mmio)`&quot;&quot;&quot;
  395. def mmio_read64(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  396. &quot;&quot;&quot;Wraps `int mmio_read64(mmio_t* mmio, uintptr_t offset, uint64_t* value)`&quot;&quot;&quot;
  397. def mmio_read32(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  398. &quot;&quot;&quot;Wraps `int mmio_read32(mmio_t* mmio, uintptr_t offset, uint32_t* value)`&quot;&quot;&quot;
  399. def mmio_read16(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  400. &quot;&quot;&quot;Wraps `int mmio_read16(mmio_t* mmio, uintptr_t offset, uint16_t* value)`&quot;&quot;&quot;
  401. def mmio_read8(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  402. &quot;&quot;&quot;Wraps `int mmio_read8(mmio_t* mmio, uintptr_t offset, uint8_t* value)`&quot;&quot;&quot;
  403. def mmio_read(mmio: intptr, offset: int, buf: intptr, len: int, /) -&gt; int:
  404. &quot;&quot;&quot;Wraps `int mmio_read(mmio_t* mmio, uintptr_t offset, uint8_t* buf, size_t len)`&quot;&quot;&quot;
  405. def mmio_write64(mmio: intptr, offset: int, value: int, /) -&gt; int:
  406. &quot;&quot;&quot;Wraps `int mmio_write64(mmio_t* mmio, uintptr_t offset, uint64_t value)`&quot;&quot;&quot;
  407. def mmio_write32(mmio: intptr, offset: int, value: int, /) -&gt; int:
  408. &quot;&quot;&quot;Wraps `int mmio_write32(mmio_t* mmio, uintptr_t offset, uint32_t value)`&quot;&quot;&quot;
  409. def mmio_write16(mmio: intptr, offset: int, value: int, /) -&gt; int:
  410. &quot;&quot;&quot;Wraps `int mmio_write16(mmio_t* mmio, uintptr_t offset, uint16_t value)`&quot;&quot;&quot;
  411. def mmio_write8(mmio: intptr, offset: int, value: int, /) -&gt; int:
  412. &quot;&quot;&quot;Wraps `int mmio_write8(mmio_t* mmio, uintptr_t offset, uint8_t value)`&quot;&quot;&quot;
  413. def mmio_write(mmio: intptr, offset: int, buf: intptr, len: int, /) -&gt; int:
  414. &quot;&quot;&quot;Wraps `int mmio_write(mmio_t* mmio, uintptr_t offset, const uint8_t* buf, size_t len)`&quot;&quot;&quot;
  415. def mmio_close(mmio: intptr, /) -&gt; int:
  416. &quot;&quot;&quot;Wraps `int mmio_close(mmio_t* mmio)`&quot;&quot;&quot;
  417. def mmio_free(mmio: intptr, /) -&gt; None:
  418. &quot;&quot;&quot;Wraps `void mmio_free(mmio_t* mmio)`&quot;&quot;&quot;
  419. def mmio_base(mmio: intptr, /) -&gt; int:
  420. &quot;&quot;&quot;Wraps `uintptr_t mmio_base(mmio_t* mmio)`&quot;&quot;&quot;
  421. def mmio_size(mmio: intptr, /) -&gt; int:
  422. &quot;&quot;&quot;Wraps `size_t mmio_size(mmio_t* mmio)`&quot;&quot;&quot;
  423. def mmio_tostring(mmio: intptr, str: intptr, len: int, /) -&gt; int:
  424. &quot;&quot;&quot;Wraps `int mmio_tostring(mmio_t* mmio, char* str, size_t len)`&quot;&quot;&quot;
  425. def mmio_errno(mmio: intptr, /) -&gt; int:
  426. &quot;&quot;&quot;Wraps `int mmio_errno(mmio_t* mmio)`&quot;&quot;&quot;
  427. def mmio_errmsg(mmio: intptr, /) -&gt; str:
  428. &quot;&quot;&quot;Wraps `const char* mmio_errmsg(mmio_t* mmio)`&quot;&quot;&quot;
  429. def pwm_new() -&gt; intptr:
  430. &quot;&quot;&quot;Wraps `pwm_t* pwm_new()`&quot;&quot;&quot;
  431. def pwm_open(pwm: intptr, chip: int, channel: int, /) -&gt; int:
  432. &quot;&quot;&quot;Wraps `int pwm_open(pwm_t* pwm, unsigned chip, unsigned channel)`&quot;&quot;&quot;
  433. def pwm_enable(pwm: intptr, /) -&gt; int:
  434. &quot;&quot;&quot;Wraps `int pwm_enable(pwm_t* pwm)`&quot;&quot;&quot;
  435. def pwm_disable(pwm: intptr, /) -&gt; int:
  436. &quot;&quot;&quot;Wraps `int pwm_disable(pwm_t* pwm)`&quot;&quot;&quot;
  437. def pwm_close(pwm: intptr, /) -&gt; int:
  438. &quot;&quot;&quot;Wraps `int pwm_close(pwm_t* pwm)`&quot;&quot;&quot;
  439. def pwm_free(pwm: intptr, /) -&gt; None:
  440. &quot;&quot;&quot;Wraps `void pwm_free(pwm_t* pwm)`&quot;&quot;&quot;
  441. def pwm_get_enabled(pwm: intptr, enabled: intptr, /) -&gt; int:
  442. &quot;&quot;&quot;Wraps `int pwm_get_enabled(pwm_t* pwm, bool* enabled)`&quot;&quot;&quot;
  443. def pwm_get_period_ns(pwm: intptr, period_ns: intptr, /) -&gt; int:
  444. &quot;&quot;&quot;Wraps `int pwm_get_period_ns(pwm_t* pwm, uint64_t* period_ns)`&quot;&quot;&quot;
  445. def pwm_get_duty_cycle_ns(pwm: intptr, duty_cycle_ns: intptr, /) -&gt; int:
  446. &quot;&quot;&quot;Wraps `int pwm_get_duty_cycle_ns(pwm_t* pwm, uint64_t* duty_cycle_ns)`&quot;&quot;&quot;
  447. def pwm_get_period(pwm: intptr, period: intptr, /) -&gt; int:
  448. &quot;&quot;&quot;Wraps `int pwm_get_period(pwm_t* pwm, double* period)`&quot;&quot;&quot;
  449. def pwm_get_duty_cycle(pwm: intptr, duty_cycle: intptr, /) -&gt; int:
  450. &quot;&quot;&quot;Wraps `int pwm_get_duty_cycle(pwm_t* pwm, double* duty_cycle)`&quot;&quot;&quot;
  451. def pwm_get_frequency(pwm: intptr, frequency: intptr, /) -&gt; int:
  452. &quot;&quot;&quot;Wraps `int pwm_get_frequency(pwm_t* pwm, double* frequency)`&quot;&quot;&quot;
  453. def pwm_get_polarity(pwm: intptr, polarity: intptr, /) -&gt; int:
  454. &quot;&quot;&quot;Wraps `int pwm_get_polarity(pwm_t* pwm, pwm_polarity_t* polarity)`&quot;&quot;&quot;
  455. def pwm_set_enabled(pwm: intptr, enabled: bool, /) -&gt; int:
  456. &quot;&quot;&quot;Wraps `int pwm_set_enabled(pwm_t* pwm, bool enabled)`&quot;&quot;&quot;
  457. def pwm_set_period_ns(pwm: intptr, period_ns: int, /) -&gt; int:
  458. &quot;&quot;&quot;Wraps `int pwm_set_period_ns(pwm_t* pwm, uint64_t period_ns)`&quot;&quot;&quot;
  459. def pwm_set_duty_cycle_ns(pwm: intptr, duty_cycle_ns: int, /) -&gt; int:
  460. &quot;&quot;&quot;Wraps `int pwm_set_duty_cycle_ns(pwm_t* pwm, uint64_t duty_cycle_ns)`&quot;&quot;&quot;
  461. def pwm_set_period(pwm: intptr, period: float, /) -&gt; int:
  462. &quot;&quot;&quot;Wraps `int pwm_set_period(pwm_t* pwm, double period)`&quot;&quot;&quot;
  463. def pwm_set_duty_cycle(pwm: intptr, duty_cycle: float, /) -&gt; int:
  464. &quot;&quot;&quot;Wraps `int pwm_set_duty_cycle(pwm_t* pwm, double duty_cycle)`&quot;&quot;&quot;
  465. def pwm_set_frequency(pwm: intptr, frequency: float, /) -&gt; int:
  466. &quot;&quot;&quot;Wraps `int pwm_set_frequency(pwm_t* pwm, double frequency)`&quot;&quot;&quot;
  467. def pwm_set_polarity(pwm: intptr, polarity: int, /) -&gt; int:
  468. &quot;&quot;&quot;Wraps `int pwm_set_polarity(pwm_t* pwm, pwm_polarity_t polarity)`&quot;&quot;&quot;
  469. def pwm_chip(pwm: intptr, /) -&gt; int:
  470. &quot;&quot;&quot;Wraps `unsigned pwm_chip(pwm_t* pwm)`&quot;&quot;&quot;
  471. def pwm_channel(pwm: intptr, /) -&gt; int:
  472. &quot;&quot;&quot;Wraps `unsigned pwm_channel(pwm_t* pwm)`&quot;&quot;&quot;
  473. def pwm_tostring(pwm: intptr, str: intptr, len: int, /) -&gt; int:
  474. &quot;&quot;&quot;Wraps `int pwm_tostring(pwm_t* pwm, char* str, size_t len)`&quot;&quot;&quot;
  475. def pwm_errno(pwm: intptr, /) -&gt; int:
  476. &quot;&quot;&quot;Wraps `int pwm_errno(pwm_t* pwm)`&quot;&quot;&quot;
  477. def pwm_errmsg(pwm: intptr, /) -&gt; str:
  478. &quot;&quot;&quot;Wraps `const char* pwm_errmsg(pwm_t* pwm)`&quot;&quot;&quot;
  479. def serial_new() -&gt; intptr:
  480. &quot;&quot;&quot;Wraps `serial_t* serial_new()`&quot;&quot;&quot;
  481. def serial_open(serial: intptr, path: str, baudrate: int, /) -&gt; int:
  482. &quot;&quot;&quot;Wraps `int serial_open(serial_t* serial, const char* path, uint32_t baudrate)`&quot;&quot;&quot;
  483. def serial_open_advanced(serial: intptr, path: str, baudrate: int, databits: int, parity: int, stopbits: int, xonxoff: bool, rtscts: bool, /) -&gt; int:
  484. &quot;&quot;&quot;Wraps `int serial_open_advanced(serial_t* serial, const char* path, uint32_t baudrate, unsigned databits, serial_parity_t parity, unsigned stopbits, bool xonxoff, bool rtscts)`&quot;&quot;&quot;
  485. def serial_read(serial: intptr, buf: intptr, len: int, timeout_ms: int, /) -&gt; int:
  486. &quot;&quot;&quot;Wraps `int serial_read(serial_t* serial, uint8_t* buf, size_t len, int timeout_ms)`&quot;&quot;&quot;
  487. def serial_write(serial: intptr, buf: intptr, len: int, /) -&gt; int:
  488. &quot;&quot;&quot;Wraps `int serial_write(serial_t* serial, const uint8_t* buf, size_t len)`&quot;&quot;&quot;
  489. def serial_flush(serial: intptr, /) -&gt; int:
  490. &quot;&quot;&quot;Wraps `int serial_flush(serial_t* serial)`&quot;&quot;&quot;
  491. def serial_input_waiting(serial: intptr, count: intptr, /) -&gt; int:
  492. &quot;&quot;&quot;Wraps `int serial_input_waiting(serial_t* serial, unsigned* count)`&quot;&quot;&quot;
  493. def serial_output_waiting(serial: intptr, count: intptr, /) -&gt; int:
  494. &quot;&quot;&quot;Wraps `int serial_output_waiting(serial_t* serial, unsigned* count)`&quot;&quot;&quot;
  495. def serial_poll(serial: intptr, timeout_ms: int, /) -&gt; int:
  496. &quot;&quot;&quot;Wraps `int serial_poll(serial_t* serial, int timeout_ms)`&quot;&quot;&quot;
  497. def serial_close(serial: intptr, /) -&gt; int:
  498. &quot;&quot;&quot;Wraps `int serial_close(serial_t* serial)`&quot;&quot;&quot;
  499. def serial_free(serial: intptr, /) -&gt; None:
  500. &quot;&quot;&quot;Wraps `void serial_free(serial_t* serial)`&quot;&quot;&quot;
  501. def serial_get_baudrate(serial: intptr, baudrate: intptr, /) -&gt; int:
  502. &quot;&quot;&quot;Wraps `int serial_get_baudrate(serial_t* serial, uint32_t* baudrate)`&quot;&quot;&quot;
  503. def serial_get_databits(serial: intptr, databits: intptr, /) -&gt; int:
  504. &quot;&quot;&quot;Wraps `int serial_get_databits(serial_t* serial, unsigned* databits)`&quot;&quot;&quot;
  505. def serial_get_parity(serial: intptr, parity: intptr, /) -&gt; int:
  506. &quot;&quot;&quot;Wraps `int serial_get_parity(serial_t* serial, serial_parity_t* parity)`&quot;&quot;&quot;
  507. def serial_get_stopbits(serial: intptr, stopbits: intptr, /) -&gt; int:
  508. &quot;&quot;&quot;Wraps `int serial_get_stopbits(serial_t* serial, unsigned* stopbits)`&quot;&quot;&quot;
  509. def serial_get_xonxoff(serial: intptr, xonxoff: intptr, /) -&gt; int:
  510. &quot;&quot;&quot;Wraps `int serial_get_xonxoff(serial_t* serial, bool* xonxoff)`&quot;&quot;&quot;
  511. def serial_get_rtscts(serial: intptr, rtscts: intptr, /) -&gt; int:
  512. &quot;&quot;&quot;Wraps `int serial_get_rtscts(serial_t* serial, bool* rtscts)`&quot;&quot;&quot;
  513. def serial_get_vmin(serial: intptr, vmin: intptr, /) -&gt; int:
  514. &quot;&quot;&quot;Wraps `int serial_get_vmin(serial_t* serial, unsigned* vmin)`&quot;&quot;&quot;
  515. def serial_get_vtime(serial: intptr, vtime: intptr, /) -&gt; int:
  516. &quot;&quot;&quot;Wraps `int serial_get_vtime(serial_t* serial, float* vtime)`&quot;&quot;&quot;
  517. def serial_set_baudrate(serial: intptr, baudrate: int, /) -&gt; int:
  518. &quot;&quot;&quot;Wraps `int serial_set_baudrate(serial_t* serial, uint32_t baudrate)`&quot;&quot;&quot;
  519. def serial_set_databits(serial: intptr, databits: int, /) -&gt; int:
  520. &quot;&quot;&quot;Wraps `int serial_set_databits(serial_t* serial, unsigned databits)`&quot;&quot;&quot;
  521. def serial_set_parity(serial: intptr, parity: int, /) -&gt; int:
  522. &quot;&quot;&quot;Wraps `int serial_set_parity(serial_t* serial, serial_parity_t parity)`&quot;&quot;&quot;
  523. def serial_set_stopbits(serial: intptr, stopbits: int, /) -&gt; int:
  524. &quot;&quot;&quot;Wraps `int serial_set_stopbits(serial_t* serial, unsigned stopbits)`&quot;&quot;&quot;
  525. def serial_set_xonxoff(serial: intptr, enabled: bool, /) -&gt; int:
  526. &quot;&quot;&quot;Wraps `int serial_set_xonxoff(serial_t* serial, bool enabled)`&quot;&quot;&quot;
  527. def serial_set_rtscts(serial: intptr, enabled: bool, /) -&gt; int:
  528. &quot;&quot;&quot;Wraps `int serial_set_rtscts(serial_t* serial, bool enabled)`&quot;&quot;&quot;
  529. def serial_set_vmin(serial: intptr, vmin: int, /) -&gt; int:
  530. &quot;&quot;&quot;Wraps `int serial_set_vmin(serial_t* serial, unsigned vmin)`&quot;&quot;&quot;
  531. def serial_set_vtime(serial: intptr, vtime: float, /) -&gt; int:
  532. &quot;&quot;&quot;Wraps `int serial_set_vtime(serial_t* serial, float vtime)`&quot;&quot;&quot;
  533. def serial_fd(serial: intptr, /) -&gt; int:
  534. &quot;&quot;&quot;Wraps `int serial_fd(serial_t* serial)`&quot;&quot;&quot;
  535. def serial_tostring(serial: intptr, str: intptr, len: int, /) -&gt; int:
  536. &quot;&quot;&quot;Wraps `int serial_tostring(serial_t* serial, char* str, size_t len)`&quot;&quot;&quot;
  537. def serial_errno(serial: intptr, /) -&gt; int:
  538. &quot;&quot;&quot;Wraps `int serial_errno(serial_t* serial)`&quot;&quot;&quot;
  539. def serial_errmsg(serial: intptr, /) -&gt; str:
  540. &quot;&quot;&quot;Wraps `const char* serial_errmsg(serial_t* serial)`&quot;&quot;&quot;
  541. def spi_new() -&gt; intptr:
  542. &quot;&quot;&quot;Wraps `spi_t* spi_new()`&quot;&quot;&quot;
  543. def spi_open(spi: intptr, path: str, mode: int, max_speed: int, /) -&gt; int:
  544. &quot;&quot;&quot;Wraps `int spi_open(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed)`&quot;&quot;&quot;
  545. def spi_open_advanced(spi: intptr, path: str, mode: int, max_speed: int, bit_order: int, bits_per_word: int, extra_flags: int, /) -&gt; int:
  546. &quot;&quot;&quot;Wraps `int spi_open_advanced(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed, spi_bit_order_t bit_order, uint8_t bits_per_word, uint8_t extra_flags)`&quot;&quot;&quot;
  547. def spi_open_advanced2(spi: intptr, path: str, mode: int, max_speed: int, bit_order: int, bits_per_word: int, extra_flags: int, /) -&gt; int:
  548. &quot;&quot;&quot;Wraps `int spi_open_advanced2(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed, spi_bit_order_t bit_order, uint8_t bits_per_word, uint32_t extra_flags)`&quot;&quot;&quot;
  549. def spi_transfer(spi: intptr, txbuf: intptr, rxbuf: intptr, len: int, /) -&gt; int:
  550. &quot;&quot;&quot;Wraps `int spi_transfer(spi_t* spi, const uint8_t* txbuf, uint8_t* rxbuf, size_t len)`&quot;&quot;&quot;
  551. def spi_transfer_advanced(spi: intptr, msgs: intptr, count: int, /) -&gt; int:
  552. &quot;&quot;&quot;Wraps `int spi_transfer_advanced(spi_t* spi, const spi_msg_t* msgs, size_t count)`&quot;&quot;&quot;
  553. def spi_close(spi: intptr, /) -&gt; int:
  554. &quot;&quot;&quot;Wraps `int spi_close(spi_t* spi)`&quot;&quot;&quot;
  555. def spi_free(spi: intptr, /) -&gt; None:
  556. &quot;&quot;&quot;Wraps `void spi_free(spi_t* spi)`&quot;&quot;&quot;
  557. def spi_get_mode(spi: intptr, mode: intptr, /) -&gt; int:
  558. &quot;&quot;&quot;Wraps `int spi_get_mode(spi_t* spi, unsigned* mode)`&quot;&quot;&quot;
  559. def spi_get_max_speed(spi: intptr, max_speed: intptr, /) -&gt; int:
  560. &quot;&quot;&quot;Wraps `int spi_get_max_speed(spi_t* spi, uint32_t* max_speed)`&quot;&quot;&quot;
  561. def spi_get_bit_order(spi: intptr, bit_order: intptr, /) -&gt; int:
  562. &quot;&quot;&quot;Wraps `int spi_get_bit_order(spi_t* spi, spi_bit_order_t* bit_order)`&quot;&quot;&quot;
  563. def spi_get_bits_per_word(spi: intptr, bits_per_word: intptr, /) -&gt; int:
  564. &quot;&quot;&quot;Wraps `int spi_get_bits_per_word(spi_t* spi, uint8_t* bits_per_word)`&quot;&quot;&quot;
  565. def spi_get_extra_flags(spi: intptr, extra_flags: intptr, /) -&gt; int:
  566. &quot;&quot;&quot;Wraps `int spi_get_extra_flags(spi_t* spi, uint8_t* extra_flags)`&quot;&quot;&quot;
  567. def spi_get_extra_flags32(spi: intptr, extra_flags: intptr, /) -&gt; int:
  568. &quot;&quot;&quot;Wraps `int spi_get_extra_flags32(spi_t* spi, uint32_t* extra_flags)`&quot;&quot;&quot;
  569. def spi_set_mode(spi: intptr, mode: int, /) -&gt; int:
  570. &quot;&quot;&quot;Wraps `int spi_set_mode(spi_t* spi, unsigned mode)`&quot;&quot;&quot;
  571. def spi_set_max_speed(spi: intptr, max_speed: int, /) -&gt; int:
  572. &quot;&quot;&quot;Wraps `int spi_set_max_speed(spi_t* spi, uint32_t max_speed)`&quot;&quot;&quot;
  573. def spi_set_bit_order(spi: intptr, bit_order: int, /) -&gt; int:
  574. &quot;&quot;&quot;Wraps `int spi_set_bit_order(spi_t* spi, spi_bit_order_t bit_order)`&quot;&quot;&quot;
  575. def spi_set_bits_per_word(spi: intptr, bits_per_word: int, /) -&gt; int:
  576. &quot;&quot;&quot;Wraps `int spi_set_bits_per_word(spi_t* spi, uint8_t bits_per_word)`&quot;&quot;&quot;
  577. def spi_set_extra_flags(spi: intptr, extra_flags: int, /) -&gt; int:
  578. &quot;&quot;&quot;Wraps `int spi_set_extra_flags(spi_t* spi, uint8_t extra_flags)`&quot;&quot;&quot;
  579. def spi_set_extra_flags32(spi: intptr, extra_flags: int, /) -&gt; int:
  580. &quot;&quot;&quot;Wraps `int spi_set_extra_flags32(spi_t* spi, uint32_t extra_flags)`&quot;&quot;&quot;
  581. def spi_fd(spi: intptr, /) -&gt; int:
  582. &quot;&quot;&quot;Wraps `int spi_fd(spi_t* spi)`&quot;&quot;&quot;
  583. def spi_tostring(spi: intptr, str: intptr, len: int, /) -&gt; int:
  584. &quot;&quot;&quot;Wraps `int spi_tostring(spi_t* spi, char* str, size_t len)`&quot;&quot;&quot;
  585. def spi_errno(spi: intptr, /) -&gt; int:
  586. &quot;&quot;&quot;Wraps `int spi_errno(spi_t* spi)`&quot;&quot;&quot;
  587. def spi_errmsg(spi: intptr, /) -&gt; str:
  588. &quot;&quot;&quot;Wraps `const char* spi_errmsg(spi_t* spi)`&quot;&quot;&quot;
  589. def periphery_version() -&gt; str:
  590. &quot;&quot;&quot;Wraps `const char* periphery_version()`&quot;&quot;&quot;
  591. def periphery_version_info() -&gt; intptr:
  592. &quot;&quot;&quot;Wraps `const periphery_version_t* periphery_version_info()`&quot;&quot;&quot;
  593. # aliases
  594. gpio_direction_t = int
  595. gpio_edge_t = int
  596. gpio_event_clock_t = int
  597. gpio_bias_t = int
  598. gpio_drive_t = int
  599. pwm_polarity_t = int
  600. serial_parity_t = int
  601. spi_bit_order_t = int
  602. # enums
  603. GPIO_ERROR_ARG: int
  604. GPIO_ERROR_OPEN: int
  605. GPIO_ERROR_NOT_FOUND: int
  606. GPIO_ERROR_QUERY: int
  607. GPIO_ERROR_CONFIGURE: int
  608. GPIO_ERROR_UNSUPPORTED: int
  609. GPIO_ERROR_INVALID_OPERATION: int
  610. GPIO_ERROR_IO: int
  611. GPIO_ERROR_CLOSE: int
  612. GPIO_DIR_IN: int
  613. GPIO_DIR_OUT: int
  614. GPIO_DIR_OUT_LOW: int
  615. GPIO_DIR_OUT_HIGH: int
  616. GPIO_EDGE_NONE: int
  617. GPIO_EDGE_RISING: int
  618. GPIO_EDGE_FALLING: int
  619. GPIO_EDGE_BOTH: int
  620. GPIO_EVENT_CLOCK_REALTIME: int
  621. GPIO_EVENT_CLOCK_MONOTONIC: int
  622. GPIO_EVENT_CLOCK_HTE: int
  623. GPIO_BIAS_DEFAULT: int
  624. GPIO_BIAS_PULL_UP: int
  625. GPIO_BIAS_PULL_DOWN: int
  626. GPIO_BIAS_DISABLE: int
  627. GPIO_DRIVE_DEFAULT: int
  628. GPIO_DRIVE_OPEN_DRAIN: int
  629. GPIO_DRIVE_OPEN_SOURCE: int
  630. LED_ERROR_ARG: int
  631. LED_ERROR_OPEN: int
  632. LED_ERROR_QUERY: int
  633. LED_ERROR_IO: int
  634. LED_ERROR_CLOSE: int
  635. MMIO_ERROR_ARG: int
  636. MMIO_ERROR_OPEN: int
  637. MMIO_ERROR_CLOSE: int
  638. PWM_ERROR_ARG: int
  639. PWM_ERROR_OPEN: int
  640. PWM_ERROR_QUERY: int
  641. PWM_ERROR_CONFIGURE: int
  642. PWM_ERROR_CLOSE: int
  643. PWM_POLARITY_NORMAL: int
  644. PWM_POLARITY_INVERSED: int
  645. SERIAL_ERROR_ARG: int
  646. SERIAL_ERROR_OPEN: int
  647. SERIAL_ERROR_QUERY: int
  648. SERIAL_ERROR_CONFIGURE: int
  649. SERIAL_ERROR_IO: int
  650. SERIAL_ERROR_CLOSE: int
  651. PARITY_NONE: int
  652. PARITY_ODD: int
  653. PARITY_EVEN: int
  654. SPI_ERROR_ARG: int
  655. SPI_ERROR_OPEN: int
  656. SPI_ERROR_QUERY: int
  657. SPI_ERROR_CONFIGURE: int
  658. SPI_ERROR_TRANSFER: int
  659. SPI_ERROR_CLOSE: int
  660. SPI_ERROR_UNSUPPORTED: int
  661. MSB_FIRST: int
  662. LSB_FIRST: int</code></pre>
  663. </doc-codeblock></div>
  664. <!-- Required only on API pages -->
  665. <doc-toolbar-member-filter-no-results></doc-toolbar-member-filter-no-results>
  666. </div>
  667. <footer id="retype-content-footer" class="clear-both">
  668. <nav id="retype-nextprev" class="print:hidden flex mt-14">
  669. <div class="w-1/2">
  670. <a class="px-5 py-4 h-full flex items-center break-normal font-medium text-body-link border border-base-border hover:border-base-border-hover rounded-l-lg transition-colors duration-150 relative hover:z-5" href="../../modules/operator/">
  671. <svg xmlns="http://www.w3.org/2000/svg" class="mr-3" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" overflow="visible"><path d="M19 11H7.41l5.29-5.29a.996.996 0 10-1.41-1.41l-7 7a1 1 0 000 1.42l7 7a1.024 1.024 0 001.42-.01.996.996 0 000-1.41L7.41 13H19c.55 0 1-.45 1-1s-.45-1-1-1z" /><path fill="none" d="M0 0h24v24H0z" /></svg>
  672. <span>
  673. <span class="block text-xs font-normal text-base-text-muted">Previous</span>
  674. <span class="block mt-1">operator</span>
  675. </span>
  676. </a>
  677. </div>
  678. <div class="w-1/2">
  679. <a class="px-5 py-4 -mx-px h-full flex items-center justify-end break-normal font-medium text-body-link border border-base-border hover:border-base-border-hover rounded-r-lg transition-colors duration-150 relative hover:z-5" href="../../modules/pickle/">
  680. <span>
  681. <span class="block text-xs font-normal text-right text-base-text-muted">Next</span>
  682. <span class="block mt-1">pickle</span>
  683. </span>
  684. <svg xmlns="http://www.w3.org/2000/svg" class="ml-3" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" overflow="visible"><path d="M19.92 12.38a1 1 0 00-.22-1.09l-7-7a.996.996 0 10-1.41 1.41l5.3 5.3H5c-.55 0-1 .45-1 1s.45 1 1 1h11.59l-5.29 5.29a.996.996 0 000 1.41c.19.2.44.3.7.3s.51-.1.71-.29l7-7c.09-.09.16-.21.21-.33z" /><path fill="none" d="M0 0h24v24H0z" /></svg>
  685. </a>
  686. </div>
  687. </nav>
  688. </footer>
  689. </main>
  690. <div id="retype-page-footer" class="print:border-none border-t border-base-border pt-6 mb-8">
  691. <footer class="flex flex-wrap items-center justify-between print:justify-center">
  692. <div id="retype-footer-links" class="print:hidden">
  693. <ul class="flex flex-wrap items-center text-sm">
  694. </ul>
  695. </div>
  696. <div id="retype-copyright" class="print:justify-center py-2 text-footer-text font-footer-link text-sm leading-relaxed"><p>© Copyright 2026 - <a href="https://github.com/blueloveTH">blueloveTH</a> - All rights reserved.</p></div>
  697. </footer>
  698. </div>
  699. </div>
  700. <!-- Rendered if sidebar right is enabled -->
  701. <!-- Sidebar right skeleton-->
  702. <div v-cloak class="fixed top-0 bottom-0 right-0 translate-x-full bg-sidebar-right-bg border-sidebar-right-border lg:sticky lg:border-l lg:shrink-0 lg:pt-6 lg:translate-x-0 sm:w-1/2 lg:w-64 lg:z-0 md:w-104 sidebar-right skeleton">
  703. <div class="pl-5">
  704. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  705. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  706. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  707. </div>
  708. </div>
  709. <!-- User should be able to hide sidebar right -->
  710. <doc-sidebar-right v-cloak></doc-sidebar-right>
  711. </div>
  712. </div>
  713. </div>
  714. <doc-search-mobile></doc-search-mobile>
  715. <doc-back-to-top></doc-back-to-top>
  716. </div>
  717. <div id="retype-overlay-target"></div>
  718. <script data-cfasync="false">window.__DOCS__ = { "title": "periphery", level: 2, icon: "file", hasPrism: true, hasMermaid: false, hasMath: false, tocDepth: 23 }</script>
  719. </body>
  720. </html>