Defines

# board_stkt26.h File Reference

AT86RF230 adapter board wired to STK500 with ATtiny26. More...

Go to the source code of this file.

## Defines
#define | BOARD_NAME "stkt26"
#define | BOARD_NAME_STKT26 "stkt26"
#define | BOARD_TYPE (BOARD_STKT26)
#define | DDR_KEY DDRA
#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() {GIMSK &= (~(TRX_IRQ));}
#define | EI_TRX_IRQ() {GIMSK |= (TRX_IRQ);}
#define | HIF_TYPE (HIF_NONE)
#define | HWTIMER_REG (TCNT1)
#define | HWTIMER_TICK ((1.0*HWTMR_PRESCALE)/F_CPU)
#define | HWTIMER_TICK_NB (0xffUL)
#define | HWTMR_PRESCALE (1)
#define | INVERSE_KEYS (1)
#define | LED_DDR DDRA
#define | LED_MASK (0xf0)
#define | LED_NUMBER (4)
#define | LED_PORT PORTA
#define | LED_SHIFT (4)
#define | LEDS_INVERSE (0)
#define | MASK_KEY (0x0f)
#define | MASK_TRX_RESET (_BV(PB4))
#define | MASK_TRX_SLPTR (_BV(PB5))
#define | PIN_KEY PINA
#define | PORT_KEY PORTA
#define | PORT_SPI (PORTB)
#define | PORT_TRX_RESET PORTB
#define | PORT_TRX_SLPTR PORTB
#define | RADIO_TYPE (RADIO_AT86RF230)
#define | SHIFT_KEY (0)
#define | SPI_DATA_REG USIDR
#define | SPI_MISO _BV(PB1)
#define | SPI_MOSI _BV(PB0)
#define | SPI_SCK _BV(PB2)
#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(PB3)
#define | SPI_TYPE SPI_TYPE_USI
#define | SPI_WAITFOR()
#define | TIMER_INIT()
#define | TIMER_IRQ_vect TIMER0_OVF0_vect
#define | TIMER_POOL_SIZE (1)
#define | TIMER_TICK (HWTIMER_TICK_NB * HWTIMER_TICK)
#define | TRX_IRQ _BV(INT0)
#define | TRX_IRQ_INIT()
#define | TRX_IRQ_vect INT0_vect
#define | TRX_TSTAMP_REG TCNT1

## Detailed Description

AT86RF230 adapter board wired to STK500 with ATtiny26.

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

         AVR       RF230
         ---       -----
         PB0  -->  MOSI
         PB1  <--  MISO
         PB2  -->  SCK
         PB3  -->  SS
         PB4  -->  RSTN
         PB5  -->  SLPTR
         PB6  <--  IRQ (INT0)
                   MCLK (NC)
         PB7  -->  (reset)

        PA0:3 <--  KEYS
        PA4:7 -->  LED

Build Options

- stkt26 : AT86RF230 adapter board wired to STK500 with ATtiny26.

## Define Documentation

#define BOARD_NAME "stkt26"

current board name

#define BOARD_NAME_STKT26 "stkt26"

ID String for this hardware

#define BOARD_TYPE (BOARD_STKT26)

current board type (see const.h)

#define DDR_SPI (DDRB)

DDR register for SPI port

#define DDR_TRX_RESET DDRB

DDR register for RESET pin

#define DDR_TRX_SLPTR DDRB

PORT register for SLP_TR pin

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

rising edge triggers INT... disable TRX interrupt

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

enable TRX interrupt

#define HWTMR_PRESCALE (1)

Mode: CTC Prescaler: 1 Overflow: 0xFF

#define MASK_TRX_RESET (_BV(PB4))

PIN mask for RESET pin

#define MASK_TRX_SLPTR (_BV(PB5))

PIN mask for SLP_TR pin

#define PORT_SPI (PORTB)

PORT register for SPI port

#define PORT_TRX_RESET PORTB

PORT register for RESET pin

#define PORT_TRX_SLPTR PORTB

DDR register for SLP_TR pin

#define RADIO_TYPE (RADIO_AT86RF230)

used radiio (see const.h)

#define SPI_DATA_REG USIDR

abstraction for SPI data register

#define SPI_MISO _BV(PB1)

PIN mask for MISO pin

#define SPI_MOSI _BV(PB0)

PIN mask for MOSI pin

#define SPI_SCK _BV(PB2)

PIN mask for SCK pin

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

set SS line to high level

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

set SS line to low level

#define SPI_SS _BV(PB3)

PIN mask for SS pin

#define SPI_WAITFOR | ( |  | ) |

Value:

    do \
        { \
            USISR |= _BV(USIOIF); \
            do \
            { \
                USICR = (_BV(USIWM0)+_BV(USICS1)+_BV(USICLK)+_BV(USITC)); \
            } while ((USISR & _BV(USIOIF)) == 0); \
        } while(0)

wait until SPI transfer is ready

#define TIMER_INIT | ( |  | ) |

Value:

    do{\
            TCCR0 |= _BV(CS00);\
            TIMSK |= _BV(TOIE0);\
        }while(0)

#define TRX_IRQ _BV(INT0)

interrupt mask for GICR

#define TRX_IRQ_INIT | ( |  | ) |

Value:

    do{\
                                GIMSK  |= _BV(INT0);\
                              } while(0)

configuration of interrupt handling

#define TRX_IRQ_vect INT0_vect

interrupt vector name

#define TRX_TSTAMP_REG TCNT1

timestamp register for RX_START event