Defines

# board_ravrf.h File Reference

Definition of Atmel Raven Development Kit, AT86RF230 Radio Adapter with Atmega1284. More...

Go to the source code of this file.

## Defines
#define | DDR_SPI (DDRB)
#define | DDR_TRX_RESET DDRB
#define | DDR_TRX_SLPTR DDRB
#define | DEFAULT_SPI_RATE (SPI_RATE_1_2)
#define | DI_TRX_IRQ() {TIMSK1 &= (~(TRX_IRQ));}
#define | EI_TRX_IRQ() {TIMSK1 |= (TRX_IRQ);}
#define | HIF_TYPE HIF_UART_0
#define | HWTIMER_REG (TCNT1)
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
#define | HWTIMER_TICK_NB (0xFFFFUL)
#define | HWTMR_PRESCALE (1)
#define | MASK_TRX_RESET (_BV(PB1))
#define | MASK_TRX_SLPTR (_BV(PB3))
#define | NO_KEYS (1)
#define | NO_LEDS (1)
#define | PORT_SPI (PORTB)
#define | PORT_TRX_RESET PORTB
#define | PORT_TRX_SLPTR PORTB
#define | RADIO_TYPE (RADIO_AT86RF230A)
#define | SPI_DATA_REG SPDR
#define | SPI_MISO _BV(PB6)
#define | SPI_MOSI _BV(PB5)
#define | SPI_SCK _BV(PB7)
#define | SPI_SELN_HIGH() PORT_SPI |= SPI_SS; SREG = sreg
#define | SPI_SELN_LOW() uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS
#define | SPI_SS _BV(PB4)
#define | SPI_TYPE SPI_TYPE_SPI
#define | SPI_WAITFOR() do { while((SPSR & _BV(SPIF)) == 0);} while(0)
#define | TIMER_INIT()
#define | TIMER_IRQ_vect TIMER1_OVF1_vect
#define | TIMER_POOL_SIZE (4)
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)
#define | TRX_IRQ _BV(ICIE1)
#define | TRX_IRQ_INIT()
#define | TRX_IRQ_vect TIMER1_CAPT_vect
#define | TRX_TSTAMP_REG ICR1

## Detailed Description

Definition of Atmel Raven Development Kit, AT86RF230 Radio Adapter with Atmega1284.

The wiring of the radio and the Atmega1284 is shown below:

         AVR          AT86RF230
         ---            ---------
         PB3      -->   SLPTR
         XTAL1    <--   MCLK
         PD6/ICP  <--   IRQ
         PB1      -->   RSTN
         PB4      -->   /SEL
         PB5      -->   MOSI
         PB6      <--   MISO
         PB7      -->   SCLK
         PB0      -->   TST

        LEDs: None
        KEYs: None

    Fuses/Locks?????:
         LF: 0xe2 - 8MHz internal RC Osc.
         HF: 0x11 - without boot loader
         HF: 0x10 - with boot loader
         EF: 0xff
         LOCK: 0xef - protection of boot section

    Original Fuses/Locks
         LF: 0x62
         HF: 0x18
         EF: 0xff
         LOCK: 0xff

    Bootloader:
        Start at byte=0x1e000, address=0xf000, size = 4096 instructions/ 8192 bytes

Build Options

- ravrf : Raven

Definition in file board_ravrf.h.

## Define Documentation

#define DDR_SPI (DDRB)

DDR register for SPI port

Definition at line 134 of file board_ravrf.h.

#define DDR_TRX_RESET DDRB

DDR register for RESET pin

Definition at line 102 of file board_ravrf.h.

#define DDR_TRX_SLPTR DDRB

PORT register for SLEEP_TR pin

Definition at line 109 of file board_ravrf.h.

#define DI_TRX_IRQ | ( |  | ) | {TIMSK1 &= (~(TRX_IRQ));}

rising edge triggers INT... disable TRX interrupt

Definition at line 125 of file board_ravrf.h.

#define EI_TRX_IRQ | ( |  | ) | {TIMSK1 |= (TRX_IRQ);}

enable TRX interrupt

Definition at line 127 of file board_ravrf.h.

#define HIF_TYPE HIF_UART_0

Type of the host interface.

Definition at line 180 of file board_ravrf.h.

#define MASK_TRX_RESET (_BV(PB1))

PIN mask for RESET pin

Definition at line 104 of file board_ravrf.h.

#define MASK_TRX_SLPTR (_BV(PB3))

PIN mask for SLEEP_TR pin

Definition at line 110 of file board_ravrf.h.

#define NO_KEYS (1)

if defined, no KEYS are connected

Definition at line 176 of file board_ravrf.h.

#define NO_LEDS (1)

if defined, no LEDs are connected

Definition at line 173 of file board_ravrf.h.

#define PORT_SPI (PORTB)

PORT register for SPI port

Definition at line 135 of file board_ravrf.h.

#define PORT_TRX_RESET PORTB

PORT register for RESET pin

Definition at line 103 of file board_ravrf.h.

#define PORT_TRX_SLPTR PORTB

DDR register for SLEEP_TR pin

Definition at line 108 of file board_ravrf.h.

#define RADIO_TYPE (RADIO_AT86RF230A)

used radiio (see const.h)

Definition at line 97 of file board_ravrf.h.

#define SPI_DATA_REG SPDR

abstraction for SPI data register

Definition at line 142 of file board_ravrf.h.

#define SPI_MISO _BV(PB6)

PIN mask for MISO pin

Definition at line 138 of file board_ravrf.h.

#define SPI_MOSI _BV(PB5)

PIN mask for MOSI pin

Definition at line 137 of file board_ravrf.h.

#define SPI_SCK _BV(PB7)

PIN mask for SCK pin

Definition at line 139 of file board_ravrf.h.

#define SPI_SELN_HIGH | ( |  | ) | PORT_SPI |= SPI_SS; SREG = sreg

set SS line to high level

Definition at line 168 of file board_ravrf.h.

#define SPI_SELN_LOW | ( |  | ) | uint8_t sreg = SREG; cli(); PORT_SPI &=~SPI_SS

set SS line to low level

Definition at line 166 of file board_ravrf.h.

#define SPI_SS _BV(PB4)

PIN mask for SS pin

Definition at line 140 of file board_ravrf.h.

#define SPI_WAITFOR | ( |  | ) | do { while((SPSR & _BV(SPIF)) == 0);} while(0)

wait until SPI transfer is ready

Definition at line 170 of file board_ravrf.h.

#define TIMER_INIT | ( |  | ) |

Value:

    do{ \
            TCCR1B |= (_BV(CS10)); \
            TIMSK1 |= _BV(TOIE1); \
        }while(0)

Definition at line 189 of file board_ravrf.h.

#define TIMER_IRQ_vect TIMER1_OVF1_vect

symbolic name of the timer interrupt routine that is called

Definition at line 196 of file board_ravrf.h.

#define TRX_IRQ _BV(ICIE1)

interrupt mask for GICR

Definition at line 115 of file board_ravrf.h.

#define TRX_IRQ_INIT | ( |  | ) |

Value:

    do{\
                                TCCR1B |= (_BV(ICNC1) | _BV(ICES1));\
                                TIFR1 = _BV(ICF1);\
                              } while(0)

configuration of interrupt handling

Definition at line 119 of file board_ravrf.h.

#define TRX_IRQ_vect TIMER1_CAPT_vect

interrupt vector name

Definition at line 116 of file board_ravrf.h.

#define TRX_TSTAMP_REG ICR1

timestamp register for RX_START event

Definition at line 130 of file board_ravrf.h.