You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/12/10 06:51:52 UTC

[04/13] incubator-mynewt-site git commit: Added driver overview. Updated HAL to current design. Included PR #131.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_slot_to_area_idx/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_slot_to_area_idx/index.html b/latest/os/modules/bootloader/boot_slot_to_area_idx/index.html
index f60e620..a3fbc00 100644
--- a/latest/os/modules/bootloader/boot_slot_to_area_idx/index.html
+++ b/latest/os/modules/bootloader/boot_slot_to_area_idx/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_swap_areas/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_swap_areas/index.html b/latest/os/modules/bootloader/boot_swap_areas/index.html
index a6a1a3a..63bf77c 100644
--- a/latest/os/modules/bootloader/boot_swap_areas/index.html
+++ b/latest/os/modules/bootloader/boot_swap_areas/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_vect_delete_main/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_vect_delete_main/index.html b/latest/os/modules/bootloader/boot_vect_delete_main/index.html
index 53f7012..d5bbdf1 100644
--- a/latest/os/modules/bootloader/boot_vect_delete_main/index.html
+++ b/latest/os/modules/bootloader/boot_vect_delete_main/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_vect_delete_test/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_vect_delete_test/index.html b/latest/os/modules/bootloader/boot_vect_delete_test/index.html
index 38293b6..0347252 100644
--- a/latest/os/modules/bootloader/boot_vect_delete_test/index.html
+++ b/latest/os/modules/bootloader/boot_vect_delete_test/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_vect_read_main/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_vect_read_main/index.html b/latest/os/modules/bootloader/boot_vect_read_main/index.html
index 4067334..a55dc5b 100644
--- a/latest/os/modules/bootloader/boot_vect_read_main/index.html
+++ b/latest/os/modules/bootloader/boot_vect_read_main/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_vect_read_one/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_vect_read_one/index.html b/latest/os/modules/bootloader/boot_vect_read_one/index.html
index 3da9f27..ade60ad 100644
--- a/latest/os/modules/bootloader/boot_vect_read_one/index.html
+++ b/latest/os/modules/bootloader/boot_vect_read_one/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_vect_read_test/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_vect_read_test/index.html b/latest/os/modules/bootloader/boot_vect_read_test/index.html
index c73f3f0..be0ebb9 100644
--- a/latest/os/modules/bootloader/boot_vect_read_test/index.html
+++ b/latest/os/modules/bootloader/boot_vect_read_test/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/boot_write_status/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/boot_write_status/index.html b/latest/os/modules/bootloader/boot_write_status/index.html
index 6d6d206..c9e3948 100644
--- a/latest/os/modules/bootloader/boot_write_status/index.html
+++ b/latest/os/modules/bootloader/boot_write_status/index.html
@@ -561,6 +561,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/bootloader/bootloader/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/bootloader/bootloader/index.html b/latest/os/modules/bootloader/bootloader/index.html
index 994c08a..c8d2b3f 100644
--- a/latest/os/modules/bootloader/bootloader/index.html
+++ b/latest/os/modules/bootloader/bootloader/index.html
@@ -349,6 +349,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console/index.html b/latest/os/modules/console/console/index.html
index 9f9d7af..724a3a0 100644
--- a/latest/os/modules/console/console/index.html
+++ b/latest/os/modules/console/console/index.html
@@ -349,6 +349,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_blocking_mode/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_blocking_mode/index.html b/latest/os/modules/console/console_blocking_mode/index.html
index 572fdc6..c7ecb3e 100644
--- a/latest/os/modules/console/console_blocking_mode/index.html
+++ b/latest/os/modules/console/console_blocking_mode/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_echo/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_echo/index.html b/latest/os/modules/console/console_echo/index.html
index 8cd7da3..826f6e9 100644
--- a/latest/os/modules/console/console_echo/index.html
+++ b/latest/os/modules/console/console_echo/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_init/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_init/index.html b/latest/os/modules/console/console_init/index.html
index 85815a3..f5b98ee 100644
--- a/latest/os/modules/console/console_init/index.html
+++ b/latest/os/modules/console/console_init/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_is_init/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_is_init/index.html b/latest/os/modules/console/console_is_init/index.html
index 23e15ee..d94113c 100644
--- a/latest/os/modules/console/console_is_init/index.html
+++ b/latest/os/modules/console/console_is_init/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_printf/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_printf/index.html b/latest/os/modules/console/console_printf/index.html
index 8aaa05a..f51b438 100644
--- a/latest/os/modules/console/console_printf/index.html
+++ b/latest/os/modules/console/console_printf/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_read/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_read/index.html b/latest/os/modules/console/console_read/index.html
index 54c5b59..ffa949b 100644
--- a/latest/os/modules/console/console_read/index.html
+++ b/latest/os/modules/console/console_read/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/console/console_write/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/console/console_write/index.html b/latest/os/modules/console/console_write/index.html
index df4e1f3..f9434ab 100644
--- a/latest/os/modules/console/console_write/index.html
+++ b/latest/os/modules/console/console_write/index.html
@@ -409,6 +409,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/drivers/driver/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/drivers/driver/index.html b/latest/os/modules/drivers/driver/index.html
new file mode 100644
index 0000000..16e7851
--- /dev/null
+++ b/latest/os/modules/drivers/driver/index.html
@@ -0,0 +1,625 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        
+        
+        <!-- This is broken by doc revisioning.
+        <link rel="canonical" href="http://mynewt.apache.org/os/modules/drivers/driver/"> -->
+        <link rel="shortcut icon" href="../../../../img/favicon.ico">
+
+	    <title>toc - Apache Mynewt</title>
+
+        <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
+        <link rel="stylesheet" href="../../../../css/highlight.css">
+        <link href="../../../../css/base.css" rel="stylesheet">
+        <link href="../../../../css/custom.css" rel="stylesheet">
+        <link href="../../../../css/v2.css" rel="stylesheet">
+        <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
+        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+        <link href="../../../../extra.css" rel="stylesheet">
+
+        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+        <!--[if lt IE 9]>
+            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
+        <![endif]-->
+
+        
+            <script>
+                (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+                })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+                ga('create', 'UA-72162311-1', 'auto');
+                ga('send', 'pageview');
+            </script>
+        
+    </head>
+
+
+    <body class="toc">
+
+
+        <div class="container">
+    <div class="row v2-main-banner">
+        <div class="col-xs-12 v2-vcenter">
+            <a href="/"><img class="logo" src="/img/logo.png"></a>
+
+            <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
+        </div>
+    </div>
+</div>
+
+        
+
+
+
+
+
+
+<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation">
+    <div class="container">
+        <!-- Collapsed navigation -->
+        <div class="navbar-header">
+            <!-- Expander button -->
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+
+        </div>
+
+        <!-- Expanded navigation -->
+        <div class="navbar-collapse collapse">
+            <!-- Main navigation -->
+            <ul class="nav navbar-nav navbar-right">
+                <li 
+  class=""
+>
+                    <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
+                </li>
+                <li 
+  class="important"
+>
+                    <a href="/quick-start/">Quick Start</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/about/">About</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/talks/">Talks</a>
+                </li>
+                <li 
+  class="active"
+>
+                    <a href="/latest/os/introduction">Documentation</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/download/">Download</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/community/">Community</a>
+                </li>
+                <li 
+  class=""
+>
+                    <a href="/events/">Events</a>
+                </li>
+            </ul>
+
+            <!-- Search, Navigation and Repo links -->
+            <ul class="nav navbar-nav navbar-right">
+                
+            </ul>
+        </div>
+    </div>
+</nav>
+
+        
+
+        <div class="container">
+            
+                <div class="row">
+                    <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary">
+    <div class="top">
+        <div role="search">
+            <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+                <div class="form-group">
+                    <input type="text" name="q" class="form-control" placeholder="Search documentation" />
+                </div>
+            </form>
+        </div>
+    </div>
+    <ul class="toc-nav">
+      <li class="doc-version">
+<select class="form-control" onchange="if (this.value) window.location.href=this.value">
+    
+    <option
+      value="/develop/os/introduction"
+      selected="selected"
+    >
+      Version: develop (latest)
+    </option>
+    
+    <option
+      value="/v0_9_0/os/introduction"
+      
+    >
+      Version: 0.9.0
+    </option>
+    
+</select>
+</li>
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+      
+        
+          
+  
+  
+    <li ><a href="../../../introduction/">Mynewt Documentation</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../get_started/get_started/">Basic Setup</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../../get_started/vocabulary/">Concepts</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../tutorials/tutorials/">Tutorials</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../os_user_guide/">OS User Guide</a>
+  
+  
+    <ul>
+          
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../core_os/mynewt_os/">OS Core</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../core_os/porting/port_os/">Porting to your Platform</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../console/console/">Console</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../shell/shell/">Shell</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../split/split/">Split Images</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../bootloader/bootloader/">Bootloader</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  
+  
+  ../../fs/fs/fs/
+
+">File System</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../hal/hal/">Hardware Abstraction Layer</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li class="active"><a href="./">Drivers</a>
+  
+  
+    <ul>
+          
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../testutil/testutil/">Test Utilities</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../imgmgr/imgmgr/">Image Manager</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+    <li >
+      <a href="../../baselibc/">Baselibc library</a>
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../elua/elua/">Embedded Lua</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../json/json/">JSON</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../fcb/fcb/">Flash Circular Buffer</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../stats/stats/">Stats</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../logs/logs/">Logs</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li><a href="
+  ../../../../network/ble/ble_intro/
+">BLE User Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
+    <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a>
+  
+  
+    </li>
+
+              
+          
+    </ul>
+  
+    </li>
+
+        
+      
+        
+          
+  
+  
+    <li><a href="
+  ../../../../faq/how_to_edit_docs/
+">Appendix</a>
+  
+  
+    </li>
+
+        
+      
+    </ul>
+</div></div>
+
+                    <div class="col-md-9" role="main">
+                        <div class="doc-header">
+                            <div role="navigation" aria-label="breadcrumbs navigation">
+  <ul class="wy-breadcrumbs pull-right">
+    <li><a href="/latest/os/introduction">Docs</a></li>
+    
+    
+        
+          <li>&raquo; <a href="../../../os_user_guide/">OS User Guide</a></li>
+        
+      
+        
+          <li>&raquo; Drivers</li>
+        
+      
+      
+    
+    
+  </ul>
+</div>
+                        </div>
+                        
+                            <h1 id="drivers">Drivers</h1>
+<h3 id="description">Description</h3>
+<p>Device drivers in the Mynewt context includes libraries that interface with devices external to the CPU. These devices are connected to the CPU via standard peripherals such as SPI, GPIO, I2C etc. Device drivers leverage the base HAL services in Mynewt to provide friendly abstractions to application developers. </p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|            app            |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|          (n)drivers       |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|     HAL     |     BSP     |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+</pre></div>
+
+
+<ul>
+<li>
+<p>The Board Support Package (BSP) abstracts board specific configurations e.g. CPU frequency, input voltage, LED pins, on-chip flash map etc.</p>
+</li>
+<li>
+<p>The Hardware Abstraction Layer (HAL) abstracts architecture-specific functionality. It initializes and enables components within a master processor. It is designed to be portable across all the various MCUs supported in Mynewt (e.g. Nordic's nRF51, Nordic's nRF52, NXP's MK64F12 etc.). It includes code that initializes and manages access to components of the board such as board buses (I2C, PCI, PCMCIA, etc.), off-chip memory (controllers, level 2+ cache, Flash, etc.), and off-chip I/O (Ethernet, RS-232, display, mouse, etc.)</p>
+</li>
+<li>
+<p>The driver sits atop the BSP and HAL. It abstracts the common modes of operation for each peripheral device connected via the standard interfaces to the processor. There may be multiple driver implementations of differing complexities for a particular peripheral device.  For example, for an Analog to Digital Converter (ADC) peripheral you might have a simple driver that does blocking ADC reads and uses the HAL only.  You might have a more complex driver that can deal with both internal and external ADCs, and has chip specific support for doing things like DMA\u2019ing ADC reads into a buffer and posting an event to a task every \u2019n\u2019 samples.  The drivers are the ones that register with the kernel\u2019s power management APIs, and manage turning on and off peripherals and external chipsets, etc. The Mynewt core repository comes with a base set of drivers to help the user get started.</p>
+</li>
+</ul>
+<h3 id="general-design-principles">General design principles</h3>
+<ul>
+<li>
+<p>Device drivers should have a consistent structure and unified interface whenever possible. For example, we have a top-level package, \u201cadc\u201d, which contains the interface for all ADC drivers, and then we have the individual implementation of the driver itself.  The following source files point to this:</p>
+<ul>
+<li>high-level ADC API: <code>hw/drivers/adc/include/adc/adc.h</code> </li>
+<li>implementation of ADC for STM32F4: <code>hw/drivers/adc/adc_stm32f4/src/adc_stm32f4.c</code> (As of the 1.0.0-beta release, ADC for nRF51 and nRF52 are available at an external <a href="https://github.com/runtimeinc/mynewt_nordic/tree/master/hw/drivers/adc">repo</a>. They are expected to be pulled into the core repo on Apache Mynewt after the license terms are clarified.). The only exported call in this example is <code>int stm32f4_adc_dev_init(struct os_dev *, void *)</code> which is passed as a function pointer to <code>os_dev_create()</code> in <code>hal_bsp.c</code>, when the adc device is created.</li>
+</ul>
+</li>
+<li>
+<p>Device drivers should be easy to use. In Mynewt, creating a device initializes it as well, making it readily available for the user to open, use (e.g. read, configure etc.) and close. Creating a device is simple using <code>os_dev_create(struct os_dev *dev, char *name, uint8_t stage, uint8_t priority, os_dev_init_func_t od_init, void *arg)</code>. The <code>od_init</code> function is defined within the appropriate driver directory e.g. <code>stm32f4_adc_dev_init</code> in <code>hw/drivers/adc/adc_stm32f4/src/adc_stm32f4.c</code> for the ADC device initialization function. </p>
+</li>
+<li>
+<p>The implementation should allow for builds optimized for minimal memory usage. Additional functionality can be enabled by writing a more complex driver (usually based on the simple implementation included by default in the core repository) and optionally compiling the relevant packages in. Typically, only a basic driver that addresses a device\u2019s core functionality (covering ~90% of use cases) is included in the Mynewt core repository, thus keeping the footprint small.</p>
+</li>
+<li>
+<p>The implementation should allow a user to be able to instantiate multiple devices of a certain kind. In the Mynewt environment the user can, for example, maintain separate contexts for multiple ADCs over different peripheral connections such as SPI, I2C etc. It is also possible for a user to use a single peripheral interface (e.g. SPI) to drive multiple devices (e.g. ADC), and in that case the device driver has to handle the proper synchronization of the various tasks. </p>
+</li>
+<li>
+<p>Device drivers should be MCU independent. In Mynewt, device creation and operation functions are independent of the underlying MCU. </p>
+</li>
+<li>
+<p>Device drivers should be able to offer high-level interfaces for generic operations common to a particular device group. An example of such a class or group of devices is a group for sensors with generic operations such as channel discovery, configure, and read values. The organization of the driver directory is work in progress - so we encourage you to hop on the dev@ mailing list and offer your insights!</p>
+</li>
+<li>
+<p>Device drivers should be searchable. The plan is to have the newt tool offer a <code>newt pkg search</code> capability. This is work in progress. You are welcome to join the conversation on the dev@ mailing list!</p>
+</li>
+</ul>
+<h3 id="example">Example</h3>
+<p>The Mynewt core repo includes an example of a driver using the HAL to provide extra functionality - the UART driver. It uses HAL GPIO and UART to provide multiple serial ports on the NRF52 (but allowed on other platforms too.)</p>
+<p>The gist of the driver design is that there is an API for the driver (for use by applications), and then sub-packages to that driver that implement that driver API using the HAL and BSP APIs.</p>
+                        
+                        <div class="row">
+                            
+
+
+
+<ul class="nav nav-pills" style="margin-bottom: 10px">
+    <li>
+    
+    <a href=../../hal/hal_creation/>
+        <span class="fa fa-arrow-left"></span>
+        Previous: Creating HAL
+    </a>
+    
+    </li>
+    <li class="pull-right">
+    
+    <a href=../../testutil/testutil/>
+        Next: Test Utilities
+        <span class="fa fa-arrow-right"></span>
+    </a>
+    
+    </li>
+</ul>
+                        </div>
+                        <footer class="row">
+    <div class="col-xs-12">
+        
+            <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+        
+    </div>
+    <div class="col-xs-12">
+        <div class="logos">
+            <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
+            <small class="footnote">
+                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+            </small>
+            <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator">
+        </div>
+    </div>
+</footer>
+                    </div>
+                </div>
+            
+            
+        </div>
+
+        <script src="../../../../js/jquery-1.10.2.min.js"></script>
+        <script src="../../../../js/bootstrap-3.0.3.min.js"></script>
+        <script src="../../../../js/highlight.pack.js"></script>
+        <script src="../../../../js/base.js"></script>
+        <script src="../../../../js/custom.js"></script>
+
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/elua/elua/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/elua/elua/index.html b/latest/os/modules/elua/elua/index.html
index 48e24e3..88ac12b 100644
--- a/latest/os/modules/elua/elua/index.html
+++ b/latest/os/modules/elua/elua/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/elua/lua_init/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/elua/lua_init/index.html b/latest/os/modules/elua/lua_init/index.html
index 00b0b54..6a1628e 100644
--- a/latest/os/modules/elua/lua_init/index.html
+++ b/latest/os/modules/elua/lua_init/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/elua/lua_main/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/elua/lua_main/index.html b/latest/os/modules/elua/lua_main/index.html
index fa04106..ec7119b 100644
--- a/latest/os/modules/elua/lua_main/index.html
+++ b/latest/os/modules/elua/lua_main/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb/index.html b/latest/os/modules/fcb/fcb/index.html
index ae28ff1..4cfe8e7 100644
--- a/latest/os/modules/fcb/fcb/index.html
+++ b/latest/os/modules/fcb/fcb/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_append/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_append/index.html b/latest/os/modules/fcb/fcb_append/index.html
index f6aa823..62872ad 100644
--- a/latest/os/modules/fcb/fcb_append/index.html
+++ b/latest/os/modules/fcb/fcb_append/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_append_finish/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_append_finish/index.html b/latest/os/modules/fcb/fcb_append_finish/index.html
index fb4a221..6efa217 100644
--- a/latest/os/modules/fcb/fcb_append_finish/index.html
+++ b/latest/os/modules/fcb/fcb_append_finish/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_append_to_scratch/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_append_to_scratch/index.html b/latest/os/modules/fcb/fcb_append_to_scratch/index.html
index cad4998..cbd8e89 100644
--- a/latest/os/modules/fcb/fcb_append_to_scratch/index.html
+++ b/latest/os/modules/fcb/fcb_append_to_scratch/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_clear/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_clear/index.html b/latest/os/modules/fcb/fcb_clear/index.html
index 6ce3433..ed6eb12 100644
--- a/latest/os/modules/fcb/fcb_clear/index.html
+++ b/latest/os/modules/fcb/fcb_clear/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_getnext/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_getnext/index.html b/latest/os/modules/fcb/fcb_getnext/index.html
index d9ff607..00046f0 100644
--- a/latest/os/modules/fcb/fcb_getnext/index.html
+++ b/latest/os/modules/fcb/fcb_getnext/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_init/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_init/index.html b/latest/os/modules/fcb/fcb_init/index.html
index 4cea864..5d8cc61 100644
--- a/latest/os/modules/fcb/fcb_init/index.html
+++ b/latest/os/modules/fcb/fcb_init/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_is_empty/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_is_empty/index.html b/latest/os/modules/fcb/fcb_is_empty/index.html
index ac78728..e46bd00 100644
--- a/latest/os/modules/fcb/fcb_is_empty/index.html
+++ b/latest/os/modules/fcb/fcb_is_empty/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_offset_last_n/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_offset_last_n/index.html b/latest/os/modules/fcb/fcb_offset_last_n/index.html
index b7883fd..029045d 100644
--- a/latest/os/modules/fcb/fcb_offset_last_n/index.html
+++ b/latest/os/modules/fcb/fcb_offset_last_n/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_rotate/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_rotate/index.html b/latest/os/modules/fcb/fcb_rotate/index.html
index afd9f5a..47b0293 100644
--- a/latest/os/modules/fcb/fcb_rotate/index.html
+++ b/latest/os/modules/fcb/fcb_rotate/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fcb/fcb_walk/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fcb/fcb_walk/index.html b/latest/os/modules/fcb/fcb_walk/index.html
index 1262be6..703ee58 100644
--- a/latest/os/modules/fcb/fcb_walk/index.html
+++ b/latest/os/modules/fcb/fcb_walk/index.html
@@ -330,6 +330,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs/index.html b/latest/os/modules/fs/fs/fs/index.html
index 0cb1119..f756487 100644
--- a/latest/os/modules/fs/fs/fs/index.html
+++ b/latest/os/modules/fs/fs/fs/index.html
@@ -404,6 +404,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_close/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_close/index.html b/latest/os/modules/fs/fs/fs_close/index.html
index ab780d2..13cd691 100644
--- a/latest/os/modules/fs/fs/fs_close/index.html
+++ b/latest/os/modules/fs/fs/fs_close/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_closedir/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_closedir/index.html b/latest/os/modules/fs/fs/fs_closedir/index.html
index d00fdee..e41c3bd 100644
--- a/latest/os/modules/fs/fs/fs_closedir/index.html
+++ b/latest/os/modules/fs/fs/fs_closedir/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_dirent_is_dir/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_dirent_is_dir/index.html b/latest/os/modules/fs/fs/fs_dirent_is_dir/index.html
index 56467af..bd8dfb9 100644
--- a/latest/os/modules/fs/fs/fs_dirent_is_dir/index.html
+++ b/latest/os/modules/fs/fs/fs_dirent_is_dir/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_dirent_name/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_dirent_name/index.html b/latest/os/modules/fs/fs/fs_dirent_name/index.html
index 7fd896a..4ce90e6 100644
--- a/latest/os/modules/fs/fs/fs_dirent_name/index.html
+++ b/latest/os/modules/fs/fs/fs_dirent_name/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_filelen/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_filelen/index.html b/latest/os/modules/fs/fs/fs_filelen/index.html
index 9602215..4abfaec 100644
--- a/latest/os/modules/fs/fs/fs_filelen/index.html
+++ b/latest/os/modules/fs/fs/fs_filelen/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_getpos/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_getpos/index.html b/latest/os/modules/fs/fs/fs_getpos/index.html
index b4b8c42..b2cfc3d 100644
--- a/latest/os/modules/fs/fs/fs_getpos/index.html
+++ b/latest/os/modules/fs/fs/fs_getpos/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_mkdir/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_mkdir/index.html b/latest/os/modules/fs/fs/fs_mkdir/index.html
index 4e869ce..ed2548e 100644
--- a/latest/os/modules/fs/fs/fs_mkdir/index.html
+++ b/latest/os/modules/fs/fs/fs_mkdir/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_open/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_open/index.html b/latest/os/modules/fs/fs/fs_open/index.html
index 308a49c..80921bb 100644
--- a/latest/os/modules/fs/fs/fs_open/index.html
+++ b/latest/os/modules/fs/fs/fs_open/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_opendir/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_opendir/index.html b/latest/os/modules/fs/fs/fs_opendir/index.html
index 235dcbe..607e081 100644
--- a/latest/os/modules/fs/fs/fs_opendir/index.html
+++ b/latest/os/modules/fs/fs/fs_opendir/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_ops/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_ops/index.html b/latest/os/modules/fs/fs/fs_ops/index.html
index 1deff27..6295840 100644
--- a/latest/os/modules/fs/fs/fs_ops/index.html
+++ b/latest/os/modules/fs/fs/fs_ops/index.html
@@ -416,6 +416,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_read/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_read/index.html b/latest/os/modules/fs/fs/fs_read/index.html
index 9a5c6e6..7e25b29 100644
--- a/latest/os/modules/fs/fs/fs_read/index.html
+++ b/latest/os/modules/fs/fs/fs_read/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_readdir/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_readdir/index.html b/latest/os/modules/fs/fs/fs_readdir/index.html
index 37113b7..8326a20 100644
--- a/latest/os/modules/fs/fs/fs_readdir/index.html
+++ b/latest/os/modules/fs/fs/fs_readdir/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_register/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_register/index.html b/latest/os/modules/fs/fs/fs_register/index.html
index f8b2067..62ae309 100644
--- a/latest/os/modules/fs/fs/fs_register/index.html
+++ b/latest/os/modules/fs/fs/fs_register/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_rename/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_rename/index.html b/latest/os/modules/fs/fs/fs_rename/index.html
index 211ef8a..124fbf3 100644
--- a/latest/os/modules/fs/fs/fs_rename/index.html
+++ b/latest/os/modules/fs/fs/fs_rename/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_return_codes/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_return_codes/index.html b/latest/os/modules/fs/fs/fs_return_codes/index.html
index d52b1b2..9b35ded 100644
--- a/latest/os/modules/fs/fs/fs_return_codes/index.html
+++ b/latest/os/modules/fs/fs/fs_return_codes/index.html
@@ -404,6 +404,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_seek/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_seek/index.html b/latest/os/modules/fs/fs/fs_seek/index.html
index 363e430..c153c6d 100644
--- a/latest/os/modules/fs/fs/fs_seek/index.html
+++ b/latest/os/modules/fs/fs/fs_seek/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_unlink/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_unlink/index.html b/latest/os/modules/fs/fs/fs_unlink/index.html
index b954dc1..7918f7f 100644
--- a/latest/os/modules/fs/fs/fs_unlink/index.html
+++ b/latest/os/modules/fs/fs/fs_unlink/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fs_write/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fs_write/index.html b/latest/os/modules/fs/fs/fs_write/index.html
index 8f3258b..b27eba8 100644
--- a/latest/os/modules/fs/fs/fs_write/index.html
+++ b/latest/os/modules/fs/fs/fs_write/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fsutil_read_file/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fsutil_read_file/index.html b/latest/os/modules/fs/fs/fsutil_read_file/index.html
index 98b8708..286d691 100644
--- a/latest/os/modules/fs/fs/fsutil_read_file/index.html
+++ b/latest/os/modules/fs/fs/fsutil_read_file/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/fs/fsutil_write_file/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/fs/fsutil_write_file/index.html b/latest/os/modules/fs/fs/fsutil_write_file/index.html
index 93e1312..496a1d9 100644
--- a/latest/os/modules/fs/fs/fsutil_write_file/index.html
+++ b/latest/os/modules/fs/fs/fsutil_write_file/index.html
@@ -552,6 +552,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs/index.html b/latest/os/modules/fs/nffs/nffs/index.html
index 690d882..0186299 100644
--- a/latest/os/modules/fs/nffs/nffs/index.html
+++ b/latest/os/modules/fs/nffs/nffs/index.html
@@ -404,6 +404,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_area_desc/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_area_desc/index.html b/latest/os/modules/fs/nffs/nffs_area_desc/index.html
index 58d0db4..cd588e0 100644
--- a/latest/os/modules/fs/nffs/nffs_area_desc/index.html
+++ b/latest/os/modules/fs/nffs/nffs_area_desc/index.html
@@ -424,6 +424,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_config/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_config/index.html b/latest/os/modules/fs/nffs/nffs_config/index.html
index abbc1e1..c3ef4ed 100644
--- a/latest/os/modules/fs/nffs/nffs_config/index.html
+++ b/latest/os/modules/fs/nffs/nffs_config/index.html
@@ -424,6 +424,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_detect/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_detect/index.html b/latest/os/modules/fs/nffs/nffs_detect/index.html
index 3d3693c..4b60cf7 100644
--- a/latest/os/modules/fs/nffs/nffs_detect/index.html
+++ b/latest/os/modules/fs/nffs/nffs_detect/index.html
@@ -432,6 +432,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_format/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_format/index.html b/latest/os/modules/fs/nffs/nffs_format/index.html
index 4236731..d903407 100644
--- a/latest/os/modules/fs/nffs/nffs_format/index.html
+++ b/latest/os/modules/fs/nffs/nffs_format/index.html
@@ -432,6 +432,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_init/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_init/index.html b/latest/os/modules/fs/nffs/nffs_init/index.html
index 1213d4b..3c04bf4 100644
--- a/latest/os/modules/fs/nffs/nffs_init/index.html
+++ b/latest/os/modules/fs/nffs/nffs_init/index.html
@@ -432,6 +432,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/nffs/nffs_internals/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/nffs/nffs_internals/index.html b/latest/os/modules/fs/nffs/nffs_internals/index.html
index 7627452..b5b761f 100644
--- a/latest/os/modules/fs/nffs/nffs_internals/index.html
+++ b/latest/os/modules/fs/nffs/nffs_internals/index.html
@@ -404,6 +404,17 @@
                 
   
   
+    <li ><a href="../../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/fs/otherfs/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/fs/otherfs/index.html b/latest/os/modules/fs/otherfs/index.html
index d30a0f2..90d297f 100644
--- a/latest/os/modules/fs/otherfs/index.html
+++ b/latest/os/modules/fs/otherfs/index.html
@@ -364,6 +364,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/hal/hal/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/hal/hal/index.html b/latest/os/modules/hal/hal/index.html
index 3ae90cb..870531b 100644
--- a/latest/os/modules/hal/hal/index.html
+++ b/latest/os/modules/hal/hal/index.html
@@ -328,14 +328,6 @@
           
               
                 
-    <li >
-      <a href="../hal_architecture/">Architecture</a>
-    </li>
-
-              
-          
-              
-                
   
   
     <li><a href="
@@ -373,6 +365,17 @@
                 
   
   
+    <li ><a href="../../drivers/driver/">Drivers</a>
+  
+  
+    </li>
+
+              
+          
+              
+                
+  
+  
     <li ><a href="../../testutil/testutil/">Test Utilities</a>
   
   
@@ -541,23 +544,43 @@
                         
                             <h1 id="hardware-abstraction-layer">Hardware Abstraction Layer</h1>
 <h3 id="description">Description</h3>
-<p>The Hardware Abstraction Layer (HAL) includes a set of APIs 
-(Application Programmer Interface) to connect to 
-the underlying hardware components including MCU components and peripheral
-components.</p>
-<p>The goal is to allow libraries, modules and applications written for Mynewt to 
-be shared within the Mynewt community and used across the variety of supported
-Mynewt platforms. A secondary goal is to provide a simple consistent API 
-to commonly used MCU components and peripherals to make development easier.
-Nothing in the HAL precludes the user of the underlying physical devices,
-it only limits the portability of the end application.</p>
+<p>The Hardware Abstraction Layer (HAL) in Mynewt is a low-level, base peripheral abstraction. HAL provides a core set of services that is implemented for each MCU supported by Mynewt. Device drivers are typically the software libraries that initialize the hardware and manage access to the hardware by higher layers of software. In the Mynewt OS, the layers can be depicted in the following manner.</p>
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|            app            |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|          (n)drivers       |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+|     HAL     |     BSP     |
++\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014+
+</pre></div>
+
+
+<ul>
+<li>
+<p>The Board Support Package (BSP) abstracts board specific configurations e.g. CPU frequency, input voltage, LED pins, on-chip flash map etc.</p>
+</li>
+<li>
+<p>The Hardware Abstraction Layer (HAL) abstracts architecture-specific functionality. It initializes and enables components within a master processor. It is designed to be portable across all the various MCUs supported in Mynewt (e.g. Nordic's nRF51, Nordic's nRF52, NXP's MK64F12 etc.). It includes code that initializes and manages access to components of the board such as board buses (I2C, PCI, PCMCIA, etc.), off-chip memory (controllers, level 2+ cache, Flash, etc.), and off-chip I/O (Ethernet, RS-232, display, mouse, etc.)</p>
+</li>
+<li>
+<p>The driver sits atop the BSP and HAL. It abstracts the common modes of operation for each peripheral device connected via the standard interfaces to the processor. There may be multiple driver implementations of differing complexities for a particular peripheral device. The drivers are the ones that register with the kernel\u2019s power management APIs, and manage turning on and off peripherals and external chipsets, etc. </p>
+</li>
+</ul>
+<h3 id="general-design-principles">General design principles</h3>
+<ul>
+<li>
+<p>The HAL API should be simple. It should be as easy to implement for hardware as possible. A simple HAL API makes it easy to bring up new MCUs quickly.</p>
+</li>
+<li>
+<p>The HAL API should portable across all the various MCUs supported in Mynewt (e.g. Nordic's nRF51, Nordic's nRF52, NXP's MK64F12 etc.).</p>
+</li>
+</ul>
 <h3 id="example">Example</h3>
-<p>A Mynewt contributor might write a light-switch 
-module (<code>libs/light</code>) that provides the functionality of an intelligent light 
-switch.  This might involve using a timer, a General Purpose Output (GPO) 
-to set the light to the on or off state, and flash memory to log the times the 
-lights were turned on or off.  The contributor would like this module to 
-work with as many different hardware platforms as possible, but can't 
+<p>A Mynewt contributor might write a light-switch driver that provides the functionality of an intelligent light
+switch.  This might involve using a timer, a General Purpose Output (GPO)
+to set the light to the on or off state, and flash memory to log the times the
+lights were turned on or off.  The contributor would like this package to
+work with as many different hardware platforms as possible, but can't
 possibly test across the complete set of hardware supported by Mynewt.</p>
 <p><strong>Solution</strong>:  The contributor uses the HAL APIs to control the peripherals.
 The Mynewt team ensures that the underlying HAL devices all work equivalently
@@ -566,7 +589,7 @@ of the hardware.  </p>
 <h3 id="dependency">Dependency</h3>
 <p>To include the HAL within your project,  simply add it to your package
 dependencies as follows:</p>
-<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">pkg.deps: 
+<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%">pkg.deps:
     . . .
     hw/hal
 </pre></div>
@@ -574,19 +597,12 @@ dependencies as follows:</p>
 
 <h3 id="platform-support">Platform Support</h3>
 <p>Not all platforms (MCU and BSP) support all HAL devices. Consult your MCU
-or BSP documentation to find out if you have hardware support for the 
+or BSP documentation to find out if you have hardware support for the
 peripherals you are interested in using.  Once you verify support, then
-consult the MCU implementation and see if the specific HAL interface you are
-using is in the <code>mcu/xxx/src/hal_xxxx.c</code> implementation.  Finally, you 
-can build your project and ensure that there are no unresolved hal_xxx 
+consult the MCU implementation and see if the specific HAL interface (xxxx) you are
+using is in the <code>mcu/&lt;mcu-name&gt;/src/hal_xxxx.c</code> implementation.  Finally, you
+can build your project and ensure that there are no unresolved hal_xxxx
 externals.</p>
-<h3 id="hal-architecture">HAL Architecture</h3>
-<p>Visit the <a href="../hal_architecture/">HAL architecture</a> page to get a understanding 
-of our current hal and its evolution.</p>
-<h3 id="implementing-hal-interfaces">Implementing HAL Interfaces</h3>
-<p>It might be that a specific HAL interface is not supported on your MCU or
-platform.  See the specific HAL documentation for that interface for tips
-on implementing this for your MCU.</p>
                         
                         <div class="row">
                             
@@ -604,8 +620,8 @@ on implementing this for your MCU.</p>
     </li>
     <li class="pull-right">
     
-    <a href=../hal_architecture/>
-        Next: Architecture
+    <a href=../hal_api/>
+        Next: Summary
         <span class="fa fa-arrow-right"></span>
     </a>
     

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/294de97a/latest/os/modules/hal/hal_adc/hal_adc/index.html
----------------------------------------------------------------------
diff --git a/latest/os/modules/hal/hal_adc/hal_adc/index.html b/latest/os/modules/hal/hal_adc/hal_adc/index.html
deleted file mode 100644
index 757a801..0000000
--- a/latest/os/modules/hal/hal_adc/hal_adc/index.html
+++ /dev/null
@@ -1,735 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-    <head>
-        <meta charset="utf-8">
-        <meta http-equiv="X-UA-Compatible" content="IE=edge">
-        <meta name="viewport" content="width=device-width, initial-scale=1.0">
-        
-        
-        <!-- This is broken by doc revisioning.
-        <link rel="canonical" href="http://mynewt.apache.org/os/modules/hal/hal_adc/hal_adc/"> -->
-        <link rel="shortcut icon" href="../../../../../img/favicon.ico">
-
-	    <title>ADC - Apache Mynewt</title>
-
-        <link href="../../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet">
-        <link rel="stylesheet" href="../../../../../css/highlight.css">
-        <link href="../../../../../css/base.css" rel="stylesheet">
-        <link href="../../../../../css/custom.css" rel="stylesheet">
-        <link href="../../../../../css/v2.css" rel="stylesheet">
-        <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
-        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
-        <link href="../../../../../extra.css" rel="stylesheet">
-
-        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
-        <!--[if lt IE 9]>
-            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
-            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
-        <![endif]-->
-
-        
-            <script>
-                (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-                })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
-                ga('create', 'UA-72162311-1', 'auto');
-                ga('send', 'pageview');
-            </script>
-        
-    </head>
-
-
-    <body class="ADC">
-
-
-        <div class="container">
-    <div class="row v2-main-banner">
-        <div class="col-xs-12 v2-vcenter">
-            <a href="/"><img class="logo" src="/img/logo.png"></a>
-
-            <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4>
-        </div>
-    </div>
-</div>
-
-        
-
-
-
-
-
-
-<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation">
-    <div class="container">
-        <!-- Collapsed navigation -->
-        <div class="navbar-header">
-            <!-- Expander button -->
-            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
-                <span class="sr-only">Toggle navigation</span>
-                <span class="icon-bar"></span>
-                <span class="icon-bar"></span>
-                <span class="icon-bar"></span>
-            </button>
-
-        </div>
-
-        <!-- Expanded navigation -->
-        <div class="navbar-collapse collapse">
-            <!-- Main navigation -->
-            <ul class="nav navbar-nav navbar-right">
-                <li 
-  class=""
->
-                    <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a>
-                </li>
-                <li 
-  class="important"
->
-                    <a href="/quick-start/">Quick Start</a>
-                </li>
-                <li 
-  class=""
->
-                    <a href="/about/">About</a>
-                </li>
-                <li 
-  class=""
->
-                    <a href="/talks/">Talks</a>
-                </li>
-                <li 
-  class="active"
->
-                    <a href="/latest/os/introduction">Documentation</a>
-                </li>
-                <li 
-  class=""
->
-                    <a href="/download/">Download</a>
-                </li>
-                <li 
-  class=""
->
-                    <a href="/community/">Community</a>
-                </li>
-                <li 
-  class=""
->
-                    <a href="/events/">Events</a>
-                </li>
-            </ul>
-
-            <!-- Search, Navigation and Repo links -->
-            <ul class="nav navbar-nav navbar-right">
-                
-            </ul>
-        </div>
-    </div>
-</nav>
-
-        
-
-        <div class="container">
-            
-                <div class="row">
-                    <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary">
-    <div class="top">
-        <div role="search">
-            <form id="rtd-search-form" class="wy-form" action="../../../../../search.html" method="get">
-                <div class="form-group">
-                    <input type="text" name="q" class="form-control" placeholder="Search documentation" />
-                </div>
-            </form>
-        </div>
-    </div>
-    <ul class="toc-nav">
-      <li class="doc-version">
-<select class="form-control" onchange="if (this.value) window.location.href=this.value">
-    
-    <option
-      value="/develop/os/introduction"
-      selected="selected"
-    >
-      Version: develop (latest)
-    </option>
-    
-    <option
-      value="/v0_9_0/os/introduction"
-      
-    >
-      Version: 0.9.0
-    </option>
-    
-</select>
-</li>
-      
-        
-      
-        
-      
-        
-      
-        
-      
-        
-      
-        
-      
-        
-      
-        
-      
-        
-          
-  
-  
-    <li ><a href="../../../../introduction/">Mynewt Documentation</a>
-  
-  
-    <ul>
-          
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../get_started/get_started/">Basic Setup</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../../../get_started/vocabulary/">Concepts</a>
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../tutorials/tutorials/">Tutorials</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../os_user_guide/">OS User Guide</a>
-  
-  
-    <ul>
-          
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../core_os/mynewt_os/">OS Core</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../core_os/porting/port_os/">Porting to your Platform</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../console/console/">Console</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../shell/shell/">Shell</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../split/split/">Split Images</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../bootloader/bootloader/">Bootloader</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li><a href="
-  
-  
-  ../../../fs/fs/fs/
-
-">File System</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../hal/">Hardware Abstraction Layer</a>
-  
-  
-    <ul>
-          
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_architecture/">Architecture</a>
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li><a href="
-  ../../hal_api/
-">API</a>
-  
-  
-    <ul>
-          
-              
-                
-    <li >
-      <a href="../../hal_api/">Summary</a>
-    </li>
-
-              
-          
-              
-                
-    <li class="active">
-      <a href="./">ADC</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_cputime/hal_cpu_timer/">CPU timer</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_dac/hal_dac/">DAC</a>
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li><a href="
-  ../../hal_flash/hal_flash/
-">Flash memory</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_gpio/hal_gpio/">GPIO</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_i2c/hal_i2c/">I2C</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_pwm/hal_pwm/">PWM</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_spi/hal_spi/">SPI</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_system/hal_sys/">System</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_uart/hal_uart/">UART</a>
-    </li>
-
-              
-          
-    </ul>
-  
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_in_libraries/">Using HAL</a>
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../hal_creation/">Creating HAL</a>
-    </li>
-
-              
-          
-    </ul>
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../testutil/testutil/">Test Utilities</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../imgmgr/imgmgr/">Image Manager</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-    <li >
-      <a href="../../../baselibc/">Baselibc library</a>
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../elua/elua/">Embedded Lua</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../json/json/">JSON</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../fcb/fcb/">Flash Circular Buffer</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../stats/stats/">Stats</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../logs/logs/">Logs</a>
-  
-  
-    </li>
-
-              
-          
-    </ul>
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li><a href="
-  ../../../../../network/ble/ble_intro/
-">BLE User Guide</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../../newt/newt_intro/">Newt Tool Guide</a>
-  
-  
-    </li>
-
-              
-          
-              
-                
-  
-  
-    <li ><a href="../../../../../newtmgr/overview/">Newt Manager Guide</a>
-  
-  
-    </li>
-
-              
-          
-    </ul>
-  
-    </li>
-
-        
-      
-        
-          
-  
-  
-    <li><a href="
-  ../../../../../faq/how_to_edit_docs/
-">Appendix</a>
-  
-  
-    </li>
-
-        
-      
-    </ul>
-</div></div>
-
-                    <div class="col-md-9" role="main">
-                        <div class="doc-header">
-                            <div role="navigation" aria-label="breadcrumbs navigation">
-  <ul class="wy-breadcrumbs pull-right">
-    <li><a href="/latest/os/introduction">Docs</a></li>
-    
-    
-        
-          <li>&raquo; <a href="../../hal/">Hardware Abstraction Layer</a></li>
-        
-      
-        
-          <li>&raquo; <a href="../../hal_api/">API</a></li>
-        
-      
-      
-        <li>&raquo; ADC</li>
-      
-    
-    
-  </ul>
-</div>
-                        </div>
-                        
-                            <h1 id="hal_adc">hal_adc</h1>
-<p>The hardware independent interface to Analog To Digital Controllers</p>
-<h3 id="description">Description</h3>
-<p>Analog to Digital converters (ADCs) read analog values (voltage) and convert
-them to digital values to be used in your applications.  For a description
-of ADC, see <a href="https://en.wikipedia.org/wiki/Analog-to-digital_converter">wikipedia</a></p>
-<h3 id="definition">Definition</h3>
-<p><a href="https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_adc.h">hal_adc.h</a></p>
-<h3 id="hal_adcs-theory-of-operation">HAL_ADCs Theory Of Operation</h3>
-<p>ADCs have different conversion rates, resolution (bits) and reference voltages.</p>
-<p>The HAL_ADC has APIs to allow the application or library to query the capabilities
-of a specific ADC.</p>
-<table>
-<thead>
-<tr>
-<th><strong>Method Name</strong></th>
-<th><strong> Description </strong></th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>hal_adc_get_bits</td>
-<td>gets the resolution of the ADC in bits.  For example if the ADC is 10 bits, a read will return a value from 0 through 2^10 - 1 = 1023.</td>
-</tr>
-<tr>
-<td>hal_adc_get_ref_mv</td>
-<td>gets the underlying reference voltage for the ADC in millivolts.  For example, if the ADC is 10 bits and the reference voltage is 5000 mV a ADC reading of 1023 corresponds to 5V; a ADC reading of 0 corresponds to 0 volts.</td>
-</tr>
-</tbody>
-</table>
-<p>Given this information, the application or library could convert any reading
-to millivolts.  Since this is a common operation, the HAL_ADC API has a helper
-function to perform this function: <code>hal_adc_to_mv()</code>.</p>
-<p>The current HAL_ADC API provides a blocking read command to initiate an ADC
-conversion, and return the result of that conversion.  Conversion time is
-hardware dependent, but this is not an instantaneous operation.  Libraries
-can use the <a href="../../hal_cputime/hal_cpu_timer/">hal_cputime</a> APIs to 
-time conversions if that is relevant to the application.</p>
-<p>Future HAL_ADC APIs will include periodic ADC conversion, non-blocking ADC
-conversion and direct-to-memory DMA conversion. </p>
-                        
-                        <div class="row">
-                            
-
-
-
-<ul class="nav nav-pills" style="margin-bottom: 10px">
-    <li>
-    
-    <a href=../../hal_api/>
-        <span class="fa fa-arrow-left"></span>
-        Previous: Summary
-    </a>
-    
-    </li>
-    <li class="pull-right">
-    
-    <a href=../../hal_cputime/hal_cpu_timer/>
-        Next: CPU timer
-        <span class="fa fa-arrow-right"></span>
-    </a>
-    
-    </li>
-</ul>
-                        </div>
-                        <footer class="row">
-    <div class="col-xs-12">
-        
-            <p class="copyright">Copyright &copy; 2015 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
-        
-    </div>
-    <div class="col-xs-12">
-        <div class="logos">
-            <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache">
-            <small class="footnote">
-                MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
-            </small>
-            <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator">
-        </div>
-    </div>
-</footer>
-                    </div>
-                </div>
-            
-            
-        </div>
-
-        <script src="../../../../../js/jquery-1.10.2.min.js"></script>
-        <script src="../../../../../js/bootstrap-3.0.3.min.js"></script>
-        <script src="../../../../../js/highlight.pack.js"></script>
-        <script src="../../../../../js/base.js"></script>
-        <script src="../../../../../js/custom.js"></script>
-
-    </body>
-</html>
\ No newline at end of file