board_ict_11.h

Go to the documentation of this file.
00001 /* Copyright (c) 2009-2011, Bjoern Riemer, Karl Fessel, Axel Wachtler
00002    All rights reserved.
00003 
00004    Redistribution and use in source and binary forms, with or without
00005    modification, are permitted provided that the following conditions
00006    are met:
00007 
00008    * Redistributions of source code must retain the above copyright
00009      notice, this list of conditions and the following disclaimer.
00010    * 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    * Neither the name of the authors 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00018    AND 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 COPYRIGHT OWNER OR CONTRIBUTORS BE
00021    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00022    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00023    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00024    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00025    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00026    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00027    POSSIBILITY OF SUCH DAMAGE. */
00028 
00029 /* $Id: board__ict__11_8h_source.html,v 1.1.1.4 2013/04/09 21:11:54 awachtler Exp $ */
00030 
00088 #if defined(ics230_11)
00089 # define BOARD_NAME "icstick230"
00090 # define BOARD_TYPE (BOARD_ICS230_11)
00091 # define RADIO_TYPE (RADIO_AT86RF230B)
00092 
00093 #elif defined(icm230_11)
00094 # define BOARD_NAME "icmodule230"
00095 # define BOARD_TYPE (BOARD_ICM230_11)
00096 # define RADIO_TYPE (RADIO_AT86RF230B)
00097 
00098 #elif defined(icm230_12a)
00099 # define BOARD_NAME "icmodule230a"
00100 # define BOARD_TYPE (BOARD_ICM230_12A)
00101 # define RADIO_TYPE (RADIO_AT86RF230A)
00102 
00103 #elif defined(icm230_12b)
00104 # define BOARD_NAME "icmodule230b"
00105 # define BOARD_TYPE (BOARD_ICM230_12B)
00106 # define RADIO_TYPE (RADIO_AT86RF230B)
00107 
00108 #elif defined(icm230_12c)
00109 # define BOARD_NAME "icmodule230c"
00110 # define BOARD_TYPE (BOARD_ICM230_12C)
00111 # define RADIO_TYPE (RADIO_AT86RF230B)
00112 
00113 #elif defined(ics230_12)
00114 # define BOARD_NAME "icstick230_12"
00115 # define BOARD_TYPE (BOARD_ICS230_12)
00116 # define RADIO_TYPE (RADIO_AT86RF230B)
00117 #endif
00118 
00119 #ifndef BOARD_ICT230_11_H
00120 #define BOARD_ICT230_11_H
00121 
00122 /*=== Compile time parameters ========================================*/
00123 #ifndef DEFAULT_SPI_RATE
00124 # define DEFAULT_SPI_RATE  (SPI_RATE_1_4)
00125 #endif
00126 
00127 /*=== Hardware Components ============================================*/
00128 
00129 /*=== TRX pin access macros ==========================================*/
00130 #if defined(__AVR_ATmega1281__)
00131 # include "base_rdk230.h"
00132 #elif defined(__AVR_ATmega128__)
00133 # include "base_rdk230_m128.h"
00134 #endif
00135 
00136 #define CUSTOM_RESET_TIME_MS (10)       
00138 /*=== LED access macros ==============================================*/
00139 
00140 /* stick settings */
00141 #if (BOARD_TYPE == BOARD_ICS230_11) || (BOARD_TYPE == BOARD_ICS230_12)
00142 # define LED_PORT      PORTG
00143 # define LED_DDR       DDRG
00144 # define LED_MASK      (0x20)
00145 # define LED_SHIFT     (5)
00146 # define LEDS_INVERSE  (1)
00147 # define LED_NUMBER    (1)
00148 #elif BOARD_TYPE == BOARD_ICM230_11
00149 # define LED_PORT      PORTD
00150 # define LED_DDR       DDRD
00151 # define LED_MASK      (0xc0)
00152 # define LED_SHIFT     (6)
00153 # define LEDS_INVERSE  (1)
00154 # define LED_NUMBER    (2)
00155 #elif (BOARD_TYPE == BOARD_ICM230_12A) ||\
00156       (BOARD_TYPE == BOARD_ICM230_12B) ||\
00157       (BOARD_TYPE == BOARD_ICM230_12C)
00158 # define LED_PORT      PORTA
00159 # define LED_DDR       DDRA
00160 # define LED_MASK      (_BV(4)|_BV(5)|_BV(6)|_BV(7))
00161 # define LED_SHIFT     (4)
00162 # define LEDS_INVERSE  (0)
00163 # define LED_NUMBER    (4)
00164 #endif
00165 
00166 
00167 /*=== KEY access macros ==============================================*/
00168 #if (BOARD_TYPE == BOARD_ICS230_11) || (BOARD_TYPE == BOARD_ICS230_12)
00169 # define NO_KEYS (1)
00170 #elif (BOARD_TYPE == BOARD_ICM230_11) ||\
00171       (BOARD_TYPE == BOARD_ICM230_12A) ||\
00172       (BOARD_TYPE == BOARD_ICM230_12B) ||\
00173       (BOARD_TYPE == BOARD_ICM230_12C)
00174 # define PORT_KEY     PORTD
00175 # define PIN_KEY      PIND
00176 # define DDR_KEY      DDRD
00177 # define MASK_KEY     (0x01)
00178 # define SHIFT_KEY    (0)
00179 # define INVERSE_KEYS (1)
00180 # define PULLUP_KEYS  (1)
00181 #endif
00182 
00183 /*=== Host Interface ================================================*/
00184 # define HIF_TYPE    HIF_UART_1
00185 
00186 /*=== TIMER Interface ===============================================*/
00187 #define HWTMR_PRESCALE  (1)
00188 #define HWTIMER_TICK    ((1.0*HWTMR_PRESCALE)/F_CPU)
00189 #define HWTIMER_TICK_NB (0xFFFFUL)
00190 #define HWTIMER_REG     (TCNT1)
00191 #define TIMER_TICK      (HWTIMER_TICK_NB * HWTIMER_TICK)
00192 #define TIMER_POOL_SIZE (4)
00193 
00194 #if defined(__AVR_ATmega1281__)
00195 # define TIMER_INIT() \
00196     do{ \
00197         TCCR1B |= (_BV(CS10)); \
00198         TIMSK1 |= _BV(TOIE1); \
00199     }while(0)
00200 
00201 # define TIMER_IRQ_vect   TIMER1_OVF_vect
00202 #elif defined(__AVR_ATmega128__)
00203 # define TIMER_INIT() \
00204     do{ \
00205         TCCR1B |= (_BV(CS10)); \
00206         TIMSK |= _BV(TOIE1); \
00207     }while(0)
00208 
00209 # define TIMER_IRQ_vect   TIMER1_OVF_vect
00210 #endif
00211 
00212 #endif /* BOARD_ICT230_11_H */

This documentation for µracoli was generated on Tue Apr 9 2013 by  doxygen 1.7.1