

<!DOCTYPE html>

<html lang="en-US">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">

  <link rel="stylesheet" href="/zephyr-guide-tutorial/assets/css/just-the-docs-default.css">

  <link rel="stylesheet" href="/zephyr-guide-tutorial/assets/css/just-the-docs-head-nav.css" id="jtd-head-nav-stylesheet">

  <style id="jtd-nav-activation">
  
    .site-nav ul li a {
      background-image: none;
    }

  </style>

  

  
    <script src="/zephyr-guide-tutorial/assets/js/vendor/lunr.min.js"></script>
  

  <script src="/zephyr-guide-tutorial/assets/js/just-the-docs.js"></script>

  <meta name="viewport" content="width=device-width, initial-scale=1">

  



  <!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Zephyr RTOS Programming Guide | A comprehensive guide for Zephyr RTOS programming - from beginner to professional. Learn kernel fundamentals, device drivers, networking, Bluetooth, and real-world case studies.</title>
<meta name="generator" content="Jekyll v4.4.1" />
<meta property="og:title" content="Zephyr RTOS Programming Guide" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="A comprehensive guide for Zephyr RTOS programming - from beginner to professional. Learn kernel fundamentals, device drivers, networking, Bluetooth, and real-world case studies." />
<meta property="og:description" content="A comprehensive guide for Zephyr RTOS programming - from beginner to professional. Learn kernel fundamentals, device drivers, networking, Bluetooth, and real-world case studies." />
<link rel="canonical" href="/zephyr-guide-tutorial/assets/css/just-the-docs-head-nav.css" />
<meta property="og:url" content="/zephyr-guide-tutorial/assets/css/just-the-docs-head-nav.css" />
<meta property="og:site_name" content="Zephyr RTOS Programming Guide" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Zephyr RTOS Programming Guide" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"A comprehensive guide for Zephyr RTOS programming - from beginner to professional. Learn kernel fundamentals, device drivers, networking, Bluetooth, and real-world case studies.","headline":"Zephyr RTOS Programming Guide","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"/zephyr-guide-tutorial/assets/zephyr_logo.png"}},"url":"/zephyr-guide-tutorial/assets/css/just-the-docs-head-nav.css"}</script>
<!-- End Jekyll SEO tag -->


  <!-- Site logo - larger size with horizontal padding -->
<style>
  .site-title {
    height: 3.5rem !important;
  }
  .site-logo {
    min-height: 3.5rem !important;
    padding-left: 7% !important;
    padding-right: 7% !important;
  }
  @media (max-width: 50rem) {
    .site-title {
      height: 3rem !important;
    }
    .site-logo {
      min-height: 3rem !important;
    }
  }
</style>

<!-- Table styling for better visibility in dark mode -->
<style>
  /* Table borders - visible in dark mode */
  table {
    border-collapse: collapse !important;
    border: 1px solid #6b7280 !important;
  }

  table th,
  table td {
    border: 1px solid #6b7280 !important;
    padding: 8px 12px !important;
  }

  /* Table header - slightly different background */
  table th {
    background-color: rgba(107, 114, 128, 0.3) !important;
    font-weight: 600 !important;
  }

  /* Alternating row colors for readability */
  table tbody tr:nth-child(even) {
    background-color: rgba(107, 114, 128, 0.1) !important;
  }

  /* Hover effect */
  table tbody tr:hover {
    background-color: rgba(107, 114, 128, 0.2) !important;
  }
</style>

