index.html 56 KB

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