index.html 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  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.3.0.827133044009">
  8. <!-- See retype.com -->
  9. <meta name="generator" content="Retype 4.3.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. <!-- Twitter -->
  24. <meta name="twitter:card" content="summary_large_image">
  25. <meta name="twitter:url" content="https://pocketpy.dev/modules/periphery/">
  26. <meta name="twitter:title" content="periphery | Portable Python 3.x Interpreter in Modern C">
  27. <meta name="twitter:description" content="This module is optional. Set option PK_BUILD_MODULE_PERIPHERY to ON in your CMakeLists.txt to enable it.">
  28. <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>
  29. <link id="retype-favicon" rel="icon" href="../../static/logo.png" />
  30. <link href="../../resources/css/retype.css?v=4.3.0.827133044009" rel="stylesheet">
  31. <script data-cfasync="false" src="../../resources/js/config.js?v=4.3.0.827133044009" data-turbo-eval="false" defer></script>
  32. <script data-cfasync="false" src="../../resources/js/retype.js?v=4.3.0" data-turbo-eval="false" defer></script>
  33. <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=4.3.0.827133044009" data-turbo-eval="false" defer></script>
  34. <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=4.3.0.827133044009" defer></script>
  35. </head>
  36. <body>
  37. <div id="retype-app" class="relative text-base antialiased text-base-text bg-base-bg font-body">
  38. <div class="absolute bottom-0 left-0" style="top: 5rem; right: 50%"></div>
  39. <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">
  40. <div class="container relative flex items-center justify-between pr-6 grow md:justify-start">
  41. <!-- Mobile menu button skeleton -->
  42. <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>
  43. <div v-cloak id="retype-sidebar-left-toggle-button"></div>
  44. <!-- Logo -->
  45. <div class="flex items-center justify-between h-full py-2 md:w-75">
  46. <div class="flex items-center px-2 md:px-6">
  47. <a id="retype-branding-logo" href="https://pocketpy.dev/" class="flex items-center leading-snug text-2xl">
  48. <span class="w-10 mr-2 grow-0 shrink-0 overflow-hidden">
  49. <img class="max-h-10 dark:hidden md:inline-block" src="../../static/logo.png" alt="" width="512" height="512">
  50. <img class="max-h-10 hidden dark:inline-block" src="../../static/logo.png" alt="" width="512" height="512">
  51. </span>
  52. <span class="dark:text-white font-bold line-clamp-1 md:line-clamp-2">pocketpy</span>
  53. </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>
  54. </div>
  55. <span class="hidden h-8 border-r md:inline-block border-base-border"></span>
  56. </div>
  57. <div class="flex justify-between md:grow">
  58. <!-- Top Nav -->
  59. <nav id="retype-header-nav" class="hidden md:flex">
  60. <ul class="flex flex-col mb-4 md:pl-16 md:mb-0 md:flex-row md:items-center">
  61. <li class="mr-6">
  62. <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="">
  63. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  64. <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"/>
  65. </svg>
  66. <span>Home</span>
  67. </a>
  68. </li>
  69. <li class="mr-6">
  70. <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">
  71. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  72. <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"/>
  73. </svg>
  74. <span>Live Demo</span>
  75. </a>
  76. </li>
  77. <li class="mr-6">
  78. <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">
  79. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  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. </svg>
  82. <span>Live Examples</span>
  83. </a>
  84. </li>
  85. <li class="mr-6">
  86. <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">
  87. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  88. <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"/>
  89. </svg>
  90. <span>Github</span>
  91. </a>
  92. </li>
  93. <li class="mr-6">
  94. <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">
  95. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  96. <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"/>
  97. </svg>
  98. <span>Discord</span>
  99. </a>
  100. </li>
  101. </ul>
  102. </nav>
  103. <div v-cloak class="flex justify-end grow">
  104. <div id="retype-mobile-search-button"></div>
  105. <doc-search-desktop></doc-search-desktop>
  106. <doc-theme-switch class="lg:ml-2"></doc-theme-switch>
  107. <doc-history></doc-history>
  108. </div>
  109. </div>
  110. </div>
  111. </header>
  112. <div id="retype-container" class="container relative flex bg-white">
  113. <!-- Sidebar Skeleton -->
  114. <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">
  115. <div class="flex items-center h-16 px-6">
  116. <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">
  117. </div>
  118. <div class="pl-6 mt-1 mb-4">
  119. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  120. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  121. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  122. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  123. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  124. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  125. </div>
  126. <div class="shrink-0 mt-auto bg-transparent dark:border-base-border">
  127. <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">
  128. <span class="text-xs whitespace-nowrap">Powered by</span>
  129. <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>
  130. </a>
  131. </div>
  132. </div>
  133. <!-- Sidebar component -->
  134. <doc-sidebar v-cloak>
  135. <template #sidebar-footer>
  136. <div class="shrink-0 mt-auto border-t md:bg-transparent md:border-none dark:border-base-border">
  137. <div class="py-3 px-6 md:hidden border-b dark:border-base-border">
  138. <nav>
  139. <ul class="flex flex-wrap justify-center items-center">
  140. <li class="mr-6">
  141. <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="">
  142. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  143. <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"/>
  144. </svg>
  145. <span>Home</span>
  146. </a>
  147. </li>
  148. <li class="mr-6">
  149. <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">
  150. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  151. <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"/>
  152. </svg>
  153. <span>Live Demo</span>
  154. </a>
  155. </li>
  156. <li class="mr-6">
  157. <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">
  158. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  159. <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"/>
  160. </svg>
  161. <span>Live Examples</span>
  162. </a>
  163. </li>
  164. <li class="mr-6">
  165. <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">
  166. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  167. <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"/>
  168. </svg>
  169. <span>Github</span>
  170. </a>
  171. </li>
  172. <li class="mr-6">
  173. <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">
  174. <svg xmlns="http://www.w3.org/2000/svg" class="mb-px mr-1.5" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
  175. <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"/>
  176. </svg>
  177. <span>Discord</span>
  178. </a>
  179. </li>
  180. </ul>
  181. </nav>
  182. </div>
  183. <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">
  184. <span class="text-xs whitespace-nowrap">Powered by</span>
  185. <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>
  186. </a>
  187. </div>
  188. </template>
  189. </doc-sidebar>
  190. <div class="grow min-w-0 bg-body-bg">
  191. <!-- Render "toolbar" template here on api pages --><!-- Render page content -->
  192. <div class="flex">
  193. <div id="retype-main" class="min-w-0 p-4 grow md:px-16">
  194. <main class="relative pb-12 lg:pt-2">
  195. <div class="retype-markdown" id="retype-content">
  196. <!-- Rendered if sidebar right is enabled -->
  197. <div id="retype-sidebar-right-toggle"></div>
  198. <!-- Page content -->
  199. <h1 id="periphery">periphery</h1>
  200. <div class="flex mb-6">
  201. <div class="shrink-0 w-1.5 rounded-tl-lg rounded-bl-lg bg-callout-primary"></div>
  202. <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">
  203. <div class="flex items-center ml-4 h-7">
  204. <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">
  205. <g fill="currentColor"><g>
  206. <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>
  207. <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>
  208. <path fill="none" d="M0 0h24v24H0z"></path>
  209. </g></g>
  210. </svg>
  211. </div>
  212. <div class="pr-5 ml-3 w-full">
  213. <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>
  214. </div>
  215. </div>
  216. </div>
  217. <h4 id="source-code">Source code</h4>
  218. <div id="source-code-code-1" class="codeblock-wrapper"><doc-codeblock>
  219. <pre translate="no" class="language-python"><code v-pre class="language-python">from typing import overload
  220. from stdc import intptr
  221. class gpio_config:
  222. direction: int # (gpio_direction_t)
  223. edge: int # (gpio_edge_t)
  224. event_clock: int # (gpio_event_clock_t)
  225. debounce_us: int # (uint32_t)
  226. bias: int # (gpio_bias_t)
  227. drive: int # (gpio_drive_t)
  228. inverted: bool # (bool)
  229. label: str # (const char*)
  230. @overload
  231. def __init__(self): ...
  232. @overload
  233. def __init__(self, direction: int, edge: int, event_clock: int, debounce_us: int, bias: int, drive: int, inverted: bool, label: str): ...
  234. class spi_msg:
  235. txbuf: intptr # (const uint8_t*)
  236. rxbuf: intptr # (uint8_t*)
  237. len: int # (size_t)
  238. deselect: bool # (bool)
  239. deselect_delay_us: int # (uint16_t)
  240. word_delay_us: int # (uint8_t)
  241. @overload
  242. def __init__(self): ...
  243. @overload
  244. def __init__(self, txbuf: intptr, rxbuf: intptr, len: int, deselect: bool, deselect_delay_us: int, word_delay_us: int): ...
  245. class periphery_version:
  246. major: int # (unsigned)
  247. minor: int # (unsigned)
  248. patch: int # (unsigned)
  249. commit_id: str # (const char*)
  250. @overload
  251. def __init__(self): ...
  252. @overload
  253. def __init__(self, major: int, minor: int, patch: int, commit_id: str): ...
  254. def gpio_new() -&gt; intptr:
  255. &quot;&quot;&quot;Wraps `gpio_t* gpio_new()`&quot;&quot;&quot;
  256. def gpio_open(gpio: intptr, path: str, line: int, direction: int, /) -&gt; int:
  257. &quot;&quot;&quot;Wraps `int gpio_open(gpio_t* gpio, const char* path, unsigned line, gpio_direction_t direction)`&quot;&quot;&quot;
  258. def gpio_open_name(gpio: intptr, path: str, name: str, direction: int, /) -&gt; int:
  259. &quot;&quot;&quot;Wraps `int gpio_open_name(gpio_t* gpio, const char* path, const char* name, gpio_direction_t direction)`&quot;&quot;&quot;
  260. def gpio_open_advanced(gpio: intptr, path: str, line: int, config: intptr, /) -&gt; int:
  261. &quot;&quot;&quot;Wraps `int gpio_open_advanced(gpio_t* gpio, const char* path, unsigned line, const gpio_config_t* config)`&quot;&quot;&quot;
  262. def gpio_open_name_advanced(gpio: intptr, path: str, name: str, config: intptr, /) -&gt; int:
  263. &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;
  264. def gpio_open_sysfs(gpio: intptr, line: int, direction: int, /) -&gt; int:
  265. &quot;&quot;&quot;Wraps `int gpio_open_sysfs(gpio_t* gpio, unsigned line, gpio_direction_t direction)`&quot;&quot;&quot;
  266. def gpio_read(gpio: intptr, value: intptr, /) -&gt; int:
  267. &quot;&quot;&quot;Wraps `int gpio_read(gpio_t* gpio, bool* value)`&quot;&quot;&quot;
  268. def gpio_write(gpio: intptr, value: bool, /) -&gt; int:
  269. &quot;&quot;&quot;Wraps `int gpio_write(gpio_t* gpio, bool value)`&quot;&quot;&quot;
  270. def gpio_poll(gpio: intptr, timeout_ms: int, /) -&gt; int:
  271. &quot;&quot;&quot;Wraps `int gpio_poll(gpio_t* gpio, int timeout_ms)`&quot;&quot;&quot;
  272. def gpio_close(gpio: intptr, /) -&gt; int:
  273. &quot;&quot;&quot;Wraps `int gpio_close(gpio_t* gpio)`&quot;&quot;&quot;
  274. def gpio_free(gpio: intptr, /) -&gt; None:
  275. &quot;&quot;&quot;Wraps `void gpio_free(gpio_t* gpio)`&quot;&quot;&quot;
  276. def gpio_read_event(gpio: intptr, edge: intptr, timestamp: intptr, /) -&gt; int:
  277. &quot;&quot;&quot;Wraps `int gpio_read_event(gpio_t* gpio, gpio_edge_t* edge, uint64_t* timestamp)`&quot;&quot;&quot;
  278. def gpio_poll_multiple(gpios: intptr, count: int, timeout_ms: int, gpios_ready: intptr, /) -&gt; int:
  279. &quot;&quot;&quot;Wraps `int gpio_poll_multiple(gpio_t** gpios, size_t count, int timeout_ms, bool* gpios_ready)`&quot;&quot;&quot;
  280. def gpio_get_direction(gpio: intptr, direction: intptr, /) -&gt; int:
  281. &quot;&quot;&quot;Wraps `int gpio_get_direction(gpio_t* gpio, gpio_direction_t* direction)`&quot;&quot;&quot;
  282. def gpio_get_edge(gpio: intptr, edge: intptr, /) -&gt; int:
  283. &quot;&quot;&quot;Wraps `int gpio_get_edge(gpio_t* gpio, gpio_edge_t* edge)`&quot;&quot;&quot;
  284. def gpio_get_event_clock(gpio: intptr, event_clock: intptr, /) -&gt; int:
  285. &quot;&quot;&quot;Wraps `int gpio_get_event_clock(gpio_t* gpio, gpio_event_clock_t* event_clock)`&quot;&quot;&quot;
  286. def gpio_get_debounce_us(gpio: intptr, debounce_us: intptr, /) -&gt; int:
  287. &quot;&quot;&quot;Wraps `int gpio_get_debounce_us(gpio_t* gpio, uint32_t* debounce_us)`&quot;&quot;&quot;
  288. def gpio_get_bias(gpio: intptr, bias: intptr, /) -&gt; int:
  289. &quot;&quot;&quot;Wraps `int gpio_get_bias(gpio_t* gpio, gpio_bias_t* bias)`&quot;&quot;&quot;
  290. def gpio_get_drive(gpio: intptr, drive: intptr, /) -&gt; int:
  291. &quot;&quot;&quot;Wraps `int gpio_get_drive(gpio_t* gpio, gpio_drive_t* drive)`&quot;&quot;&quot;
  292. def gpio_get_inverted(gpio: intptr, inverted: intptr, /) -&gt; int:
  293. &quot;&quot;&quot;Wraps `int gpio_get_inverted(gpio_t* gpio, bool* inverted)`&quot;&quot;&quot;
  294. def gpio_set_direction(gpio: intptr, direction: int, /) -&gt; int:
  295. &quot;&quot;&quot;Wraps `int gpio_set_direction(gpio_t* gpio, gpio_direction_t direction)`&quot;&quot;&quot;
  296. def gpio_set_edge(gpio: intptr, edge: int, /) -&gt; int:
  297. &quot;&quot;&quot;Wraps `int gpio_set_edge(gpio_t* gpio, gpio_edge_t edge)`&quot;&quot;&quot;
  298. def gpio_set_event_clock(gpio: intptr, event_clock: int, /) -&gt; int:
  299. &quot;&quot;&quot;Wraps `int gpio_set_event_clock(gpio_t* gpio, gpio_event_clock_t event_clock)`&quot;&quot;&quot;
  300. def gpio_set_debounce_us(gpio: intptr, debounce_us: int, /) -&gt; int:
  301. &quot;&quot;&quot;Wraps `int gpio_set_debounce_us(gpio_t* gpio, uint32_t debounce_us)`&quot;&quot;&quot;
  302. def gpio_set_bias(gpio: intptr, bias: int, /) -&gt; int:
  303. &quot;&quot;&quot;Wraps `int gpio_set_bias(gpio_t* gpio, gpio_bias_t bias)`&quot;&quot;&quot;
  304. def gpio_set_drive(gpio: intptr, drive: int, /) -&gt; int:
  305. &quot;&quot;&quot;Wraps `int gpio_set_drive(gpio_t* gpio, gpio_drive_t drive)`&quot;&quot;&quot;
  306. def gpio_set_inverted(gpio: intptr, inverted: bool, /) -&gt; int:
  307. &quot;&quot;&quot;Wraps `int gpio_set_inverted(gpio_t* gpio, bool inverted)`&quot;&quot;&quot;
  308. def gpio_line(gpio: intptr, /) -&gt; int:
  309. &quot;&quot;&quot;Wraps `unsigned gpio_line(gpio_t* gpio)`&quot;&quot;&quot;
  310. def gpio_fd(gpio: intptr, /) -&gt; int:
  311. &quot;&quot;&quot;Wraps `int gpio_fd(gpio_t* gpio)`&quot;&quot;&quot;
  312. def gpio_name(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  313. &quot;&quot;&quot;Wraps `int gpio_name(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  314. def gpio_label(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  315. &quot;&quot;&quot;Wraps `int gpio_label(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  316. def gpio_chip_fd(gpio: intptr, /) -&gt; int:
  317. &quot;&quot;&quot;Wraps `int gpio_chip_fd(gpio_t* gpio)`&quot;&quot;&quot;
  318. def gpio_chip_name(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  319. &quot;&quot;&quot;Wraps `int gpio_chip_name(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  320. def gpio_chip_label(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  321. &quot;&quot;&quot;Wraps `int gpio_chip_label(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  322. def gpio_tostring(gpio: intptr, str: intptr, len: int, /) -&gt; int:
  323. &quot;&quot;&quot;Wraps `int gpio_tostring(gpio_t* gpio, char* str, size_t len)`&quot;&quot;&quot;
  324. def gpio_errno(gpio: intptr, /) -&gt; int:
  325. &quot;&quot;&quot;Wraps `int gpio_errno(gpio_t* gpio)`&quot;&quot;&quot;
  326. def gpio_errmsg(gpio: intptr, /) -&gt; str:
  327. &quot;&quot;&quot;Wraps `const char* gpio_errmsg(gpio_t* gpio)`&quot;&quot;&quot;
  328. def led_new() -&gt; intptr:
  329. &quot;&quot;&quot;Wraps `led_t* led_new()`&quot;&quot;&quot;
  330. def led_open(led: intptr, name: str, /) -&gt; int:
  331. &quot;&quot;&quot;Wraps `int led_open(led_t* led, const char* name)`&quot;&quot;&quot;
  332. def led_read(led: intptr, value: intptr, /) -&gt; int:
  333. &quot;&quot;&quot;Wraps `int led_read(led_t* led, bool* value)`&quot;&quot;&quot;
  334. def led_write(led: intptr, value: bool, /) -&gt; int:
  335. &quot;&quot;&quot;Wraps `int led_write(led_t* led, bool value)`&quot;&quot;&quot;
  336. def led_close(led: intptr, /) -&gt; int:
  337. &quot;&quot;&quot;Wraps `int led_close(led_t* led)`&quot;&quot;&quot;
  338. def led_free(led: intptr, /) -&gt; None:
  339. &quot;&quot;&quot;Wraps `void led_free(led_t* led)`&quot;&quot;&quot;
  340. def led_get_brightness(led: intptr, brightness: intptr, /) -&gt; int:
  341. &quot;&quot;&quot;Wraps `int led_get_brightness(led_t* led, unsigned* brightness)`&quot;&quot;&quot;
  342. def led_get_max_brightness(led: intptr, max_brightness: intptr, /) -&gt; int:
  343. &quot;&quot;&quot;Wraps `int led_get_max_brightness(led_t* led, unsigned* max_brightness)`&quot;&quot;&quot;
  344. def led_get_trigger(led: intptr, str: intptr, len: int, /) -&gt; int:
  345. &quot;&quot;&quot;Wraps `int led_get_trigger(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  346. def led_get_triggers_entry(led: intptr, index: int, str: intptr, len: int, /) -&gt; int:
  347. &quot;&quot;&quot;Wraps `int led_get_triggers_entry(led_t* led, unsigned index, char* str, size_t len)`&quot;&quot;&quot;
  348. def led_get_triggers_count(led: intptr, count: intptr, /) -&gt; int:
  349. &quot;&quot;&quot;Wraps `int led_get_triggers_count(led_t* led, unsigned* count)`&quot;&quot;&quot;
  350. def led_set_brightness(led: intptr, brightness: int, /) -&gt; int:
  351. &quot;&quot;&quot;Wraps `int led_set_brightness(led_t* led, unsigned brightness)`&quot;&quot;&quot;
  352. def led_set_trigger(led: intptr, trigger: str, /) -&gt; int:
  353. &quot;&quot;&quot;Wraps `int led_set_trigger(led_t* led, const char* trigger)`&quot;&quot;&quot;
  354. def led_name(led: intptr, str: intptr, len: int, /) -&gt; int:
  355. &quot;&quot;&quot;Wraps `int led_name(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  356. def led_tostring(led: intptr, str: intptr, len: int, /) -&gt; int:
  357. &quot;&quot;&quot;Wraps `int led_tostring(led_t* led, char* str, size_t len)`&quot;&quot;&quot;
  358. def led_errno(led: intptr, /) -&gt; int:
  359. &quot;&quot;&quot;Wraps `int led_errno(led_t* led)`&quot;&quot;&quot;
  360. def led_errmsg(led: intptr, /) -&gt; str:
  361. &quot;&quot;&quot;Wraps `const char* led_errmsg(led_t* led)`&quot;&quot;&quot;
  362. def mmio_new() -&gt; intptr:
  363. &quot;&quot;&quot;Wraps `mmio_t* mmio_new()`&quot;&quot;&quot;
  364. def mmio_open(mmio: intptr, base: int, size: int, /) -&gt; int:
  365. &quot;&quot;&quot;Wraps `int mmio_open(mmio_t* mmio, uintptr_t base, size_t size)`&quot;&quot;&quot;
  366. def mmio_open_advanced(mmio: intptr, base: int, size: int, path: str, /) -&gt; int:
  367. &quot;&quot;&quot;Wraps `int mmio_open_advanced(mmio_t* mmio, uintptr_t base, size_t size, const char* path)`&quot;&quot;&quot;
  368. def mmio_ptr(mmio: intptr, /) -&gt; intptr:
  369. &quot;&quot;&quot;Wraps `void* mmio_ptr(mmio_t* mmio)`&quot;&quot;&quot;
  370. def mmio_read64(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  371. &quot;&quot;&quot;Wraps `int mmio_read64(mmio_t* mmio, uintptr_t offset, uint64_t* value)`&quot;&quot;&quot;
  372. def mmio_read32(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  373. &quot;&quot;&quot;Wraps `int mmio_read32(mmio_t* mmio, uintptr_t offset, uint32_t* value)`&quot;&quot;&quot;
  374. def mmio_read16(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  375. &quot;&quot;&quot;Wraps `int mmio_read16(mmio_t* mmio, uintptr_t offset, uint16_t* value)`&quot;&quot;&quot;
  376. def mmio_read8(mmio: intptr, offset: int, value: intptr, /) -&gt; int:
  377. &quot;&quot;&quot;Wraps `int mmio_read8(mmio_t* mmio, uintptr_t offset, uint8_t* value)`&quot;&quot;&quot;
  378. def mmio_read(mmio: intptr, offset: int, buf: intptr, len: int, /) -&gt; int:
  379. &quot;&quot;&quot;Wraps `int mmio_read(mmio_t* mmio, uintptr_t offset, uint8_t* buf, size_t len)`&quot;&quot;&quot;
  380. def mmio_write64(mmio: intptr, offset: int, value: int, /) -&gt; int:
  381. &quot;&quot;&quot;Wraps `int mmio_write64(mmio_t* mmio, uintptr_t offset, uint64_t value)`&quot;&quot;&quot;
  382. def mmio_write32(mmio: intptr, offset: int, value: int, /) -&gt; int:
  383. &quot;&quot;&quot;Wraps `int mmio_write32(mmio_t* mmio, uintptr_t offset, uint32_t value)`&quot;&quot;&quot;
  384. def mmio_write16(mmio: intptr, offset: int, value: int, /) -&gt; int:
  385. &quot;&quot;&quot;Wraps `int mmio_write16(mmio_t* mmio, uintptr_t offset, uint16_t value)`&quot;&quot;&quot;
  386. def mmio_write8(mmio: intptr, offset: int, value: int, /) -&gt; int:
  387. &quot;&quot;&quot;Wraps `int mmio_write8(mmio_t* mmio, uintptr_t offset, uint8_t value)`&quot;&quot;&quot;
  388. def mmio_write(mmio: intptr, offset: int, buf: intptr, len: int, /) -&gt; int:
  389. &quot;&quot;&quot;Wraps `int mmio_write(mmio_t* mmio, uintptr_t offset, const uint8_t* buf, size_t len)`&quot;&quot;&quot;
  390. def mmio_close(mmio: intptr, /) -&gt; int:
  391. &quot;&quot;&quot;Wraps `int mmio_close(mmio_t* mmio)`&quot;&quot;&quot;
  392. def mmio_free(mmio: intptr, /) -&gt; None:
  393. &quot;&quot;&quot;Wraps `void mmio_free(mmio_t* mmio)`&quot;&quot;&quot;
  394. def mmio_base(mmio: intptr, /) -&gt; int:
  395. &quot;&quot;&quot;Wraps `uintptr_t mmio_base(mmio_t* mmio)`&quot;&quot;&quot;
  396. def mmio_size(mmio: intptr, /) -&gt; int:
  397. &quot;&quot;&quot;Wraps `size_t mmio_size(mmio_t* mmio)`&quot;&quot;&quot;
  398. def mmio_tostring(mmio: intptr, str: intptr, len: int, /) -&gt; int:
  399. &quot;&quot;&quot;Wraps `int mmio_tostring(mmio_t* mmio, char* str, size_t len)`&quot;&quot;&quot;
  400. def mmio_errno(mmio: intptr, /) -&gt; int:
  401. &quot;&quot;&quot;Wraps `int mmio_errno(mmio_t* mmio)`&quot;&quot;&quot;
  402. def mmio_errmsg(mmio: intptr, /) -&gt; str:
  403. &quot;&quot;&quot;Wraps `const char* mmio_errmsg(mmio_t* mmio)`&quot;&quot;&quot;
  404. def pwm_new() -&gt; intptr:
  405. &quot;&quot;&quot;Wraps `pwm_t* pwm_new()`&quot;&quot;&quot;
  406. def pwm_open(pwm: intptr, chip: int, channel: int, /) -&gt; int:
  407. &quot;&quot;&quot;Wraps `int pwm_open(pwm_t* pwm, unsigned chip, unsigned channel)`&quot;&quot;&quot;
  408. def pwm_enable(pwm: intptr, /) -&gt; int:
  409. &quot;&quot;&quot;Wraps `int pwm_enable(pwm_t* pwm)`&quot;&quot;&quot;
  410. def pwm_disable(pwm: intptr, /) -&gt; int:
  411. &quot;&quot;&quot;Wraps `int pwm_disable(pwm_t* pwm)`&quot;&quot;&quot;
  412. def pwm_close(pwm: intptr, /) -&gt; int:
  413. &quot;&quot;&quot;Wraps `int pwm_close(pwm_t* pwm)`&quot;&quot;&quot;
  414. def pwm_free(pwm: intptr, /) -&gt; None:
  415. &quot;&quot;&quot;Wraps `void pwm_free(pwm_t* pwm)`&quot;&quot;&quot;
  416. def pwm_get_enabled(pwm: intptr, enabled: intptr, /) -&gt; int:
  417. &quot;&quot;&quot;Wraps `int pwm_get_enabled(pwm_t* pwm, bool* enabled)`&quot;&quot;&quot;
  418. def pwm_get_period_ns(pwm: intptr, period_ns: intptr, /) -&gt; int:
  419. &quot;&quot;&quot;Wraps `int pwm_get_period_ns(pwm_t* pwm, uint64_t* period_ns)`&quot;&quot;&quot;
  420. def pwm_get_duty_cycle_ns(pwm: intptr, duty_cycle_ns: intptr, /) -&gt; int:
  421. &quot;&quot;&quot;Wraps `int pwm_get_duty_cycle_ns(pwm_t* pwm, uint64_t* duty_cycle_ns)`&quot;&quot;&quot;
  422. def pwm_get_period(pwm: intptr, period: intptr, /) -&gt; int:
  423. &quot;&quot;&quot;Wraps `int pwm_get_period(pwm_t* pwm, double* period)`&quot;&quot;&quot;
  424. def pwm_get_duty_cycle(pwm: intptr, duty_cycle: intptr, /) -&gt; int:
  425. &quot;&quot;&quot;Wraps `int pwm_get_duty_cycle(pwm_t* pwm, double* duty_cycle)`&quot;&quot;&quot;
  426. def pwm_get_frequency(pwm: intptr, frequency: intptr, /) -&gt; int:
  427. &quot;&quot;&quot;Wraps `int pwm_get_frequency(pwm_t* pwm, double* frequency)`&quot;&quot;&quot;
  428. def pwm_get_polarity(pwm: intptr, polarity: intptr, /) -&gt; int:
  429. &quot;&quot;&quot;Wraps `int pwm_get_polarity(pwm_t* pwm, pwm_polarity_t* polarity)`&quot;&quot;&quot;
  430. def pwm_set_enabled(pwm: intptr, enabled: bool, /) -&gt; int:
  431. &quot;&quot;&quot;Wraps `int pwm_set_enabled(pwm_t* pwm, bool enabled)`&quot;&quot;&quot;
  432. def pwm_set_period_ns(pwm: intptr, period_ns: int, /) -&gt; int:
  433. &quot;&quot;&quot;Wraps `int pwm_set_period_ns(pwm_t* pwm, uint64_t period_ns)`&quot;&quot;&quot;
  434. def pwm_set_duty_cycle_ns(pwm: intptr, duty_cycle_ns: int, /) -&gt; int:
  435. &quot;&quot;&quot;Wraps `int pwm_set_duty_cycle_ns(pwm_t* pwm, uint64_t duty_cycle_ns)`&quot;&quot;&quot;
  436. def pwm_set_period(pwm: intptr, period: float, /) -&gt; int:
  437. &quot;&quot;&quot;Wraps `int pwm_set_period(pwm_t* pwm, double period)`&quot;&quot;&quot;
  438. def pwm_set_duty_cycle(pwm: intptr, duty_cycle: float, /) -&gt; int:
  439. &quot;&quot;&quot;Wraps `int pwm_set_duty_cycle(pwm_t* pwm, double duty_cycle)`&quot;&quot;&quot;
  440. def pwm_set_frequency(pwm: intptr, frequency: float, /) -&gt; int:
  441. &quot;&quot;&quot;Wraps `int pwm_set_frequency(pwm_t* pwm, double frequency)`&quot;&quot;&quot;
  442. def pwm_set_polarity(pwm: intptr, polarity: int, /) -&gt; int:
  443. &quot;&quot;&quot;Wraps `int pwm_set_polarity(pwm_t* pwm, pwm_polarity_t polarity)`&quot;&quot;&quot;
  444. def pwm_chip(pwm: intptr, /) -&gt; int:
  445. &quot;&quot;&quot;Wraps `unsigned pwm_chip(pwm_t* pwm)`&quot;&quot;&quot;
  446. def pwm_channel(pwm: intptr, /) -&gt; int:
  447. &quot;&quot;&quot;Wraps `unsigned pwm_channel(pwm_t* pwm)`&quot;&quot;&quot;
  448. def pwm_tostring(pwm: intptr, str: intptr, len: int, /) -&gt; int:
  449. &quot;&quot;&quot;Wraps `int pwm_tostring(pwm_t* pwm, char* str, size_t len)`&quot;&quot;&quot;
  450. def pwm_errno(pwm: intptr, /) -&gt; int:
  451. &quot;&quot;&quot;Wraps `int pwm_errno(pwm_t* pwm)`&quot;&quot;&quot;
  452. def pwm_errmsg(pwm: intptr, /) -&gt; str:
  453. &quot;&quot;&quot;Wraps `const char* pwm_errmsg(pwm_t* pwm)`&quot;&quot;&quot;
  454. def serial_new() -&gt; intptr:
  455. &quot;&quot;&quot;Wraps `serial_t* serial_new()`&quot;&quot;&quot;
  456. def serial_open(serial: intptr, path: str, baudrate: int, /) -&gt; int:
  457. &quot;&quot;&quot;Wraps `int serial_open(serial_t* serial, const char* path, uint32_t baudrate)`&quot;&quot;&quot;
  458. def serial_open_advanced(serial: intptr, path: str, baudrate: int, databits: int, parity: int, stopbits: int, xonxoff: bool, rtscts: bool, /) -&gt; int:
  459. &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;
  460. def serial_read(serial: intptr, buf: intptr, len: int, timeout_ms: int, /) -&gt; int:
  461. &quot;&quot;&quot;Wraps `int serial_read(serial_t* serial, uint8_t* buf, size_t len, int timeout_ms)`&quot;&quot;&quot;
  462. def serial_write(serial: intptr, buf: intptr, len: int, /) -&gt; int:
  463. &quot;&quot;&quot;Wraps `int serial_write(serial_t* serial, const uint8_t* buf, size_t len)`&quot;&quot;&quot;
  464. def serial_flush(serial: intptr, /) -&gt; int:
  465. &quot;&quot;&quot;Wraps `int serial_flush(serial_t* serial)`&quot;&quot;&quot;
  466. def serial_input_waiting(serial: intptr, count: intptr, /) -&gt; int:
  467. &quot;&quot;&quot;Wraps `int serial_input_waiting(serial_t* serial, unsigned* count)`&quot;&quot;&quot;
  468. def serial_output_waiting(serial: intptr, count: intptr, /) -&gt; int:
  469. &quot;&quot;&quot;Wraps `int serial_output_waiting(serial_t* serial, unsigned* count)`&quot;&quot;&quot;
  470. def serial_poll(serial: intptr, timeout_ms: int, /) -&gt; int:
  471. &quot;&quot;&quot;Wraps `int serial_poll(serial_t* serial, int timeout_ms)`&quot;&quot;&quot;
  472. def serial_close(serial: intptr, /) -&gt; int:
  473. &quot;&quot;&quot;Wraps `int serial_close(serial_t* serial)`&quot;&quot;&quot;
  474. def serial_free(serial: intptr, /) -&gt; None:
  475. &quot;&quot;&quot;Wraps `void serial_free(serial_t* serial)`&quot;&quot;&quot;
  476. def serial_get_baudrate(serial: intptr, baudrate: intptr, /) -&gt; int:
  477. &quot;&quot;&quot;Wraps `int serial_get_baudrate(serial_t* serial, uint32_t* baudrate)`&quot;&quot;&quot;
  478. def serial_get_databits(serial: intptr, databits: intptr, /) -&gt; int:
  479. &quot;&quot;&quot;Wraps `int serial_get_databits(serial_t* serial, unsigned* databits)`&quot;&quot;&quot;
  480. def serial_get_parity(serial: intptr, parity: intptr, /) -&gt; int:
  481. &quot;&quot;&quot;Wraps `int serial_get_parity(serial_t* serial, serial_parity_t* parity)`&quot;&quot;&quot;
  482. def serial_get_stopbits(serial: intptr, stopbits: intptr, /) -&gt; int:
  483. &quot;&quot;&quot;Wraps `int serial_get_stopbits(serial_t* serial, unsigned* stopbits)`&quot;&quot;&quot;
  484. def serial_get_xonxoff(serial: intptr, xonxoff: intptr, /) -&gt; int:
  485. &quot;&quot;&quot;Wraps `int serial_get_xonxoff(serial_t* serial, bool* xonxoff)`&quot;&quot;&quot;
  486. def serial_get_rtscts(serial: intptr, rtscts: intptr, /) -&gt; int:
  487. &quot;&quot;&quot;Wraps `int serial_get_rtscts(serial_t* serial, bool* rtscts)`&quot;&quot;&quot;
  488. def serial_get_vmin(serial: intptr, vmin: intptr, /) -&gt; int:
  489. &quot;&quot;&quot;Wraps `int serial_get_vmin(serial_t* serial, unsigned* vmin)`&quot;&quot;&quot;
  490. def serial_get_vtime(serial: intptr, vtime: intptr, /) -&gt; int:
  491. &quot;&quot;&quot;Wraps `int serial_get_vtime(serial_t* serial, float* vtime)`&quot;&quot;&quot;
  492. def serial_set_baudrate(serial: intptr, baudrate: int, /) -&gt; int:
  493. &quot;&quot;&quot;Wraps `int serial_set_baudrate(serial_t* serial, uint32_t baudrate)`&quot;&quot;&quot;
  494. def serial_set_databits(serial: intptr, databits: int, /) -&gt; int:
  495. &quot;&quot;&quot;Wraps `int serial_set_databits(serial_t* serial, unsigned databits)`&quot;&quot;&quot;
  496. def serial_set_parity(serial: intptr, parity: int, /) -&gt; int:
  497. &quot;&quot;&quot;Wraps `int serial_set_parity(serial_t* serial, serial_parity_t parity)`&quot;&quot;&quot;
  498. def serial_set_stopbits(serial: intptr, stopbits: int, /) -&gt; int:
  499. &quot;&quot;&quot;Wraps `int serial_set_stopbits(serial_t* serial, unsigned stopbits)`&quot;&quot;&quot;
  500. def serial_set_xonxoff(serial: intptr, enabled: bool, /) -&gt; int:
  501. &quot;&quot;&quot;Wraps `int serial_set_xonxoff(serial_t* serial, bool enabled)`&quot;&quot;&quot;
  502. def serial_set_rtscts(serial: intptr, enabled: bool, /) -&gt; int:
  503. &quot;&quot;&quot;Wraps `int serial_set_rtscts(serial_t* serial, bool enabled)`&quot;&quot;&quot;
  504. def serial_set_vmin(serial: intptr, vmin: int, /) -&gt; int:
  505. &quot;&quot;&quot;Wraps `int serial_set_vmin(serial_t* serial, unsigned vmin)`&quot;&quot;&quot;
  506. def serial_set_vtime(serial: intptr, vtime: float, /) -&gt; int:
  507. &quot;&quot;&quot;Wraps `int serial_set_vtime(serial_t* serial, float vtime)`&quot;&quot;&quot;
  508. def serial_fd(serial: intptr, /) -&gt; int:
  509. &quot;&quot;&quot;Wraps `int serial_fd(serial_t* serial)`&quot;&quot;&quot;
  510. def serial_tostring(serial: intptr, str: intptr, len: int, /) -&gt; int:
  511. &quot;&quot;&quot;Wraps `int serial_tostring(serial_t* serial, char* str, size_t len)`&quot;&quot;&quot;
  512. def serial_errno(serial: intptr, /) -&gt; int:
  513. &quot;&quot;&quot;Wraps `int serial_errno(serial_t* serial)`&quot;&quot;&quot;
  514. def serial_errmsg(serial: intptr, /) -&gt; str:
  515. &quot;&quot;&quot;Wraps `const char* serial_errmsg(serial_t* serial)`&quot;&quot;&quot;
  516. def spi_new() -&gt; intptr:
  517. &quot;&quot;&quot;Wraps `spi_t* spi_new()`&quot;&quot;&quot;
  518. def spi_open(spi: intptr, path: str, mode: int, max_speed: int, /) -&gt; int:
  519. &quot;&quot;&quot;Wraps `int spi_open(spi_t* spi, const char* path, unsigned mode, uint32_t max_speed)`&quot;&quot;&quot;
  520. 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:
  521. &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;
  522. 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:
  523. &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;
  524. def spi_transfer(spi: intptr, txbuf: intptr, rxbuf: intptr, len: int, /) -&gt; int:
  525. &quot;&quot;&quot;Wraps `int spi_transfer(spi_t* spi, const uint8_t* txbuf, uint8_t* rxbuf, size_t len)`&quot;&quot;&quot;
  526. def spi_transfer_advanced(spi: intptr, msgs: intptr, count: int, /) -&gt; int:
  527. &quot;&quot;&quot;Wraps `int spi_transfer_advanced(spi_t* spi, const spi_msg_t* msgs, size_t count)`&quot;&quot;&quot;
  528. def spi_close(spi: intptr, /) -&gt; int:
  529. &quot;&quot;&quot;Wraps `int spi_close(spi_t* spi)`&quot;&quot;&quot;
  530. def spi_free(spi: intptr, /) -&gt; None:
  531. &quot;&quot;&quot;Wraps `void spi_free(spi_t* spi)`&quot;&quot;&quot;
  532. def spi_get_mode(spi: intptr, mode: intptr, /) -&gt; int:
  533. &quot;&quot;&quot;Wraps `int spi_get_mode(spi_t* spi, unsigned* mode)`&quot;&quot;&quot;
  534. def spi_get_max_speed(spi: intptr, max_speed: intptr, /) -&gt; int:
  535. &quot;&quot;&quot;Wraps `int spi_get_max_speed(spi_t* spi, uint32_t* max_speed)`&quot;&quot;&quot;
  536. def spi_get_bit_order(spi: intptr, bit_order: intptr, /) -&gt; int:
  537. &quot;&quot;&quot;Wraps `int spi_get_bit_order(spi_t* spi, spi_bit_order_t* bit_order)`&quot;&quot;&quot;
  538. def spi_get_bits_per_word(spi: intptr, bits_per_word: intptr, /) -&gt; int:
  539. &quot;&quot;&quot;Wraps `int spi_get_bits_per_word(spi_t* spi, uint8_t* bits_per_word)`&quot;&quot;&quot;
  540. def spi_get_extra_flags(spi: intptr, extra_flags: intptr, /) -&gt; int:
  541. &quot;&quot;&quot;Wraps `int spi_get_extra_flags(spi_t* spi, uint8_t* extra_flags)`&quot;&quot;&quot;
  542. def spi_get_extra_flags32(spi: intptr, extra_flags: intptr, /) -&gt; int:
  543. &quot;&quot;&quot;Wraps `int spi_get_extra_flags32(spi_t* spi, uint32_t* extra_flags)`&quot;&quot;&quot;
  544. def spi_set_mode(spi: intptr, mode: int, /) -&gt; int:
  545. &quot;&quot;&quot;Wraps `int spi_set_mode(spi_t* spi, unsigned mode)`&quot;&quot;&quot;
  546. def spi_set_max_speed(spi: intptr, max_speed: int, /) -&gt; int:
  547. &quot;&quot;&quot;Wraps `int spi_set_max_speed(spi_t* spi, uint32_t max_speed)`&quot;&quot;&quot;
  548. def spi_set_bit_order(spi: intptr, bit_order: int, /) -&gt; int:
  549. &quot;&quot;&quot;Wraps `int spi_set_bit_order(spi_t* spi, spi_bit_order_t bit_order)`&quot;&quot;&quot;
  550. def spi_set_bits_per_word(spi: intptr, bits_per_word: int, /) -&gt; int:
  551. &quot;&quot;&quot;Wraps `int spi_set_bits_per_word(spi_t* spi, uint8_t bits_per_word)`&quot;&quot;&quot;
  552. def spi_set_extra_flags(spi: intptr, extra_flags: int, /) -&gt; int:
  553. &quot;&quot;&quot;Wraps `int spi_set_extra_flags(spi_t* spi, uint8_t extra_flags)`&quot;&quot;&quot;
  554. def spi_set_extra_flags32(spi: intptr, extra_flags: int, /) -&gt; int:
  555. &quot;&quot;&quot;Wraps `int spi_set_extra_flags32(spi_t* spi, uint32_t extra_flags)`&quot;&quot;&quot;
  556. def spi_fd(spi: intptr, /) -&gt; int:
  557. &quot;&quot;&quot;Wraps `int spi_fd(spi_t* spi)`&quot;&quot;&quot;
  558. def spi_tostring(spi: intptr, str: intptr, len: int, /) -&gt; int:
  559. &quot;&quot;&quot;Wraps `int spi_tostring(spi_t* spi, char* str, size_t len)`&quot;&quot;&quot;
  560. def spi_errno(spi: intptr, /) -&gt; int:
  561. &quot;&quot;&quot;Wraps `int spi_errno(spi_t* spi)`&quot;&quot;&quot;
  562. def spi_errmsg(spi: intptr, /) -&gt; str:
  563. &quot;&quot;&quot;Wraps `const char* spi_errmsg(spi_t* spi)`&quot;&quot;&quot;
  564. def periphery_version() -&gt; str:
  565. &quot;&quot;&quot;Wraps `const char* periphery_version()`&quot;&quot;&quot;
  566. def periphery_version_info() -&gt; intptr:
  567. &quot;&quot;&quot;Wraps `const periphery_version_t* periphery_version_info()`&quot;&quot;&quot;
  568. # aliases
  569. gpio_direction_t = int
  570. gpio_edge_t = int
  571. gpio_event_clock_t = int
  572. gpio_bias_t = int
  573. gpio_drive_t = int
  574. pwm_polarity_t = int
  575. serial_parity_t = int
  576. spi_bit_order_t = int
  577. # enums
  578. GPIO_ERROR_ARG: int
  579. GPIO_ERROR_OPEN: int
  580. GPIO_ERROR_NOT_FOUND: int
  581. GPIO_ERROR_QUERY: int
  582. GPIO_ERROR_CONFIGURE: int
  583. GPIO_ERROR_UNSUPPORTED: int
  584. GPIO_ERROR_INVALID_OPERATION: int
  585. GPIO_ERROR_IO: int
  586. GPIO_ERROR_CLOSE: int
  587. GPIO_DIR_IN: int
  588. GPIO_DIR_OUT: int
  589. GPIO_DIR_OUT_LOW: int
  590. GPIO_DIR_OUT_HIGH: int
  591. GPIO_EDGE_NONE: int
  592. GPIO_EDGE_RISING: int
  593. GPIO_EDGE_FALLING: int
  594. GPIO_EDGE_BOTH: int
  595. GPIO_EVENT_CLOCK_REALTIME: int
  596. GPIO_EVENT_CLOCK_MONOTONIC: int
  597. GPIO_EVENT_CLOCK_HTE: int
  598. GPIO_BIAS_DEFAULT: int
  599. GPIO_BIAS_PULL_UP: int
  600. GPIO_BIAS_PULL_DOWN: int
  601. GPIO_BIAS_DISABLE: int
  602. GPIO_DRIVE_DEFAULT: int
  603. GPIO_DRIVE_OPEN_DRAIN: int
  604. GPIO_DRIVE_OPEN_SOURCE: int
  605. LED_ERROR_ARG: int
  606. LED_ERROR_OPEN: int
  607. LED_ERROR_QUERY: int
  608. LED_ERROR_IO: int
  609. LED_ERROR_CLOSE: int
  610. MMIO_ERROR_ARG: int
  611. MMIO_ERROR_OPEN: int
  612. MMIO_ERROR_CLOSE: int
  613. PWM_ERROR_ARG: int
  614. PWM_ERROR_OPEN: int
  615. PWM_ERROR_QUERY: int
  616. PWM_ERROR_CONFIGURE: int
  617. PWM_ERROR_CLOSE: int
  618. PWM_POLARITY_NORMAL: int
  619. PWM_POLARITY_INVERSED: int
  620. SERIAL_ERROR_ARG: int
  621. SERIAL_ERROR_OPEN: int
  622. SERIAL_ERROR_QUERY: int
  623. SERIAL_ERROR_CONFIGURE: int
  624. SERIAL_ERROR_IO: int
  625. SERIAL_ERROR_CLOSE: int
  626. PARITY_NONE: int
  627. PARITY_ODD: int
  628. PARITY_EVEN: int
  629. SPI_ERROR_ARG: int
  630. SPI_ERROR_OPEN: int
  631. SPI_ERROR_QUERY: int
  632. SPI_ERROR_CONFIGURE: int
  633. SPI_ERROR_TRANSFER: int
  634. SPI_ERROR_CLOSE: int
  635. SPI_ERROR_UNSUPPORTED: int
  636. MSB_FIRST: int
  637. LSB_FIRST: int</code></pre>
  638. </doc-codeblock></div>
  639. <!-- Required only on API pages -->
  640. <doc-toolbar-member-filter-no-results></doc-toolbar-member-filter-no-results>
  641. </div>
  642. <footer id="retype-content-footer" class="clear-both">
  643. <nav id="retype-nextprev" class="print:hidden flex mt-14">
  644. <div class="w-1/2">
  645. <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/">
  646. <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>
  647. <span>
  648. <span class="block text-xs font-normal text-base-text-muted">Previous</span>
  649. <span class="block mt-1">operator</span>
  650. </span>
  651. </a>
  652. </div>
  653. <div class="w-1/2">
  654. <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/">
  655. <span>
  656. <span class="block text-xs font-normal text-right text-base-text-muted">Next</span>
  657. <span class="block mt-1">pickle</span>
  658. </span>
  659. <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>
  660. </a>
  661. </div>
  662. </nav>
  663. </footer>
  664. </main>
  665. <div id="retype-page-footer" class="print:border-none border-t border-base-border pt-6 mb-8">
  666. <footer class="flex flex-wrap items-center justify-between print:justify-center">
  667. <div id="retype-footer-links" class="print:hidden">
  668. <ul class="flex flex-wrap items-center text-sm">
  669. </ul>
  670. </div>
  671. <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>
  672. </footer>
  673. </div>
  674. </div>
  675. <!-- Rendered if sidebar right is enabled -->
  676. <!-- Sidebar right skeleton-->
  677. <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">
  678. <div class="pl-5">
  679. <div class="w-32 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  680. <div class="w-48 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  681. <div class="w-40 h-3 mb-4 bg-skeleton-bg rounded-full loading"></div>
  682. </div>
  683. </div>
  684. <!-- User should be able to hide sidebar right -->
  685. <doc-sidebar-right v-cloak></doc-sidebar-right>
  686. </div>
  687. </div>
  688. </div>
  689. <doc-search-mobile></doc-search-mobile>
  690. <doc-back-to-top></doc-back-to-top>
  691. </div>
  692. <div id="retype-overlay-target"></div>
  693. <script data-cfasync="false">window.__DOCS__ = { "title": "periphery", level: 2, icon: "file", hasPrism: true, hasMermaid: false, hasMath: false, tocDepth: 23 }</script>
  694. </body>
  695. </html>