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 23:53:10 UTC

[4/6] incubator-mynewt-site git commit: modifications to hal documentation, addition of driver overview

modifications to hal documentation, addition of driver overview


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/ac3ce34b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/ac3ce34b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/ac3ce34b

Branch: refs/heads/develop
Commit: ac3ce34b0aa1058788328bc68e6ec0827183e39b
Parents: 781d42b
Author: aditihilbert <ad...@runtime.io>
Authored: Fri Dec 9 16:54:01 2016 -0800
Committer: aditihilbert <ad...@runtime.io>
Committed: Fri Dec 9 16:54:01 2016 -0800

----------------------------------------------------------------------
 docs/os/modules/drivers/driver.md               |   50 +
 docs/os/modules/hal/hal.md                      |   68 +-
 docs/os/modules/hal/hal_adc/hal_adc.md          |   43 -
 docs/os/modules/hal/hal_api.md                  |   22 +-
 docs/os/modules/hal/hal_architecture.md         |    8 -
 docs/os/modules/hal/hal_bsp/hal_bsp.md          |   19 +
 .../os/modules/hal/hal_cputime/hal_cpu_timer.md |   29 -
 docs/os/modules/hal/hal_creation.md             |  143 +-
 docs/os/modules/hal/hal_dac/hal_dac.md          |   41 -
 docs/os/modules/hal/hal_drawing.graphml         |  416 ---
 docs/os/modules/hal/hal_drawing.pdf             | 2819 ------------------
 docs/os/modules/hal/hal_drawing.png             |  Bin 455792 -> 0 bytes
 docs/os/modules/hal/hal_flash/hal_flash.md      |   18 +
 docs/os/modules/hal/hal_flash/hal_flash_int.md  |   33 +
 docs/os/modules/hal/hal_flash/hal_flash_map.md  |    0
 docs/os/modules/hal/hal_gpio/hal_gpio.md        |   12 +-
 docs/os/modules/hal/hal_i2c/hal_i2c.md          |   30 +-
 docs/os/modules/hal/hal_in_libraries.md         |   67 +-
 docs/os/modules/hal/hal_os_tick/hal_os_tick.md  |   28 +
 docs/os/modules/hal/hal_pwm/hal_pwm.md          |   65 -
 docs/os/modules/hal/hal_spi/hal_spi.md          |   72 +-
 docs/os/modules/hal/hal_system/hal_sys.md       |   13 +
 docs/os/modules/hal/hal_timer/hal_timer.md      |   27 +
 docs/os/modules/hal/hal_uart/hal_uart.md        |    6 +-
 .../os/modules/hal/hal_watchdog/hal_watchdog.md |   28 +
 mkdocs.yml                                      |   15 +-
 26 files changed, 328 insertions(+), 3744 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/drivers/driver.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/drivers/driver.md b/docs/os/modules/drivers/driver.md
new file mode 100644
index 0000000..8c5b586
--- /dev/null
+++ b/docs/os/modules/drivers/driver.md
@@ -0,0 +1,50 @@
+# Drivers
+
+###Description
+
+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. 
+
+```no-highlight
+
++\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+
+
+```
+ 
+* The Board Support Package (BSP) abstracts board specific configurations e.g. CPU frequency, input voltage, LED pins, on-chip flash map etc.
+
+* 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.)
+
+* 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.
+
+
+### General design principles
+
+* 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:
+
+    * high-level ADC API: `hw/drivers/adc/include/adc/adc.h` 
+    * implementation of ADC for STM32F4: `hw/drivers/adc/adc_stm32f4/src/adc_stm32f4.c` (As of the 1.0.0-beta release, ADC for nRF51 and nRF52 are available at an external [repo](https://github.com/runtimeinc/mynewt_nordic/tree/master/hw/drivers/adc). 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 `int stm32f4_adc_dev_init(struct os_dev *, void *)` which is passed as a function pointer to `os_dev_create()` in `hal_bsp.c`, when the adc device is created.
+
+* 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 `os_dev_create(struct os_dev *dev, char *name, uint8_t stage, uint8_t priority, os_dev_init_func_t od_init, void *arg)`. The `od_init` function is defined within the appropriate driver directory e.g. `stm32f4_adc_dev_init` in `hw/drivers/adc/adc_stm32f4/src/adc_stm32f4.c` for the ADC device initialization function. 
+
+* 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.
+
+* 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. 
+
+* Device drivers should be MCU independent. In Mynewt, device creation and operation functions are independent of the underlying MCU. 
+* 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!
+
+* Device drivers should be searchable. The plan is to have the newt tool offer a `newt pkg search` capability. This is work in progress. You are welcome to join the conversation on the dev@ mailing list!
+
+
+###Example
+
+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.)
+
+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.
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal.md b/docs/os/modules/hal/hal.md
index da643f2..6ad0950 100644
--- a/docs/os/modules/hal/hal.md
+++ b/docs/os/modules/hal/hal.md
@@ -2,26 +2,40 @@
 
 ###Description
 
-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.
-
-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.
+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.
+
+```no-highlight
+
++\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+
+
+```
+
+* The Board Support Package (BSP) abstracts board specific configurations e.g. CPU frequency, input voltage, LED pins, on-chip flash map etc.
+
+* 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.)
+
+* 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. 
+
+
+### General design principles
+
+* 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.
+
+* 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.).
 
 ###Example
 