<!-- Mermaid diagrams with paper-like background -->
<style>
  /* Mermaid container - paper-like background */
  .mermaid,
  pre.mermaid,
  .language-mermaid,
  code.language-mermaid {
    background-color: #d5d0c8 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    display: block !important;
  }

  /* All text in Mermaid - dark gray */
  .mermaid text,
  .mermaid tspan,
  .mermaid .nodeLabel,
  .mermaid .label,
  .mermaid .edgeLabel,
  .mermaid .cluster-label,
  .mermaid .messageText,
  .mermaid .loopText,
  .mermaid .noteText,
  .mermaid .labelText,
  .mermaid .actor {
    fill: #2c3e50 !important;
    color: #2c3e50 !important;
  }

  /* All lines and arrows - dark gray */
  .mermaid path,
  .mermaid .edgePath path,
  .mermaid .flowchart-link,
  .mermaid .messageLine0,
  .mermaid .messageLine1,
  .mermaid .relation {
    stroke: #4a5568 !important;
  }

  /* Sequence diagram actor lifelines - force visible */
  line[id^="actor"] {
    stroke: #000000 !important;
    stroke-width: 0.5px !important;
  }

  /* Sequence diagram message lines */
  .mermaid .messageText {
    fill: #2c3e50 !important;
  }

  .mermaid .messageLine0,
  .mermaid .messageLine1 {
    stroke: #4a5568 !important;
    stroke-width: 1.5px !important;
  }

  .mermaid marker path,
  .mermaid .arrowheadPath {
    fill: #4a5568 !important;
    stroke: #4a5568 !important;
  }

  /* Node backgrounds - paper tones */
  .mermaid .node rect,
  .mermaid .node circle,
  .mermaid .node ellipse,
  .mermaid .node polygon,
  .mermaid .node path {
    fill: #c5c0b8 !important;
    stroke: #8a8578 !important;
  }

  /* Cluster backgrounds */
  .mermaid .cluster rect {
    fill: #cac5bd !important;
    stroke: #8a8578 !important;
  }

  /* Actor boxes in sequence diagrams */
  .mermaid .actor-box,
  .mermaid rect.actor {
    fill: #c5c0b8 !important;
    stroke: #8a8578 !important;
  }

  /* Notes - slightly warmer */
  .mermaid .note {
    fill: #ddd8c8 !important;
    stroke: #a89878 !important;
  }

  /* Mindmap nodes */
  .mermaid .mindmap-node rect,
  .mermaid .mindmap-node circle {
    fill: #c5c0b8 !important;
    stroke: #8a8578 !important;
  }

  .mermaid .mindmap-edges path {
    stroke: #4a5568 !important;
    stroke-width: 2px !important;
  }
</style>

<!-- Fix sequence diagram lifelines after mermaid renders -->
<script>
(function() {
  function fixActorLines() {
    var lines = document.querySelectorAll('line[id^="actor"]');
    for (var i = 0; i < lines.length; i++) {
      lines[i].setAttribute('stroke', '#000000');
      lines[i].setAttribute('stroke-width', '0.5px');
    }
  }

  // Run after page fully loads
  if (document.readyState === 'complete') {
    setTimeout(fixActorLines, 500);
    setTimeout(fixActorLines, 1500);
  } else {
    window.addEventListener('load', function() {
      setTimeout(fixActorLines, 500);
      setTimeout(fixActorLines, 1500);
      setTimeout(fixActorLines, 3000);
    });
  }
})();
</script>


</head>

<body>
  <a class="skip-to-main" href="#main-content">Skip to main content</a>
  <svg xmlns="http://www.w3.org/2000/svg" class="d-none">
  <symbol id="svg-link" viewBox="0 0 24 24">
  <title>Link</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
    <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
  </svg>
</symbol>

  <symbol id="svg-menu" viewBox="0 0 24 24">
  <title>Menu</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
    <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
  </svg>
</symbol>

  <symbol id="svg-arrow-right" viewBox="0 0 24 24">
  <title>Expand</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
    <polyline points="9 18 15 12 9 6"></polyline>
  </svg>
</symbol>

  <!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
  <title id="svg-external-link-title">(external link)</title>
  <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
</symbol>

  
    <symbol id="svg-doc" viewBox="0 0 24 24">
  <title>Document</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
    <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
  </svg>
</symbol>

    <symbol id="svg-search" viewBox="0 0 24 24">
  <title>Search</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
    <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  </svg>
</symbol>

  
  
    <!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
<symbol id="svg-copy" viewBox="0 0 16 16">
  <title>Copy</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
    <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
    <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
  </svg>
</symbol>
<symbol id="svg-copied" viewBox="0 0 16 16">
  <title>Copied</title>
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
    <path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
    <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
  </svg>
