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
00086 #if defined(rzusb)
00087 # define BOARD_TYPE BOARD_RZUSB
00088 # define BOARD_NAME "rzusb230"
00089 # define RADIO_TYPE (RADIO_AT86RF230B)
00090 #endif
00091
00092 #ifndef BOARD_RDK230_H
00093 #define BOARD_RDK230_H
00094
00095
00096
00097
00098
00099 #include "base_rdk230.h"
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 #define LED_INIT() \
00113 do { \
00114 DDRD |= _BV(7) | _BV(5); DDRE |= _BV(7) | _BV(6); \
00115 PORTD &= ~_BV(7); PORTD |= _BV(5); PORTE |= _BV(7) | _BV(6); \
00116 } while (0)
00117
00118 #define LED_SET(x) \
00119 switch (x) { \
00120 case 3: PORTD |= _BV(7); break; \
00121 case 0: PORTD &= ~_BV(5); break; \
00122 case 1: PORTE &= ~_BV(7); break; \
00123 case 2: PORTE &= ~_BV(6); break; \
00124 }
00125
00126 #define LED_CLR(x) \
00127 switch (x) { \
00128 case 3: PORTD &= ~_BV(7); break; \
00129 case 0: PORTD |= _BV(5); break; \
00130 case 1: PORTE |= _BV(7); break; \
00131 case 2: PORTE |= _BV(6); break; \
00132 }
00133
00134 #define LED_SET_VALUE(x) \
00135 do { \
00136 if (x & 1) PORTD &= ~_BV(5); else PORTD |= _BV(5); \
00137 if (x & 2) PORTE &= ~_BV(7); else PORTE |= _BV(7); \
00138 if (x & 4) PORTE &= ~_BV(6); else PORTE |= _BV(6); \
00139 } while (0)
00140
00141 #define LED_GET_VALUE() ( \
00142 ((PORTD & _BV(5))? 0: 1) | \
00143 ((PORTE & _BV(7))? 0: 2) | \
00144 ((PORTE & _BV(6))? 0: 4) \
00145 )
00146
00147 #define LED_VAL(msk,val) do{}while(0)
00149 #define LED_TOGGLE(ln) \
00150 switch (ln) { \
00151 case 3: PORTD ^= _BV(7); break; \
00152 case 0: PORTD ^= _BV(5); break; \
00153 case 1: PORTE ^= _BV(7); break; \
00154 case 2: PORTE ^= _BV(6); break; \
00155 }
00156
00157 #define LED_NUMBER (3)
00158
00159 #define LED_ACTIVITY (0)
00160 #define LED_USB_CONFIGURED (3)
00161
00162
00163
00164 #define NO_KEYS
00165
00166
00167 #define HIF_TYPE (HIF_AT90USB)
00168
00169
00170 #define USB_VID URACOLI_USB_VID
00171 #define USB_PID URACOLI_USB_PID
00172 #define USB_BCD_RELEASE URACOLI_USB_BCD_RELEASE
00173 #define USB_VENDOR_NAME URACOLI_USB_VENDOR_NAME
00174 #define USB_PRODUCT_NAME URACOLI_USB_PRODUCT_NAME
00175
00176
00177 #define HWTMR_PRESCALE (1)
00178 #define HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
00179 #define HWTIMER_TICK_NB (0xFFFFUL)
00180 #define HWTIMER_REG (TCNT1)
00181 #define TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)
00182 #define TIMER_POOL_SIZE (4)
00183 #define TIMER_INIT() \
00184 do{ \
00185 TCCR1B |= (_BV(CS10)); \
00186 TIMSK1 |= _BV(TOIE1); \
00187 }while(0)
00188 #define TIMER_IRQ_vect TIMER1_OVF_vect
00189
00190 #endif