na1wire: 1-Wire driver API Example

This sample application will demonstrates how to use 1-Wire driver API
functions for 1-wire application. 

Running this sample application requires external hardware to interconnect to 
your Digi JumpStart Kit Development board.  This readme provides instructions 
based on the Digi FIM Application Kit (Digi P/N DG-ACC-FIM).

Please note it is not mandatory to use the FIM Application kit to successfully 
run this application; prototype hardware can be built up in its place.  
However, the FIM Application Kit provides a standard reference design platform 
with all the hardware components and accessory items necessary for immediate 
prototyping of NET+OS applications with FIM-based I/O capabilities.

The FIM Application Kit (Digi P/N DG-ACC-FIM) supports the ConnectCore 9P  9215, 
Digi Connect ME 9210, and NS9210/9215 chip development platforms.  
Complete documentation and schematics for the FIM Application Kit are available 
in the "Application Kit" section on the Digi technical support website at 
www.digi.com/support.

Please also visit the www.digiembedded.com for additional information and purchase options.


Connecting and configuring your FIM Application Kit board
-----------------------------------------------------------------------
The application requires FIM0 to be configured as 1-Wire
and connected to the 1-Wire section of the FIM Application board.  
The FIM Application board contains a DS2431 EEPROM required for this application.

Please refer to the FIM Application Kit Quick Start Guide and the Hardware Reference
Manual (HRM) for guidance on how connect and configure your FIM Application Kit board.

ConnectCore 9P9215 Platform Configuration
=========================================

Setting GPIO pins for FIM0:
---------------------------

1. Make sure in gpio.h the define BSP_GPIO_MUX_IOP_0_GEN_IO_0 is set to 
   BSP_GPIO_MUX_USE_2ND_ALTERNATE_PATH.

2. Make sure BSP_IOP_FIM0_1WIRE is set to BSP_IOP_GEN_IO_0 in bsp_iop.h

3. Make sure APP_1WIRE_INTF is defined "/1-wire/0" in root.c

Setting GPIO pins for FIM1:
---------------------------

1. Make sure in gpio.h the define BSP_GPIO_MUX_IOP_1_GEN_IO_4 is set to 
   BSP_GPIO_MUX_USE_PRIMARY_PATH.

2. Make sure BSP_IOP_FIM1_1WIRE is set to BSP_IOP_GEN_IO_4 in bsp_iop.h

3. Make sure APP_1WIRE_INTF is defined "/1-wire/1" in root.c

Connect ME 9210 Platform Configuration
======================================

Setting GPIO pins for FIM0:
---------------------------

1. Make sure BSP_GPIO_MUX_IOP_0_GEN_IO_1 is set to 
   BSP_GPIO_MUX_USE_PRIMARY_PATH in gpio.h

2. Make sure BSP_IOP_FIM0_1WIRE is set to BSP_IOP_GEN_IO_1 in bsp_iop.h

3. Make sure BSP_GPIO_MUX_SERIAL_A is set to BSP_GPIO_MUX_SERIAL_2_WIRE_UART or 
   BSP_GPIO_MUX_INTERNAL_USE_ONLY.

   If BSP_GPIO_MUX_SERIAL_A is set to BSP_GPIO_MUX_INTERNAL_USE_ONLY, you need
   to update dialog and stdio ports to use "/com/2" in bsp_sys.h

4. Make sure I02 is selected in SW3 for GPIO slection.

5. Make sure APP_1WIRE_INTF is defined "/1-wire/0" in root.c

What it does?
=============
This application accesses scratchpad, verify the data and 
copy data to the DS2431 EEPROM memory.

1. Opens the 1-Wire on FIM0
2. Reads 8 bytes of data from DS2431
3. Checks the correctness of stored MAC address
4. If the MAC address matches then it increments the counter
5. Otherwise updates the MAC address and clears the counter
6. Does CRC check when accessing scratchpad