</symbol>

  
</svg>

  
    <header class="side-bar">
  <div class="site-header">
    <a href="/zephyr-guide-tutorial/" class="site-title lh-tight">
  <div class="site-logo" role="img" aria-label="Zephyr RTOS Programming Guide"></div>

</a>
    <button id="menu-button" class="site-button btn-reset" aria-label="Menu" aria-expanded="false">
      <svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg>
    </button>
  </div>

  <nav aria-label="Main" id="site-nav" class="site-nav">
  
  
    <ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/" class="nav-list-link">Home</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 1: Getting Started submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part1/" class="nav-list-link">Part 1: Getting Started</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/01-introduction.html" class="nav-list-link">Introduction to Zephyr</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/02-zephyr-products.html" class="nav-list-link">Zephyr for Embedded Products</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/03-installation.html" class="nav-list-link">Installation</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/04-west-setup.html" class="nav-list-link">West Setup</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/05-toolchains.html" class="nav-list-link">Toolchains</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/06-docker-setup.html" class="nav-list-link">Docker Setup</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/07-ide-setup.html" class="nav-list-link">IDE Setup</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part1/08-hello-world.html" class="nav-list-link">Hello World</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 2: Build System submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part2/" class="nav-list-link">Part 2: Build System</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/01-west-commands.html" class="nav-list-link">West Commands</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/02-cmake-basics.html" class="nav-list-link">CMake Basics</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/03-kconfig.html" class="nav-list-link">Kconfig</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/04-kconfig-troubleshooting.html" class="nav-list-link">Kconfig Troubleshooting</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/05-device-tree.html" class="nav-list-link">Device Tree</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/06-overlays.html" class="nav-list-link">Overlays</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/07-devicetree-troubleshooting.html" class="nav-list-link">Devicetree Troubleshooting</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part2/08-application-structure.html" class="nav-list-link">Application Structure</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 3: Kernel Essentials submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part3/" class="nav-list-link">Part 3: Kernel Essentials</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/01-threads.html" class="nav-list-link">Threads</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/02-scheduling.html" class="nav-list-link">Scheduling</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/03-interrupts.html" class="nav-list-link">Interrupts</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/04-timing.html" class="nav-list-link">Timing</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/05-workqueues.html" class="nav-list-link">Workqueues</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/06-kernel-objects.html" class="nav-list-link">Kernel Objects</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part3/07-memory-management.html" class="nav-list-link">Memory Management</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 4: Synchronization & IPC submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part4/" class="nav-list-link">Part 4: Synchronization & IPC</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/01-mutexes.html" class="nav-list-link">Mutexes</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/02-semaphores.html" class="nav-list-link">Semaphores</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/03-condition-variables.html" class="nav-list-link">Condition Variables</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/04-spinlocks.html" class="nav-list-link">Spinlocks</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/05-message-queues.html" class="nav-list-link">Message Queues</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/06-fifos-lifos.html" class="nav-list-link">FIFOs and LIFOs</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/07-pipes-mailboxes.html" class="nav-list-link">Pipes and Mailboxes</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/08-events-polling.html" class="nav-list-link">Events and Polling</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/09-ipc-selection.html" class="nav-list-link">IPC Selection Guide</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part4/10-zbus.html" class="nav-list-link">Zbus</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 5: Device Drivers submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part5/" class="nav-list-link">Part 5: Device Drivers</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/01-driver-model.html" class="nav-list-link">Driver Model</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/02-devicetree-bindings.html" class="nav-list-link">Devicetree Bindings</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/03-gpio.html" class="nav-list-link">GPIO</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/04-i2c.html" class="nav-list-link">I2C</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/05-spi.html" class="nav-list-link">SPI</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/06-uart.html" class="nav-list-link">UART</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part5/07-custom-drivers.html" class="nav-list-link">Custom Drivers</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 6: Advanced Topics submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part6/" class="nav-list-link">Part 6: Advanced Topics</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/01-logging.html" class="nav-list-link">Logging</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/02-shell.html" class="nav-list-link">Shell</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/03-tracing.html" class="nav-list-link">Tracing</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/04-debugging.html" class="nav-list-link">Debugging</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/05-testing.html" class="nav-list-link">Testing</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/06-quality-assurance.html" class="nav-list-link">Quality Assurance</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/07-working-without-hardware.html" class="nav-list-link">Working without Hardware</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/08-networking-overview.html" class="nav-list-link">Networking Overview</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/09-sockets.html" class="nav-list-link">Sockets</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/10-mqtt.html" class="nav-list-link">MQTT</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/11-coap.html" class="nav-list-link">CoAP</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/12-http.html" class="nav-list-link">HTTP</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/13-tls.html" class="nav-list-link">TLS</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/14-ble-overview.html" class="nav-list-link">BLE Overview</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/15-ble-advertising.html" class="nav-list-link">BLE Advertising</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/16-ble-scanning.html" class="nav-list-link">BLE Scanning</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/17-ble-gatt-server.html" class="nav-list-link">GATT Server</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/18-ble-gatt-client.html" class="nav-list-link">GATT Client</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/19-ble-mesh.html" class="nav-list-link">BLE Mesh</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/20-power-management.html" class="nav-list-link">Power Management</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part6/21-device-pm.html" class="nav-list-link">Device PM</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Part 7: Case Studies submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/part7/" class="nav-list-link">Part 7: Case Studies</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/01-openbic-overview.html" class="nav-list-link">OpenBIC Overview</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/02-openbic-architecture.html" class="nav-list-link">OpenBIC Architecture</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/03-openbic-protocols.html" class="nav-list-link">OpenBIC Protocols</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/04-openbic-sensors.html" class="nav-list-link">OpenBIC Sensors</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/05-openbic-lessons.html" class="nav-list-link">OpenBIC Lessons</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/06-aspeed-rot-overview.html" class="nav-list-link">ASPEED RoT Overview</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/07-aspeed-rot-secure-boot.html" class="nav-list-link">Secure Boot</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/08-aspeed-rot-attestation.html" class="nav-list-link">Attestation</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/09-aspeed-rot-pfr.html" class="nav-list-link">Platform Firmware Resilience</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/part7/10-aspeed-rot-lessons.html" class="nav-list-link">Security Lessons</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Appendices submenu" aria-expanded="false">
        <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg>
      </button><a href="/zephyr-guide-tutorial/appendices/" class="nav-list-link">Appendices</a><ul class="nav-list"><li class="nav-list-item"><a href="/zephyr-guide-tutorial/appendices/glossary.html" class="nav-list-link">Glossary</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/appendices/references.html" class="nav-list-link">References</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/appendices/troubleshooting.html" class="nav-list-link">Troubleshooting</a></li><li class="nav-list-item"><a href="/zephyr-guide-tutorial/appendices/further-resources.html" class="nav-list-link">Further Resources & Next Steps</a></li></ul></li></ul>
  <ul class="nav-list"><li class="nav-list-item external">
          <a href="https://docs.zephyrproject.org/" class="nav-list-link external"
            
          >
            Zephyr Docs
            <svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>
          </a>
        </li><li class="nav-list-item external">
          <a href="https://github.com/zephyrproject-rtos/zephyr" class="nav-list-link external"
            
          >
            Zephyr GitHub
            <svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>
          </a>
        </li></ul>