-A Mynewt contributor might write a light-switch 
-module (`libs/light`) 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 
+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.
 
 **Solution**:  The contributor uses the HAL APIs to control the peripherals.
@@ -35,7 +49,7 @@ To include the HAL within your project,  simply add it to your package
 dependencies as follows:
 
 ```no-highlight
-pkg.deps: 
+pkg.deps:
     . . .
     hw/hal
 ```
@@ -43,20 +57,10 @@ pkg.deps:
 ###Platform Support
 
 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 `mcu/xxx/src/hal_xxxx.c` 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 `mcu/<mcu-name>/src/hal_xxxx.c` implementation.  Finally, you
+can build your project and ensure that there are no unresolved hal_xxxx
 externals.
 
-### HAL Architecture
-
-Visit the [HAL architecture](./hal_architecture.md) page to get a understanding 
-of our current hal and its evolution.
-
-###Implementing HAL Interfaces
-
-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.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_adc/hal_adc.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_adc/hal_adc.md b/docs/os/modules/hal/hal_adc/hal_adc.md
deleted file mode 100644
index 1a924d5..0000000
--- a/docs/os/modules/hal/hal_adc/hal_adc.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# hal_adc
-
-The hardware independent interface to Analog To Digital Controllers
-
-###Description
-
-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 [wikipedia](https://en.wikipedia.org/wiki/Analog-to-digital_converter)
-
-###Definition
-
-[hal_adc.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_adc.h)
-
-###HAL_ADCs Theory Of Operation
-
-ADCs have different conversion rates, resolution (bits) and reference voltages.
-
-The HAL_ADC has APIs to allow the application or library to query the capabilities
-of a specific ADC.
-
-
-| **Method Name** | ** Description ** |
-|--------------|----------------------|
-| hal_adc_get_bits | 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.
-| hal_adc_get_ref_mv | 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.  
-
-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: `hal_adc_to_mv()`.
- 
-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 [hal_cputime](../hal_cputime/hal_cpu_timer.md) APIs to 
-time conversions if that is relevant to the application.
-
-Future HAL_ADC APIs will include periodic ADC conversion, non-blocking ADC
-conversion and direct-to-memory DMA conversion. 
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_api.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_api.md b/docs/os/modules/hal/hal_api.md
index 81f4ade..0b7d11f 100644
--- a/docs/os/modules/hal/hal_api.md
+++ b/docs/os/modules/hal/hal_api.md
@@ -7,16 +7,16 @@ description of the interfaces are shown below.
 
 | **Hal Name** | ** Interface File ** | **Description ** |
 |--------------|----------------------|------------------|
-| [adc](hal_adc/hal_adc.md)      |  [hal_adc.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_adc.h)       | An interface for controlling Analog To Digital Converters.
-| [cputime](hal_cputime/hal_cpu_timer.md)      |  [hal_cputime.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_cputime.h)       | An interface for getting the CPU uptime, an interface to set arbitrary timers based on the CPU time, and an interface for a blocking delay if CPU time.
-| [dac](hal_dac/hal_dac.md)      |  [hal_dac.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_dac.h)       | An interface for controlling Digital to Analog Converters.
-| [flash](hal_flash/hal_flash.md)        |  [hal_flash.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_flash.h)         | A blocking interface to access flash memory.
-| [flash map](hal_flash/hal_flash_map.md)    |  [flash_map.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/flash_map.h)         | An interface to query information about the flash map (regions and sectors) 
-| [gpio](hal_gpio/hal_gpio.md)         |  [hal_gpio.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_gpio.h)          |  An interface for manipulating General Purpose Inputs and Outputs.
-| [i2c](hal_i2c/hal_i2c.md)      |  [hal_i2c.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_i2c.h)       | An interface for controlling Inter-Integrated-Circuit (i2c) devices.
-| [pwm](hal_pwm/hal_pwm.md)      |  [hal_pwm.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_pwm.h)       | An interface for controlling Pulse Width Modulator Devices.
-| [spi](hal_spi/hal_spi.md)      |  [hal_spi.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_spi.h)       | An interface for controlling Serial Peripheral Interface (SPI) devices.
-| [system](hal_system/hal_sys.md)       |  [hal_system.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_system.h)      | An interface for starting and resetting the system
-| [uart](hal_uart/hal_uart.md)         |  [hal_uart.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_uart.h)         | An interface for communicating via asynchronous serial interface .
+| [bsp](hal_bsp/hal_bsp.md)         |  [hal_bsp.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_bsp.h)         | An hardware independent interface to identify and access underlying BSP.|
+| [flash api for apps to use](hal_flash/hal_flash.md)        |  [hal_flash.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_flash.h)         | A blocking interface to access flash memory.|
+| [flash api for drivers to implement](hal_flash/hal_flash_int.md)    |  [flash_map.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_flash_int.h)         | An interface to query information about the flash map (regions and sectors)| 
+| [gpio](hal_gpio/hal_gpio.md)         |  [hal_gpio.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_gpio.h)          |  An interface for manipulating General Purpose Inputs and Outputs.|
+| [i2c](hal_i2c/hal_i2c.md)      |  [hal_i2c.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_i2c.h)       | An interface for controlling Inter-Integrated-Circuit (i2c) devices.|
+| [OS tick](hal_os_tick/hal_os_tick.md)         |  [hal_os_tick.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_os_tick.h)         | An interface to set up interrupt timers or halt CPU in terms of OS ticks.|
+| [spi](hal_spi/hal_spi.md)      |  [hal_spi.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_spi.h)       | An interface for controlling Serial Peripheral Interface (SPI) devices.|
+| [system](hal_system/hal_sys.md)       |  [hal_system.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_system.h)      | An interface for starting and resetting the system. |
+| [timer](hal_timer/hal_timer.md)      |  [hal_cputime.h](https://github.com/apache/incubator-mynewt-core/tree/develop/hw/hal/include/hal/hal_timer.h)       | An interface for configuring and running HW timers|
+| [uart](hal_uart/hal_uart.md)         |  [hal_uart.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_uart.h)         | An interface for communicating via asynchronous serial interface.|
+| [watchdog](hal_watchdog/hal_watchdog.md)         |  [hal_watchdog.h](https://github.com/apache/incubator-mynewt-core/blob/develop/hw/hal/include/hal/hal_watchdog.h)         | An interface for enabling internal hardware watchdogs. |
 
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_architecture.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_architecture.md b/docs/os/modules/hal/hal_architecture.md
deleted file mode 100644
index 5ef9e05..0000000
--- a/docs/os/modules/hal/hal_architecture.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Hardware Abstraction Layer
-
-This page presents a picture of the HAL architecture in its current state.  The 
-Mynewt is pre-1.0, and we expect significant changes to the HAL as we add
-support for more functionality and platforms. 
-
-
-![HAL architecture](./hal_drawing.png)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_bsp/hal_bsp.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_bsp/hal_bsp.md b/docs/os/modules/hal/hal_bsp/hal_bsp.md
new file mode 100644
index 0000000..0380459
--- /dev/null
+++ b/docs/os/modules/hal/hal_bsp/hal_bsp.md
@@ -0,0 +1,19 @@
+# hal_bsp
+
+
+This is the hardware independent BSP (Board Support Package) Interface for Mynewt.
+
+### Description
+
+Contains the basic operations to initialize, specify memory to include in coredump, configure interrupt priority etc.
+
+### Definition
+
+[hal_bsp.h](https://github.com/apache/incubator-mynewt-core/blob/master/hw/hal/include/hal/hal_bsp.h)
+
+### Examples
+
+
+<br>
+
+---------------------

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_cputime/hal_cpu_timer.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_cputime/hal_cpu_timer.md b/docs/os/modules/hal/hal_cputime/hal_cpu_timer.md
deleted file mode 100644
index d430dfc..0000000
--- a/docs/os/modules/hal/hal_cputime/hal_cpu_timer.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# hal_cputime
-
-
-The hardware independent interface to system time.
-
-###Description
-
-Contains several different interface.
-
-* An interface to get the current CPU time
-* Interfaces to convert between CPU time and clock time (microseconds etc.)
-* An Interface to set up a software timer based on CPU time.
-
-###Definition
-
-[hal_cputime.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_cputime.h)
-
-###CPU Time
-
-The CPU time is not the same as the [os_time]().  Typically,
-the os_time is set to a much slower tick rate than the CPU time.  The CPU
-time should be used for timing real-time events at exact times.  The os_time
-should be used for system level timeout etc that are not in fine time
-resolutions.  In fact, cputime is not part of the os at all, but a hardware
-layer abstraction to high resolution timers.
-
-There are methods to get the cputime as 32-bit and 64-bit values.  Both
-values may eventually wrap, but for timing short events a 32-bit value
-may be sufficient and would

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_creation.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_creation.md b/docs/os/modules/hal/hal_creation.md
index 052d660..5eff52b 100644
--- a/docs/os/modules/hal/hal_creation.md
+++ b/docs/os/modules/hal/hal_creation.md
@@ -5,151 +5,18 @@
 
 A HAL always includes header file with function declarations 
 for the HAL functionality in `/hw/hal/include/hal`.
-The first argument of all functions in the interface include the virtual 
+The first argument of all functions in the interface typically include the virtual 
 device_id of the device you are controlling.  
 
-For example, in [`hal_gpio.h`](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_gpio.h) 
-the device enumeration is the first argument to all methods and called `pin`.
+For example, in [`hal_gpio.h`](https://github.com/apache/incubator-mynewt-core/blob/master/hw/hal/include/hal/hal_gpio.h) 
+the device enumeration is the first argument to most methods and called `pin`.
 
 ```no-highlight
-    void hal_gpio_set(int pin);
+    void hal_gpio_write(int pin, int val);
 ```
 
 The device_id (in this case called `pin`) is not a physical device 
 (actual hardware pin), but a virtual pin which is defined by the 
-implementation of the HAL (and documented in the implementation of the HAL)
+implementation of the HAL (and documented in the implementation of the HAL).
 
-Below this, there are two different paradigms for HAL interface.  They are 
-discussed below.
 
-
-## Direct HAL Interface
-
-In one HAL paradigm called **direct HAL**, the header file is the only component 
-of the HAL interface.   Implementers of this HAL would create a source file
-that implements these methods.  
-
-This has the advantage of being simple, small, and low execution overhead.
-
-It has the disadvantage that its not possible to have two different implementations
-of the same **direct HAL** within the same image. Said another way, if I create
-a **direct HAL** `hal_foo.h`, there can be many implementations of 
-`xxx/hal_foo.c` but only one can be included in a project.  
-
-For example, support there is an ADC attached directly to the MCU and an ADC
-that is attached via SPI.  There would be no way in this simple paradigm
-to use both these devices from the HAL API at the same time.
-
-Current Direct HAL interfaces include:
-
-| **Hal Name** | ** Interface File ** |
-|--------------|----------------------|
-| [hal_gpio]   |  [hal_gpio.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_gpio.h)     |
-| [hal_uart]   |  [hal_uart.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_uart.h)     |
-| [hal_cputime]|  [hal_cputime.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_cputime.h)    |
-
-This brings up the second paradigm.
-
-## Indirect HAL Interface
-
-The second paradigm, **indirect HAL**  preserves the simple function 
-API with enumerated device_id but adds a small layer of code in the 
-HAL to allow different implementations to connect at runtime.
-
-The abstract interface contains three components:
-
-* A header file `hal_foo.h` that includes the API above with a `device_id`
-*  An implementation `hal/hal_foo.c` which maps the `device_id` to 
-a driver interface structure.  
-*  A driver interface structure that is defined for the underlying implementation
-
-Using this simple model, the user can be exposed to a simple function 
-interface (without structures or function pointers) and the system can provide
-a different software implementation for each device id.
-
-Although the GPIO interface for Mynewt uses the **direct HAL**, we can describe
-what it might look like for an indirect HAL.  
-
-The API `hal_gpio.h` is identical with a direct or indirect HAL.
-
-In the indirect HAL there is an additional header file `hal_gpio_int.h`
- which describes the driver interface for underlying implementations.  It 
-looks similar to the HAL API except is driven by function pointers.
-
-```no-highlight
-struct hal_gpio_funcs {
-    void (*hgpio_set)(void);
-    . . .
-};
-
-struct hal_gpio_int {
-    struct hal_gpio_funcs funcs;
-}
-
-const struct hal_gpio_int *bsp_gpio_dev(uint8_t pin);
-```
-The BSP specific function is what will map the specific pin (device_id) 
-to its implementation.
-
-This is different than the **direct HAL** which maps this virtual/physical 
-device pairing in the MCU implementation.  For the **indirect HAL** the 
-mapping has to be done in the BSP since that is the place where multiple 
-disparate devices can be enumerated into a single `device_id` space.
-
-An interface file `hal/hal_gpio.c` would perform the mapping as 
-follows:
-
-```no-highlight
-    void hal_gpio_set(int pin) {
-        const struct hal_gpio_int *pgpio;
-        pgpio = bsp_get_gpio_device(pin);
-        if(pgpio) {
-            pgpio->funcs.set();
-        }
-    }
-```
-
-The implementer of GPIO functionality (say in `mcu/xxx/hal_gpio.c`) would 
-implement the structure and provide the function pointers.
-
-```no-highlight
-void xxx_hal_gpio_set(void) {
-    /* implementation for this particular gpio device */
-    . . .
-}
-
-struct hal_gpio_int xxx_hal_gpio = {
-    .funcs.hgpio_set = xxx_hal_gpio_set;
-}
-```
-
-This leaves the BSP implementation to complete the function 
-
-```no-highlight
-const struct hal_gpio_int *bsp_gpio_dev(uint8_t pin) {
-    switch(pin) {
-        case 0:
-            return &xxx_hal_gpio;
-        case 1:
-            return &yyy_hal_gpio;
-    }
-    return NULL;
-}
-```
-
-**NOTE**: In this example there could be 10s of GPIO. It may be memory inefficient
-to have that many `hal_gpio_int` structures around to basically call the 
-same functions.  In Mynewt today, the hal_gpio is a **direct HAL** and does 
-not have this overhead. More HAL paradigms may be added in the future to address 
-the flexibility of the **indirect HAL** with the memory efficiency of the **direct HAL**
-
-Current Indirect HAL interfaces include:
-
-| **Hal Name**  | ** Interface File ** |
-|---------------|----------------------|
-| hal_adc_int   |  [hal_adc_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_adc_int.h)
-| hal_dac       |  [hal_dac_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_dac_int.h)
-| hal_flash_int |  [hal_flash_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_flash_int.h)
-| hal_pwm_int   |  [hal_pwm_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_pwm_int.h)
-| hal_i2c_int   |  [hal_i2c_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_i2c_int.h)
-| hal_spi_int   |  [hal_spi_int.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_spi_int.h)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_dac/hal_dac.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_dac/hal_dac.md b/docs/os/modules/hal/hal_dac/hal_dac.md
deleted file mode 100644
index 2f3f570..0000000
--- a/docs/os/modules/hal/hal_dac/hal_dac.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-# hal_dac
-
-
-The hardware independent interface to Digital To Analog Converters.
-
-###Description
-
-For a description of Digital to Analog Converters, see 
-[wikipedia](https://en.wikipedia.org/wiki/Digital-to-analog_converter)
-
-###Definition
-
-[hal_dac.h](https://github.com/apache/incubator-mynewt-larva/blob/master/hw/hal/include/hal/hal_dac.h)
-
-###HAL_DAC Theory Of Operation
-
-DACs have differing conversion resolution (bits), reference voltages (Volts)
-and conversion times (sample rate).
-
-The hal_dac implements function to query some of these values from the
-BSP.
-
-
-| **Method Name** | ** Description ** |
-|--------------|----------------------|
-| hal_dac_get_bits | gets the resolution of the DAC in bits.  For example if the DAC is 10 bits, it supports setting of value from 0 through 2^10 - 1 = 1023.
-| hal_dac_get_ref_mv | gets the underlying reference voltage for the DAC in millivolts.  For example, if the DAC is 10 bits and the reference voltage is 5000 mV setting the DAC value to 1023 corresponds to 5V; setting the DAC value to 0 corresponds to 0 volts.  
-
-From these two pieces of information the application or library can
-determine how to set a specific output voltage.  NOTE: each underlying
-hardware may return different values for these settings.
-
-The API to set the DAC output value is blocking. This means the function 
-will return after the DAC value has been programmed.
-
-Future HAL_DAC APIs will include A DMA interface to automatically write 
-DMA data to the DAC based in events.
-
-The Mynewt HAL also supports a [PWM](../hal_pwm/hal_pwm.md) interface which can 
-be used in conjunction with a low pass filter to set an analog output voltage.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ac3ce34b/docs/os/modules/hal/hal_drawing.graphml
----------------------------------------------------------------------
diff --git a/docs/os/modules/hal/hal_drawing.graphml b/docs/os/modules/hal/hal_drawing.graphml
deleted file mode 100644
index d544889..0000000
--- a/docs/os/modules/hal/hal_drawing.graphml
+++ /dev/null
@@ -1,416 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
-  <!--Created by yEd 3.15.0.2-->
-  <key attr.name="Description" attr.type="string" for="graph" id="d0"/>
-  <key for="port" id="d1" yfiles.type="portgraphics"/>
-  <key for="port" id="d2" yfiles.type="portgeometry"/>
-  <key for="port" id="d3" yfiles.type="portuserdata"/>
-  <key attr.name="url" attr.type="string" for="node" id="d4"/>
-  <key attr.name="description" attr.type="string" for="node" id="d5"/>
-  <key for="node" id="d6" yfiles.type="nodegraphics"/>
-  <key for="graphml" id="d7" yfiles.type="resources"/>
-  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
-  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
-  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
-  <graph edgedefault="directed" id="G">
-    <data key="d0"/>
-    <node id="n0">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="41.31911087036133" width="641.0" x="65.0" y="-595.7535556157429"/>
-          <y:Fill color="#00FFFF" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="32.265625" modelName="custom" textColor="#000000" visible="true" width="467.2421875" x="86.87890625" y="4.526742935180664">hw/hal/hal_xxx_api.h
-This is used by the application programmer to create and use hardware devices<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n1">
-      <data key="d6">
-        <y:SVGNode>
-          <y:Geometry height="62.31911087036133" width="56.55500030517578" x="372.2224998474121" y="-697.4928887685139"/>
-          <y:Fill color="#CCCCFF" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="163.12890625" x="-53.28695297241211" y="66.31911087036133">Library or App Programmer<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="-0.5" nodeRatioX="0.0" nodeRatioY="0.5" offsetX="0.0" offsetY="4.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:SVGNodeProperties usingVisualBounds="true"/>
-          <y:SVGModel svgBoundsPolicy="0">
-            <y:SVGContent refid="1"/>
-          </y:SVGModel>
-        </y:SVGNode>
-      </data>
-    </node>
-    <node id="n2">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="353.0" width="137.0" x="127.5" y="-189.10722192128503"/>
-          <y:Fill color="#FF99CC" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="203.859375" modelName="custom" textColor="#000000" visible="true" width="137.0" x="0.0" y="74.5703125">BSP
-
-The BSP provides the system description via the SYSID enumeration.
-
-The BSP serves to MAP the init function from the hal into a driver and call the driver intializtion and creation, providing the driver config.<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n3">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="348.0" width="269.0" x="437.0" y="-184.10722192128503"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="62.53125" modelName="custom" textColor="#000000" visible="true" width="269.0" x="0.0" y="142.734375">Device Driver
-This contains the device implementation. This hooks directly to the hal interfacevia the function pointer API defined in hal_xxx_int.h<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n4">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="348.0" width="96.0" x="335.0" y="-184.10722192128503"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="60.53125" modelName="custom" rotationAngle="270.0" textColor="#000000" visible="true" width="314.998046875" x="17.734375" y="16.5009765625">/device/hal_xxx.h: This is where the device provides 
-its interface to the hardware.  Typically this contains 
-the creation  function and the configuration the 
-device requires.<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n5">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="269.0" x="437.0" y="-524.4344447453816"/>
-          <y:Fill color="#FFFF99" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="267.337890625" x="0.8310546875" y="5.93359375">hal_xxx_method(struct hal_xxx_dev_s *pdev)<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n6">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="262.0" x="65.0" y="-527.6242361863453"/>
-          <y:Fill color="#FFFF99" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="255.671875" x="3.1640625" y="5.93359375">hal_xxx_init(SystemDeviceDescriptor sysid)<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n7">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="53.0" width="272.0" x="434.0" y="-269.83130534489953"/>
-          <y:Fill color="#FFFF99" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" textColor="#000000" visible="true" width="174.90625" x="48.546875" y="17.43359375">pdev-&gt;driver_api-&gt;method()<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n8">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="53.0" width="262.0" x="65.0" y="-269.83130534489953"/>
-          <y:Fill color="#FFFF99" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="34.265625" modelName="custom" textColor="#000000" visible="true" width="262.0" x="0.0" y="9.3671875">struct hal_adc_device_s *
-bsp_get_hal_adc_device(sysid);<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="-0.5" labelRatioY="0.0" nodeRatioX="-0.5" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n9">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="348.0" width="36.0" x="281.75" y="-184.10722192128503"/>
-          <y:Fill color="#FFFF99" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="custom" rotationAngle="270.0" textColor="#000000" visible="true" width="319.908203125" x="8.93359375" y="14.0458984375">dev_specific_contructor(cont struct dev_cfg_s pconfig)<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n10">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="62.31911087036133" width="641.0" x="65.0" y="-470.8140276273091"/>
-          <y:Fill color="#00FFFF" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="60.53125" modelName="custom" textColor="#000000" visible="true" width="392.83984375" x="124.080078125" y="0.8939304351806641">hw/hal/hal_xxx.c
-This is a shim in the HAL that dispatches to the proper driver 
-and contains the factory to create a new device for the application 
-(with help from the BSP).<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n11">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="62.31911087036133" width="382.0" x="65.0" y="-370.3226664861043"/>
-          <y:Fill color="#00FFFF" transparent="false"/>
-          <y:BorderStyle color="#000000" type="line" width="1.0"/>
-          <y:NodeLabel alignment="center" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="48.3984375" modelName="custom" textColor="#000000" visible="true" width="382.0" x="0.0" y="6.960336685180664">hw/hal/hal_xxx_int.h -- This is the internal API that a driver will implement.  This includes the main interface to the driver and a small iterface for the BSP to help with creation of devices.<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n12">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="366.0" x="65.0" y="199.0"/>
-          <y:Fill color="#FFCC00" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="left" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.1328125" modelName="custom" textColor="#000000" visible="true" width="366.0" x="0.0" y="4.93359375">DEVICE -- This code is implemented by the device driver<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n13">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="366.0" x="65.0" y="229.0"/>
-          <y:Fill color="#FF99CC" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="left" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.1328125" modelName="custom" textColor="#000000" visible="true" width="366.0" x="0.0" y="4.93359375">BSP -- This code is implemented by the BSP designer<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <node id="n14">
-      <data key="d6">
-        <y:ShapeNode>
-          <y:Geometry height="30.0" width="366.0" x="65.0" y="259.0"/>
-          <y:Fill color="#00FFFF" transparent="false"/>
-          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
-          <y:NodeLabel alignment="left" autoSizePolicy="node_width" configuration="CroppingLabel" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.1328125" modelName="custom" textColor="#000000" visible="true" width="366.0" x="0.0" y="4.93359375">HAL -- This code is provided in Mynewt<y:LabelModel>
-              <y:SmartNodeLabelModel distance="4.0"/>
-            </y:LabelModel>
-            <y:ModelParameter>
-              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
-            </y:ModelParameter>
-          </y:NodeLabel>
-          <y:Shape type="rectangle"/>
-        </y:ShapeNode>
-      </data>
-    </node>
-    <edge id="e0" source="n6" target="n8">
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e1" source="n8" target="n2">
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e2" source="n2" target="n4">
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e3" source="n5" target="n7">
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-    <edge id="e4" source="n7" target="n3">
-      <data key="d10">
-        <y:PolyLineEdge>
-          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
-          <y:LineStyle color="#000000" type="line" width="1.0"/>
-          <y:Arrows source="none" target="standard"/>
-          <y:BendStyle smoothed="false"/>
-        </y:PolyLineEdge>
-      </data>
-    </edge>
-  </graph>
-  <data key="d7">
-    <y:Resources>
-      <y:Resource id="1">&lt;?xml version="1.0" encoding="utf-8"?&gt;
-&lt;svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 width="57px" height="63px" viewBox="0 0 57 63" enable-background="new 0 0 57 63" xml:space="preserve"&gt;
-&lt;g&gt;
-	
-		&lt;linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="26.5" y1="1570.3457" x2="27.741" y2="1600.1431" gradientTransform="matrix(1 0 0 1 0.1602 -1546.3828)"&gt;
-		&lt;stop  offset="0.2711" style="stop-color:#FFAB4F"/&gt;
-		&lt;stop  offset="1" style="stop-color:#FFD28F"/&gt;
-	&lt;/linearGradient&gt;
-	&lt;path fill="url(#SVGID_1_)" stroke="#ED9135" stroke-miterlimit="10" d="M49.529,51.225c-4.396-4.396-10.951-5.884-12.063-6.109
-		V37.8H19.278c0,0,0.038,6.903,0,6.868c0,0-6.874,0.997-12.308,6.432C1.378,56.691,0.5,62.77,0.5,62.77
-		c0,1.938,1.575,3.492,3.523,3.492h48.51c1.947,0,3.521-1.558,3.521-3.492C56.055,62.768,54.211,55.906,49.529,51.225z"/&gt;
-	
-		&lt;radialGradient id="face_x5F_white_1_" cx="27.7427" cy="1572.1094" r="23.4243" fx="23.1732" fy="1569.6195" gradientTransform="matrix(1 0 0 1 0.1602 -1546.3828)" gradientUnits="userSpaceOnUse"&gt;
-		&lt;stop  offset="0" style="stop-color:#FFD28F"/&gt;
-		&lt;stop  offset="1" style="stop-color:#FFAB4F"/&gt;
-	&lt;/radialGradient&gt;
-	&lt;path id="face_x5F_white_3_" fill="url(#face_x5F_white_1_)" stroke="#ED9135" stroke-miterlimit="10" d="M43.676,23.357
-		c0.086,10.2-6.738,18.52-15.247,18.586c-8.502,0.068-15.466-8.146-15.552-18.344C12.794,13.4,19.618,5.079,28.123,5.012
-		C36.627,4.945,43.59,13.158,43.676,23.357z"/&gt;
-	
-		&lt;linearGradient id="face_highlight_1_" gradientUnits="userSpaceOnUse" x1="3646.5117" y1="-6644.2471" x2="3670.1414" y2="-6737.6978" gradientTransform="matrix(0.275 0 0 -0.2733 -977.2951 -1807.6279)"&gt;
-		&lt;stop  offset="0" style="stop-color:#FFFFFF;stop-opacity:0.24"/&gt;
-		&lt;stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0.16"/&gt;
-	&lt;/linearGradient&gt;
-	&lt;path id="face_highlight_3_" fill="url(#face_highlight_1_)" d="M27.958,6.333c-6.035,0.047-10.747,4.493-12.787,10.386
-		c-0.664,1.919-0.294,4.043,0.98,5.629c2.73,3.398,5.729,6.283,9.461,8.088c3.137,1.518,7.535,2.384,11.893,1.247
-		c2.274-0.592,3.988-2.459,4.375-4.766c0.183-1.094,0.293-2.289,0.283-3.553C42.083,13.952,36.271,6.268,27.958,6.333z"/&gt;
-	&lt;path fill="#656565" stroke="#4B4B4B" stroke-linejoin="round" stroke-miterlimit="10" d="M15.038,26.653
-		c0.145,2.05,3.468,2.593,6.477,2.56c2.298-0.026,3.25-0.889,4.746-2.685c2.539-3.05-0.767-3.715-4.817-3.67
-		C15.984,22.919,14.777,22.933,15.038,26.653z"/&gt;
-	&lt;path fill="#656565" stroke="#4B4B4B" stroke-linejoin="round" stroke-miterlimit="10" d="M41.116,26.653
-		c-0.146,2.05-3.47,2.593-6.478,2.56c-2.299-0.026-3.252-0.889-4.746-2.685c-2.538-3.05,0.769-3.715,4.816-3.67
-		C40.17,22.919,41.377,22.933,41.116,26.653z"/&gt;
-	&lt;path fill="none" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M27.453,24.375
-		c0,0,0.604-0.469,1.305,0"/&gt;
-	
-		&lt;line fill="none" stroke="#4B4B4B" stroke-linecap="round" stroke-miterlimit="10" x1="41.727" y1="24.592" x2="41.844" y2="25.375"/&gt;
-	
-		&lt;line fill="none" stroke="#4B4B4B" stroke-linecap="round" stroke-miterlimit="10" x1="42.165" y1="24.938" x2="44.027" y2="24.938"/&gt;
-	
-		&lt;line fill="none" stroke="#4B4B4B" stroke-linecap="round" stroke-miterlimit="10" x1="14.374" y1="24.592" x2="14.257" y2="25.375"/&gt;
-	
-		&lt;line fill="none" stroke="#4B4B4B" stroke-linecap="round" stroke-miterlimit="10" x1="13.937" y1="24.938" x2="12.073" y2="24.938"/&gt;
-	&lt;path id="body_9_" fill="#9B9B9B" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
-		M0.5,62.768c0,1.938,1.575,3.494,3.523,3.494h48.51c1.947,0,3.521-1.559,3.521-3.494c0,0-1.844-6.861-6.525-11.543
-		c-4.815-4.813-11.244-6.146-11.244-6.146c-1.771,1.655-5.61,2.802-10.063,2.802c-4.453,0-8.292-1.146-10.063-2.802
-		c0,0-5.755,0.586-11.189,6.021C1.378,56.689,0.5,62.768,0.5,62.768z"/&gt;
-	
-		&lt;path id="turtleneck_6_" fill="#9B9B9B" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
-		M39.715,44.786l-1.557-3.405c0,0-0.574,2.369-3.012,4.441c-2.109,1.795-6.785,2.072-6.785,2.072s-4.753-0.356-6.722-2.031
-		c-2.436-2.072-3.012-4.441-3.012-4.441l-1.555,3.404c0,0-0.552,1.404,1.37,3.479c1.025,1.105,5.203,3.611,9.682,3.582
-		c4.479-0.029,9.264-2.594,10.218-3.623C40.266,46.191,39.715,44.786,39.715,44.786z"/&gt;
-	&lt;path fill="#656565" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M49.529,51.225
-		c-1.094-1.094-2.319-2.006-3.563-2.766c0.193,0.346,0.401,0.68,0.574,1.041c-4.906,6.014-15.921,9.289-21.743,16.709
-		c1.969-7.594-11.166-13.127-14.493-16.926c-0.158-0.182-0.258-0.422-0.332-0.686c-1.015,0.707-2.031,1.525-3.001,2.5
-		c-5.592,5.592-6.47,11.67-6.47,11.67c0,1.936,1.575,3.489,3.523,3.489h48.51c1.948,0,3.521-1.558,3.521-3.489
-		C56.055,62.768,54.211,55.906,49.529,51.225z"/&gt;
-	&lt;path fill="#656565" stroke="#4B4B4B" stroke-linejoin="round" stroke-miterlimit="10" d="M3.007,32.205
-		c1.521,2.295,10.771,12.17,10.771,12.17s-5.137,3.012-3.474,4.908c3.327,3.799,10.533,14.018,14.865,16.467
-		c2.499-4.6-3.906-23.327-5.724-25.833c-1.296-1.786-3.22-3.269-4.598-5.417C14.846,34.5,9.195,34.5,3.007,32.205z"/&gt;
-	&lt;path fill="#656565" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M52.277,32.205
-		c-4.791,3.299-10.368,10.391-11.074,11.066c2.313,1.744,4.9,3.799,6.146,6.406c-4.906,6.014-14.766,9.277-21.747,16.069
-		c2.015-7.771,5.157-20.46,12.517-27.083c1.667-1.5,2.713-2.833,4.043-5.391C42.165,33.275,45.637,33.25,52.277,32.205z"/&gt;
-	&lt;path id="wh2_1_" fill="#9B9B9B" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
-		M28.276,15.5c5.635,0,10.826,1.416,14.979,3.794c-1.614-8.228-7.794-14.34-15.132-14.282c-7.272,0.057-13.299,6.155-14.846,14.294
-		C17.434,16.921,22.632,15.5,28.276,15.5z"/&gt;
-	&lt;path id="wh1_1_" fill="#9B9B9B" stroke="#4B4B4B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
-		M28.278,20.808c5.662,0,11.937,0.811,16.391,2.207c-0.11-2.059-0.274-2.826-0.413-3.72c-4.154-2.379-10.344-3.795-15.98-3.795
-		c-5.644,0-11.842,1.421-16,3.807c-0.228,1.197-0.362,2.436-0.388,3.707C16.343,21.618,22.618,20.808,28.278,20.808z"/&gt;
-&lt;/g&gt;
-&lt;/svg&gt;
-</y:Resource>
-    </y:Resources>
-  </data>
-</graphml>