//Copyright (c) 2005, Research Group Embedded Interaction
//Albrecht Schmidt <albrecht@hcilab.org>
//Matthias Kranz <matthias@hcilab.org>
//Paul Holleis <paul@hcilab.org>
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without modification, 
//are permitted provided that the following conditions are met:
//
//    * Redistributions of source code must retain the above copyright notice, 
//this list of conditions and the following disclaimer.
//    * Redistributions in binary form must reproduce the above copyright notice, 
//this list of conditions and the following disclaimer in the documentation 
//and/or other materials provided with the distribution.
//    * Neither the name of the <ORGANIZATION> nor the names of its contributors 
//may be used to endorse or promote products derived from this software 
//without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
//DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// headerfile for template application

// header file for particle applications
// turn on case sensitive programming
#case                                   
// ignore all warnings - there are so many :-(
#ignore_warnings 201,202,203,204,205,207,208,214,216

// to reduce compiler optimization. necessary for ccs 202. 
// don't have this comment in the same line as #opt!
#opt 0

#define byte  BYTE
#define boolean BOOLEAN
#define true  TRUE
#define false FALSE
#define global  GLOBAL

#include "system/acltypes.h"            // the acl types,  this file includes the know acl types
#include "boards/18f6720.h"             // the defines for the PIC used, this file includes defines like addresses for the processor
#include "boards/18f6720_R.h"           // the registers for the PIC used, this file includes all names of registers of the processor
#include "boards/pc229.h"               // this file includes necessary definition of the Particle Computer version 2.29
#include "boards/wdt18fxx20.h"          // watch dog timer
#include "boards/18f6720.c"             // c code for the PIC used
//#include "boards/pci2c.c"             // this file provides i2c for the particle internals
//#include "boards/pceeprom.c"          // interface to the external 32k EEPROM
#include "boards/AT45DB041.c"           // flash  baustein
//#include "boards/sensori2c.c"         //
#include "boards/owmb.c"                // buzzer
#include "boards/ds2431.c"              // dallas id chip
#include "boards/ballswitch.c"          // ballswitch 
#include "boards/pc229.c"               // this file includes necessary definition of the Particle Computer version 2.29
#include "system/sdjs.h"                // stack 
#include "system/awarecon#090.c"        // stack 
#include "boards/wdt18fxx20.c"          // watch dog timer
#include "system/flash_otap.c"          // over the air programming
#include "system/rtc.c"                 // RTC, real time clock

// include the sensors and actuators you want to use.
//#include "piezo.c"                    //
#include "sensors/voltage.c"            //
//#include "senscore.c"                 // this is essential for all sensorboard stuff

// other app stuff
#include "system/ack.c"                 // acknowledged transmit/receive
#include "system/sdjs.c"                // driver f. signaling
//#include "prs73.c"                    // programmable remote sensors
//#include "test/otaptest.c"            // test codes

// set the fuses to use:
// HS         = Oscillator
// NOWDT      = No Watchdog Timer
// NOBROWNOUT = No Brown Out Detection
// NOPROTECT  = No Protect
// NOLVP      = No Low Voltage Programming
// NOPUT      = No Power Up Timer
#fuses HS,NOPROTECT,NOBROWNOUT,NOLVP,PUT,NOWDT

// change the a/d port for the application if you want
//#define PIC_ADCON0_USER_VALUE 0b01010101
//#define PIC_ADCON1_USER_VALUE 0b10101010

#include "boards/bt96040-addonboard.h"  // defines for the hcilab.org display add-on board
#include "boards/bt96040-addonboard.c"  // code for the hcilab.org display add-on board
#include "sensors/adxl311je.c"          // Analog Devices ADXL311JE
#include "sensors/ldr_a905014.c"        // Light Sensor 905014 from reichelt.de
#include "actuators/bt96040.h"          // header for Barton BT960404 chip-on-glass display
#include "actuators/bt96040.c"          // header for Barton BT960404 chip-on-glass display