</nav>


<div class="d-md-block d-none site-footer">
  
  
    This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
  
  </div>
</header>

  
  <div class="main" id="top">
    <div id="main-header" class="main-header">
  
    

<div class="search" role="search">
  <div class="search-input-wrap">
    <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search Zephyr RTOS Programming Guide" autocomplete="off">
    <label for="search-input" class="search-label">
      <span class="sr-only">Search Zephyr RTOS Programming Guide</span>
      <svg viewBox="0 0 24 24" class="search-icon" aria-hidden="true"><use xlink:href="#svg-search"></use></svg>
    </label>
  </div>
  <div id="search-results" class="search-results"></div>
</div>

  
  
  
    <nav aria-label="Auxiliary" class="aux-nav">
  <ul class="aux-nav-list">
    
      <li class="aux-nav-list-item">
        <a href="https://github.com/MichaelTien8901/zephyr-guide-tutorial-openspec" class="site-button"
          
          target="_blank" rel="noopener noreferrer"
          
        >
          Zephyr Guide GitHub
        </a>
      </li>
    
  </ul>
</nav>

  
</div>

    <div class="main-content-wrap">
      
      <div id="main-content" class="main-content">
        <main>
          
            <h.site-nav ul li a {
  background-image: linear-gradient(-90deg, rgb(31.6333333333, 30.8222222222, 34.8777777778) 0%, rgba(31.6333333333, 30.8222222222, 34.8777777778, 0.8) 80%, rgba(31.6333333333, 30.8222222222, 34.8777777778, 0) 100%);
}

          

          
            
          
        </main>
        
