Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
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
00123 #ifndef DEFAULT_SPI_RATE
00124 # define DEFAULT_SPI_RATE (SPI_RATE_1_4)
00125 #endif
00126
00127
00128
00129
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
00139
00140
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
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
00184 # define HIF_TYPE HIF_UART_1
00185
00186
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