Contiki 2.6

models.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2011, George Oikonomou - <oikonomou@users.sourceforge.net>
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the Institute nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  *
00029  * This file is part of the Contiki operating system.
00030  */
00031 
00032 /**
00033  * \file
00034  *         Header file use to configure differences between cc2530dk builds for
00035  *         the SmartRF/cc2530 and the cc2531 USB stick.
00036  *
00037  *         These configuration directives are hardware-specific and you
00038  *         normally won't have to modify them.
00039  *
00040  * \author
00041  *         George Oikonomou - <oikonomou@users.sourceforge.net>
00042  */
00043 
00044 #ifndef __MODELS_H__
00045 #define __MODELS_H__
00046 
00047 /*---------------------------------------------------------------------------*/
00048 /* LEDs */
00049 /*---------------------------------------------------------------------------*/
00050 /* Some files include leds.h before us */
00051 #undef LEDS_GREEN
00052 #undef LEDS_YELLOW
00053 #undef LEDS_RED
00054 #define LEDS_YELLOW 4
00055 
00056 /*
00057  * Smart RF LEDs
00058  *  1: P1_0 (Green)
00059  *  2: P1_1 (Red)
00060  *  3: P1_4 (Yellow)
00061  *  4: P0_1 (LED4 shares port/pin with B1 and is currently unused)
00062  *
00063  * USB Dongle LEDs
00064  *  1: P0_0 (Red)
00065  *  2: P1_1 (Green - active: low)
00066  */
00067 #if MODEL_CC2531
00068 #undef LEDS_CONF_ALL
00069 #define LEDS_CONF_ALL 3
00070 #define LEDS_RED      1
00071 #define LEDS_GREEN    2
00072 
00073 /* H/W Connections */
00074 #define LED2_PIN   P0_0
00075 #define LED1_PIN   P1_1
00076 
00077 /* P0DIR and P0SEL masks */
00078 #define LED2_MASK  0x01
00079 #define LED1_MASK  0x02
00080 #else
00081 #define LEDS_GREEN    1
00082 #define LEDS_RED      2
00083 
00084 /* H/W Connections */
00085 #define LED1_PIN   P1_0
00086 #define LED2_PIN   P1_1
00087 #define LED3_PIN   P1_4
00088 
00089 /* P0DIR and P0SEL masks */
00090 #define LED1_MASK  0x01
00091 #define LED2_MASK  0x02
00092 #define LED3_MASK  0x10
00093 #define LED4_MASK  0x02
00094 #endif
00095 /*---------------------------------------------------------------------------*/
00096 /* Buttons */
00097 /*---------------------------------------------------------------------------*/
00098 
00099 #endif /* __MODELS_H__ */