<hr>
<footer>
  
    <p><a href="#top" id="back-to-top">Back to top</a></p>
  

  <p class="text-small mb-0">Zephyr RTOS Programming Guide is not affiliated with the Zephyr Project or Linux Foundation. Content is provided for educational purposes.</p>

  <div class="d-md-none mt-4 fs-2">
    
    
      This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
    
  </div>
</footer>

      </div>
    </div>
    
      

<div class="search-overlay"></div>

    
  </div>

  
    





<script type="module">
  
  import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10.6.0/dist/mermaid.esm.min.mjs';
  

  var config = // Mermaid configuration with soft light background
mermaid.initialize({
  startOnLoad: true,
  theme: 'base',
  securityLevel: 'loose',
  themeVariables: {
    // Paper-like background (warm, unlit paper tone)
    background: '#d5d0c8',
    mainBkg: '#ccc7bf',

    // Primary colors - muted blue
    primaryColor: '#5a9bd5',
    primaryTextColor: '#2c3e50',
    primaryBorderColor: '#4a89c0',

    // Secondary colors - muted green
    secondaryColor: '#7ec88b',
    secondaryTextColor: '#2c3e50',
    secondaryBorderColor: '#5fb06f',

    // Tertiary colors - muted purple
    tertiaryColor: '#b08ed0',
    tertiaryTextColor: '#2c3e50',
    tertiaryBorderColor: '#9575b5',

    // Lines - dark gray for good contrast
    lineColor: '#4a5568',

    // Node backgrounds - paper tones
    nodeBkg: '#c5c0b8',
    nodeTextColor: '#2c3e50',
    nodeBorder: '#8a8578',

    // Text - dark gray (not pure black)
    textColor: '#2c3e50',

    // Clusters
    clusterBkg: '#cac5bd',
    clusterBorder: '#8a8578',

    // Notes - slightly warmer
    noteBkgColor: '#ddd8c8',
    noteTextColor: '#2c3e50',
    noteBorderColor: '#a89878',

    // Sequence diagram
    actorBkg: '#c5c0b8',
    actorBorder: '#8a8578',
    actorTextColor: '#2c3e50',
    actorLineColor: '#4a5568',
    signalColor: '#4a5568',
    signalTextColor: '#2c3e50',
    labelTextColor: '#2c3e50',

    // Edge labels
    edgeLabelBackground: '#d5d0c8',

    // Gantt
    sectionBkgColor: '#dde4ed',
    altSectionBkgColor: '#e8ebef',
    gridColor: '#b8c4d0',
    todayLineColor: '#e05252',
    critBkgColor: '#f8d7da',
    critBorderColor: '#dc3545',
    doneBkgColor: '#d4edda',
    doneBorderColor: '#28a745',

    // Git graph
    git0: '#5a9bd5',
    git1: '#7ec88b',
    git2: '#e05252',
    git3: '#f0ad4e'
  },
  flowchart: {
    useMaxWidth: true,
    htmlLabels: true,
    curve: 'basis',
    diagramPadding: 8
  },
  sequence: {
    diagramMarginX: 50,
    diagramMarginY: 10,
    actorMargin: 50,
    width: 150,
    height: 65,
    boxMargin: 10,
    boxTextMargin: 5,
    noteMargin: 10,
    messageMargin: 35
  },
  gantt: {
    titleTopMargin: 25,
    barHeight: 20,
    barGap: 4,
    topPadding: 50
  }
});
;
  mermaid.initialize(config);
  mermaid.run({
    querySelector: '.language-mermaid',
  });
</script>



  
</body>
</html>

